Bruno, thanks for the info.

I now understand what's going on but still have a lot to learn before I
could provide such a patch for Jonathan, hence are happy for this suggestion
to wait on the wish-list. Would give it a low "nice-to-have" priority though
as the current workaround of using Thread.stop() gets the job done.

I understand Thread.stop() is considered evil because it can leave the jvm
in an inconsistent state. As we are killing the main thread and the jvm
process terminates immediately afterwards this is of little consequence.

----- Original Message -----
From: "Bruno Dumant" <[EMAIL PROTECTED]>
To: "Calvin Varney" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 12:52 AM
Subject: Re: Stopping Jeremie


>
> 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".
>

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".

Reply via email to