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

Maybe you are looking for

  • It's official: 9/24 MacL webcast, iTU/Woolamaloo (and YOUR tool too!)

    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

  • Limit of Streaming AP's

    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