|
From: Marcin W. <mwa...@su...> - 2007-10-22 12:33:31
|
Leif Mortenson wrote:
> Marcin,
> Without using the wrapper, many applications launch a second JVM
> instance simply to trigger the shutdown of the first. This is usually
> done by deleting an anchor file or sending a command via a socket.
> The wrapper makes this much lighter by running this shutdown
> code in the same JVM.
Yes, and this is OK! :)
>
> Are you having problems running the shudown class in the same
> JVM?
Yes, in case of Geronimo it result with IllegalStateException.
In "start" class we have execution of:
KernelRegistry.registerKernel("MainBootstrapper");
and in "stop" class we have execution of the same:
KernelRegistry.registerKernel("MainBootstrapper");
which in "stop" class result with
java.lang.IllegalStateException: A kernel is already running this
kernel
You can see discusion about it here:
http://www.mail-archive.com/us...@ge.../msg07665.html
Result of discussion is that it is *intended* to run shutdown class in a
different vm. It means that second integration method can not be used
(only first can be used) for Geronimo.
Of course the best solution is to modify Geronimo shutdown class. But
first I decided to ask You if it is posible to do some trick to make it
works in second integration method ;)
I'm *not* trying to tell you that it's worth to implement calling "stop"
class in different vm in JSW. Definitely I think that this is *not*
worth for this single case :) I'm just asking for some trick which meybe
is implemented already ;)
Regards, Marcin
|