Work manager using thread.sleep or delay doesn't work
Hi all,
I used Spring framework and oracle weblogic 10.3 as a container.
I used workmanager for manage my thread, I already made one thread that managed by workmanager. Fortunately spring provide the delegation class for using workmanager, so I just need to put it on applicationContext.xml.
But when I put the "while" and TimeUnit for sleep the process on desired delayed time, the deployment process never finished. It seems the deployment process never jump out from while loop for finishing the deployment.
Why?, As I know using typical thread, there is no issue like this. Should I use another strategy for make it always loop and delay.
This is my simple code :
import java.util.concurrent.TimeUnit;
import org.springframework.core.task.TaskExecutor;
public class TaskExecutorSample{
Boolean shutdown = Boolean.FALSE;
int delay = 8000;
TimeUnit unit = TimeUnit.SECONDS;
private class MessageGenerator implements Runnable {
private String message;
public MessageGenerator(String message){
this.message = message;
@Override
public void run() {
System.out.println(message);
private TaskExecutor taskExecutor;
public TaskExecutorSample(TaskExecutor taskExecutor){
this.taskExecutor = taskExecutor;
try {
while (shutdown.equals(Boolean.FALSE)){
this.printMessage();
unit.sleep(delay);
} catch (Exception e) {
System.out.println(e.getMessage());
public void printMessage() {
taskExecutor.execute(new MessageGenerator("Print this Messages"));
Really thanks in advance.
Regards,
Kahlil
Edited by: Kahlil on May 26, 2010 2:38 PM
Edited by: Kahlil on May 26, 2010 2:42 PM
Hi,
i m not sure whether it's an issue with Spring or not. But i tried using Thread.sleep(1000) in a Simple webapplication to see Workmanagers works properly or not. I found that it works extremely great: http://weblogic-wonders.com/weblogic/2010/01/24/workmanager-at-webapplication-level/
Thanks
Jay SenSharma
Similar Messages
-
Sleep/Wake button doesn't work
I just got my iPod touch yesterday, and the Sleep/Wake button worked for a while... but then after syncing the touch to my computer a second time, the sleep/wake button doesn't work anymore. I can't put the iPod in sleep mode, and I can't turn it off either, and I can't do a hard reset (or whatever it's called when you hold both the buttons down). I've reset using iTunes and through the iPod itself, and it isn't solving the problem.
Any ideas?Hi Bayyar:
Try reading this thread:
http://discussions.apple.com/thread.jspa?messageID=5475024� -
Request Class in Work Manager using WLST
Hi,
How can I configure a fair share request class and assign it to a WorkManager using WLST ?
Edited by: Chintan Parekh on Jul 10, 2011 11:53 PMHi,
i m not sure whether it's an issue with Spring or not. But i tried using Thread.sleep(1000) in a Simple webapplication to see Workmanagers works properly or not. I found that it works extremely great: http://weblogic-wonders.com/weblogic/2010/01/24/workmanager-at-webapplication-level/
Thanks
Jay SenSharma -
My sleep/wake button doesn't work on my iPhone 4 is there any apps I can download to make it sleep
There isn't anything you can do about that except to get the sleep/wake button fixed. It is an integral part of the phone and is used for troubleshooting steps as well. Using a device without one is just waiting for trouble. However, if you want to, you can go to Settings>General>Accessibility and turn on Assistive Touch. Then to lock the phone, tap on the Assistive touch button, tap on Device, then tap on Lock screen.
-
My VGA output using Mini DisplayPort to VGA doesn't work.
Since I upgraded to Mavericks, my VGA output using Mini DisplayPort to VGA doesn't work. When I was using Mountain Lion, as soon as you plugged in the Mini adaopter into the mini display port, the screen would shrink and format to where it would project via a RGB cable to a projector. No such luck since Mavericks! Also, I had a lot of trouble with the DVD player when I tried to play a DVD and project it via a projector. It all worked seamlessly with Mountain Lion. Can anyone help me?
I think if you go to System Preferences >> Displays and Option-click on the "Scaled" radio button, it will show you all of the resolutions that you would have had before under Mountain Lion. I just upgraded to Maverick and my resolution preferences (mirrored on a TV using the Mini DisplayPort to VGA adapter, using 1280x768) were completely reset (my display was no longer mirrored, and the resolution on my main iMac screen became 2560x1440). I found my answer here: https://discussions.apple.com/message/23599645#23599645. Hope that helps.
-
firefox sent an update to my imac but I couldn't download it because it said it came through an email improperly coded or tried to use adobe acrobat and that doesn't work. what do I do??
What to Do When Your iPad Won't Turn On
http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
iOS: Not responding or does not turn on
http://support.apple.com/kb/TS3281
iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
iPad: Basic troubleshooting
http://support.apple.com/kb/TS3274
Update and restore alert messages on iPhone, iPad, and iPod touch
http://www.buybuyla.com/tech/view/012953a0d412000e.shtml
iOS: Resolving update and restore alert messages
http://support.apple.com/kb/TS1275
iPad: Unable to update or restore
http://support.apple.com/kb/ht4097
iTunes: Specific update-and-restore error messages and advanced troubleshooting
http://support.apple.com/kb/TS3694
Cheers, Tom -
I use an online application that doesn't work with FF, but I had been able to use an IE plugin within FF and it worked fine. After the last update (3.6.12), it says plugin is not compatable with version. Help
go to '''TOOLS '''then '''OPTIONS''' then '''ADVANCED''' then '''NETWORK tab''' then '''SETTINGS tab''' and select the options '''NO PROXY''' click '''OK''' and '''OK '''again in the next screen. With that you have disabled the proxy settings.
''if you like to not disable the proxy settings choose'' : '''Auto-detect proxy settings for this network''' (it is in the same session)
thank you
Please mark "Solved" the answer that really solve the problem, to help others with a similar problem. -
Cs4 and w7 use default masks on adjustament doesn't work
Hi
i installed cs4 on a fresh install of w7
and use default masks on adjustament doesn't work
enabled or disabled ,every time i add an adjustamen layer ,photoshop add a blanck white mask
thanks
is there a cure?wrong look the screenshot
i resized the screenshots -
HT1430 How do you turn off your phone if the sleep/wake button doesn't work anymore?
How do you turn off your phone if your sleep/wake button doesn't work anymore?
If a reset doesnt fix it (which it wont - that is likely a hardware issue), then get warranty service.
http://www.apple.com/support/contact/
1-800-MY-APPLE (1-800-692-7753) -
how can i go to DFU mode if my sleep/wake button doesn't work? my phones been stuck on the logo for too long.
You can't. Either get your phone fixed at a third-party repair shop, or go to an Apple store & they will replace your phone for US $199.
-
HT1430 My sleep/wake button doesn't work.
My sleep/wake button doesn't work. I cannot believe that there is no alternate way to reset my ipod? My wifi is not working (it's "greyed out") and one of the restore suggestions involves restarting it.
Just try :
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
iOS: Wi-Fi or Bluetooth settings grayed out or dim
One user reported that placing the iPod in the freezer fixed the problem.
If not successful, an appointment at the Genius Bar of an Apple store is usually in order.
Apple Retail Store - Genius Bar -
I downloaded a ringtone to my phone and it works when I play it but it doesn't work when I assigned it to a contact. Help. I'm using ios 7.
The following guide gives information on how to sync ringtones from your computer to the phone. The reference section at the bottom of the quide also gives instructions on how to convert a song to a ringtone. https://discussions.apple.com/docs/DOC-3792
-
Flashing question mark on start up -Pram reset worked now it's back and pram doesn't work
So the other half has crashed my mid 2012 macbook pro twice in two days (watching youtube). First time I managed to get passed the flashing question mark folder icon using pram reset now this doesn't work and it just goes to that icon. Hard drive is missing in. utility so can't whipe that either
any suggestions on what has failed, it's only 1.5 years old so I'm really disappointedA flashing question mark or globe appears when you start your Mac
Question (?) Mark, Blinking Folder, or Gray Screen at Startup
These are related but not identical issues. Their causes are outlined in Intel-based Mac- Startup sequence and error codes, symbols. Solutions may be found in:
A flashing question mark appears when you start your Mac
Mac OS X- Gray screen appears during startup
In most cases the problems may be caused by one or more of these:
a. Problem with the computer's PRAM - See Resetting your Mac's PRAM and NVRAM.
b. Boot drive's directory has been corrupted - Repair with Disk Utility.
c. Critical system files are damaged or deleted - Reinstall OS X.
d. The disk drive is physically non-functional - Replace the hard drive.
Note that the information I have provided is what Apple recommends, If other users suggest different solutions than found here, then be sure what they recommend does not impact on your warranty, if any, or ability to get continuing Apple service.
Please don't start removing drives or changing cables unless you know what you are doing and have exhausted other non-invasive alternatives outlined here. If you perform any work yourself that is unapproved by Apple, then you will void any warranty you may have and lose all further Apple Support.
Repair the Hard Drive and Permissions
Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
The main difference if you are using Lion or Mountain Lion is that you must first boot from the Recovery HD. Simply boot from the Recovery HD to perform the above.
Reinstall Snow Leopard Without Erasing The drive
1. Repair the Hard Drive and Permissions
Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
2. Reinstall Snow Leopard
If the drive is OK then quit DU and return to the installer. Proceed with reinstalling OS X. Note that the Snow Leopard installer will not erase your drive or disturb your files. After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
Download and install Mac OS X 10.6.8 Update Combo v1.1.
Reinstalling Lion/Mountain Lion Without Erasing The Drive
Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless. -
sound doesn't work (only in firefox). adobe flash player doesn't work correctly, thought it's installed. can't solve the problem. i need Sound.
== This happened ==
Every time Firefox opened
== don't knowWhat does the Adobe test page say?
http://www.adobe.com/software/flash/about/
Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
You can use "Disable all add-ons" on the ''Safe mode'' start window.
You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")
See also [[No sound in Firefox]] and [[Video or audio does not play]] -
My callout toolbar stopped working abruptly. Restarted computer. Still doesn't work - how do I get the tool back?
The tool is called a “callout” note. It places a text box with a leader. It’s been working just fine until suddenly it stopped working and I get an error message saying “desired operation cannot be performed on this object”. It doesn’t matter where I try to place the callout. It simply stopped working. I have tried restarting Acrobat. I have restarted my computer. I have used multiple files to ensure the issue isn’t with a corrupted file. Nothing works. The tool simply stopped working.
Maybe you are looking for
-
Last week, I purchased the pro version of PDF Max and today deleted the free version since I am not using it anymore. I don't what happened or how, this also resulted in missing data on the pro version. I created loads of annotations and notes using
-
Session-failover-enabled not working in iWS6 with a FileStore
I'm trying to use a FileStore to implement session persistence using IWSSessionManager. I have the following in my web-apps.xml: <web-app uri="/Banking" dir="c:/java/online"> <session-manager class='com.iplanet.server.http.session.IWSSessionManager'>
-
How to fix changes in Terminal due to blocked Facebook in Vietnam
Hello, all. I recently went on a trip to Vietnam where access to Facebook is blocked by the government. I googled how to get around the blocks and came across this website: http://www.travelfish.org/blogs/vietnam/2011/05/18/accessing-facebook-in-viet
-
Update Trainin and event via ABAP.
I need to update training and event with external data. Once a month I receive the data in a file. But how can I do this using ABAP? Any good FMs you can recommend? The objects I need to update/create is: Business Event Group, Business Event Type, C
-
I'm just wondering if somewhere on the web there was any site with the ability to simply input a String, and a salt, and have it encrypt it, or enter a String (encrypted) and the salt used and have it decrypt it. I put applet in the title, but I don'