Can init() be called more than once in a single JVM session?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Can init() be called more than once in a single JVM session?

Andrea Lo Pumo
Since now, I have always assumed that init() is called once, and no
more. Now I am not sure anymore. My doubt is that init() can be called
a second time, after destroy() has been called, for example, if the
program is restarted by Jsvc. Is this so? If yes, I should use a
static variable "alreadyInitialized" and do nothing in init() if it is
true, at least for things that have not to be done more than once.

A second question: when does Jsvc restart the program exactly? If I
kill the program, or use -stop. It simply stop()s and destroy()s and
exits. I have been able to simulate a restart using System.exit(123).
Are there other cases when Jsvc restarts the program?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]