Calvin,

There is no explicit way to stop Jeremie today : the only way to stop it
gracefully is to unexport all exported objects... I suppose this is not
something you want to do !

A Jeremie application is maintained alive through some specific threads
launched by different services. These are the only non-daemon threads started
by the infrastructure. Gracefully stopping a Jeremie application requires
stopping these threads (not with a stop() call, but with a wait/notify
mechanism). Unfortunately, these threads are not centralized in some platform
service. Doing this is not a big problem. If you are not afraid to patch
Jonathan, you may want to have a look yourself at
org.objectweb.jonathan.libs.contexts.moa.MinimalAdapter and
org.objectweb.jonathan.libs.contexts.soa.SingleOAdapter and see how to stop
the "waiter" threads. Otherwise, I put your suggestion on the wish list, and I
try to implement it before the next Jonas release.

Best regards,

Bruno



Calvin Varney wrote:

> hi,
>
> I'm trying to develop a simple wrapper for Jeremie allowing it to be run as
> an NT service along with Jonas using JNT.
>
> Using JNT I cannot stop Jeremie by simply killing the jvm as done from the
> command line by pressing ctrl-c. Instead JNT calls a method in the wrapper
> class (in my case stopJeremie()) that is expected to "gracefully" end
> Jeremie.
>
> So far I've implemented the following wrapper class:
>
> import org.objectweb.jeremie.libs.services.registry.JRMIRegistry;
>
> public class JeremieWrapper {
>
>   static Thread jeremieThread;
>
>   public static void main(String[] args) {
>     jeremieThread = Thread.currentThread();
>
>     // start Jeremie
>     JRMIRegistry.main(args);
>   }
>
>   public static void stopJeremie() {
>     // deprecated method
>     jeremieThread.stop();
>   }
>
> }
>
> This is working fine however I note stop() is a deprecated and not
> recommended.Oddly enough System.exit(0) did not work as I expected in its
> place. Are there any better ways to stop Jeremie?
>
> Thanks for the help,
> Calvin.
>
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonathan".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
begin:vcard 
n:Dumant;Bruno 
tel;cell:06 75 20 76 64
tel;fax:33 1 49 26 09 76
tel;work:33 1 42 44 40 74
x-mozilla-html:FALSE
url:www.kelua.com
org:Kelua SA
adr:;;55 rue Sainte Anne;Paris;;75002;France
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;1
fn:Bruno Dumant
end:vcard

Reply via email to