commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Lo Pumo <alop...@movia.biz>
Subject Can init() be called more than once in a single JVM session?
Date Mon, 23 Oct 2017 09:56:04 GMT
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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message