Static initializers get called over and over?
I have a java web application running on resin. I don't know why but from time to time my class files suddenly get reloaded. I can notice from my log files that static initializers get called over and over again, which is causing me problems. How can this happen? Any settings I should fix? Anyone has similar problems?
ram, thank you very much for your reply.
I'm sure this problem doesn't always happen.
I have a static initializer in a different
application on a different resin server but it never
initializes over and over.
There must be some settings I can change to make it
not to initialize more than once.I concur with Ram on this one. Having static initializers in container managed apps can be very dangerous if you need to make sure that it is initialized exactly once. I've seen problems like this happen on several vendor's Containers. A safer approach could be to store these values in your container's Application-scope. This way, you not only ensure that these values are initialized exactly once, but that the value will be available to all JVM's running should this app be deployed in a clustered environment.
Similar Messages
-
Canvas paint never gets called - Repaint and ServiceRepaints.
I have a problem that My Canvas never gets Drawn or the Image never gets Displayed;
I am not sure if there is a DeadLock or If there is nothing to be painted,
but when I enable the Debugger I notice that it never enters the paint method. ( I call Repaint and ServiceRepaints)
If however I make the thread that calls setImage external to my Canvas Class the images do get Displayed.
//Create the Canvas Class, Start Thread Display Canvas
frame = new ImageCanvas();
frame.addCommand(exitCommand);
frame.addCommand(backCommand);
frame.setCommandListener(this);
frame.start();
display.setCurrent(frame);
//Display Image
public class ImageCanvas extends Canvas implements Runnable {
protected void paint(Graphics g) {
g.drawImage(offscreen, Constants.XPOS, Constants.YPOS, Graphics.LEFT | Graphics.TOP);
private void setImage(Image img, String title) {
this.setTitle(title);
offscreen = img;
repaint();
serviceRepaints();
public void run() {
while(true){
if (Constants.IMGLOCK != null) {
synchronized (Constants.IMGLOCK) {
setImage(Constants.IMAGE, title);
Constants.IMGLOCK.setLockBoolValue(false);
image_created = true;
} else {
Constants.IMGLOCK.wait(10);
}I found the BUG, But do not understand Why this is Needed to add,
the Canvas every Time to the Display.
Can someone please Explain ???
private void setImage(Image img, String title) {
this.setTitle(title);
offscreen = img;
repaint();
display.setCurrent(this); //<<<<<<WHY ????
serviceRepaints();
} -
Validators getting called multiple times?
I am working on a project where were we have used BackingBean validators for an input text component.
When I first submit, the validator method getting called once, when I submit again, its getting called twice, and it goes on. After clearing the session, the validator getting called once, then twice, ...
I don't know why this happens. Can any help me with this? What could be reasons for this weird behavior? What might went wrong in our code.An SSCCE please.
-
I have the iPhone 5 and I keep getting a no sim card message. I have had my phone for over a year now so I know I have a sim card. How can I fix this because it doesn't let me get calls now.
Try resetting the phone. Hold the home and power lock button until the Apple logo appears.If that does not work, turn the phone off and take the SIM out and then put it back in.
If that still does not work, you may have a defective SIM, in which case you will need a new one from your carrier. -
I cant get my ipad to play movies AVI i have downloaded an App called PlayerX, and it transfers the movies over to the ipad but doesn't play them, what to do??
Have you contacted app support or maybe view this video from the website? Are you trying to play them within the app itself? Did you double tap on the video that you want to watch?
http://playerx.pentaloop.com/help/ -
Header and footer of RTF template not getting carried over to Excel output
We have Header and Footer in RTF template defined. The output of the report will be in Excel. When we run the report, the header and footer on the report are not getting carried over to excel has header and footer, instead the header and footer are printed as first line on the excel. Also, the RTF template is set to landscape but when the output is generated in excel, it is set to Portrait
hi..
chk this presentation...
http://csc-studentweb.lrc.edu/swp/Berg/articles/NW2004s_what_is_new.ppt#352,3,Why NW 2004s?
http://www.sap-hefte.de/download/dateien/1090/086_leseprobe.pdf'
hope this helps... -
My kids use my apple id for their ipods. Now I'm getting an ipad and wondering if I should get a new id (they don't want to start over). Can we share the id (my email address) but not have to see each other's apps, contacts, etc? I'd rather share I think, but don't want to create a nightmare for myself. Also, I already have a kindle app (with purchased content) for my computer - does getting a new id for itunes change my ability to access my kindle account on my ipad? Thanks!
So first I'd say that it's not a good idea to start a new apple id if you have a large purchase history. You may not transfer purchases between apple IDs. You should consider some other options listed here http://support.apple.com/kb/HE37 Primarily the option where you or your children have seperate icloud accounts/email accounts that sync their contacts apart from yours. You may use your apple ID for purchases and use a different one for icloud/email/etc.
-
I have an I phone 3g and I downloaded the newest software and I can't get any music to play. I can't change my playlists and the songs I have on the phone just get skipped over. What can I do to correct this?
it recognizes the iPOD but I can't get any of the new songs to import to the iPOD
are you getting an error message, Odessa? if so, what does it say? include error message numbers if you're getting any.
if you're not getting an error message, describe what happens when you try to transfer songs to the ipod as best you can. -
I have a Macbook Pro that I have just renewed and transferred over my old hard drive (also from a Macbook Pro). Now when I turn on the computer and ITunes opens I get error (-50) and then error 5002 when I try to sign in to ITunes Store - Help!
My dealer has tried and failed (twice) to correct this and I have tried deleting the two items in the Itunes folder but no luck!were you able to get help on this? I need help on error 5002 as well. thank you
-
I had an HP laptop. Just bought a Mac Pro and want to get my music and photos moved over. Can't I just open my I tunes in my new laptop and then connect my Iphone or I pod and sync my music into my I tunes?
Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
-
I have purchased 9 songs on I tune and cannot get them over to my IPOD play list----I have tried to sync them like the old times I have tried dropping them into my IPOD wont take. Can someone explain how I can get these new songs onto my IPOD and out of my purchase list
Do you have the Convert higher bit rate songs to 128 Kbps AAC option ticked from under the iPod's Summary tab in iTunes?
If so, disable it and then click the Apply button in the lower right hand corner to apply the changes to your device.
B-rock -
I bought a new iPhone 6 and switched carriers and am trying to get my voicemail and instant messages ported over to the new phone
Restore from your backup. For voicemail contact your cell phone provider.
-
Why am I getting a red and blue haze over my oil paint filter effect in photoshop cs6?
Why am I getting a red and blue haze over my oil paint filter effect in photoshop cs6? I am currently using a trial version.
The last time someone reported this problem with Oil paint, the fix was to go Preferences (Ctrl k) > Performance and set the cache levels to something other than '1'. If you cache levels were not previously set to 1 then we'll need to think again.
-
I cannot get my bookmarks and reading lists to sync over my devices. I've checked the iCloud settings on both devices and still nothing. Using a retina iPad and a new mac book pro
Welcome to the Apple Community.
In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > store, scroll down and tap your ID) -
Hi all new here, am just learning and when i activate the dodge or burn symbol i click over the area to be worked and my Mac freezes. only in the elements software. if i go out of elements i cannot get back in and have to force a software close, any suggestions and please help
Please post Photoshop Elements related queries over at
http://forums.adobe.com/community/photoshop_elements
Maybe you are looking for
-
Hi guys, It's official ... the next MacLearning.org webcast (September 24th at 10:00 AM PDT) is going to be all about iTunes U and Woolamaloo. I'll be presenting, along with Apple's own Miguel Young. I'll send more detail later ... but the date, time
-
How to add new driver to create master repository database
Dear All, i want to creade ODI Repositroy Database on SQL SERVER, when i click the driver button in "Create Repository Wizard" the only driver i found for sql serve ris just able to connect to sql server 2000 i got a driver written by microsoft to co
-
I have an AP Extreme (802.11n) that has 4 AP Express"Extending" the wireless network in 802.11n(b/g compatibility mode). My main purpose for this is streaming music to the APExpress units that are in various areas around my house. Is there any additi
-
Purchase order row basecard column number
hi any one help me what is purchase order row basecard column number. Thanks & Best Regards B.Lakshmi narayanan
-
Can anyone offer help using CS4 as external editor for iPhoto '08?
I am very new to CS4 Extended, having upgraded from Elements 6 recently. I use iPhoto '08 to do all my photo organization and really enjoy it, have a LOT of work invested in it and don't really want to switch to anything else if I can help it. One