ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | January 2006 Index

<--  Date Index  --> <--  Thread Index  -->

RE: [oscar] OSCAR shutdown...

Oscar's constructor can take a List of activator instances from the host 
application; these are just instances of classes that implement the 
BundleActivator interface.

When Oscar starts up, all passed in activators are activated when the sysem 
bundle starts: they effectively become part of the system bundle, since they 
receive the system bundle' bundle context.

So, just create one that has a shutdown method that will call stop on the 
system bundle (i.e., bundle 0) and pass it into Oscar's constructor. In your 
habdler, just call the shutdown method on your custom activator and you are 

-> richard

-----Original Message-----

From:  "Ence, David" <david.ence@xxxxxxxx>
Subj:  RE: [oscar] OSCAR shutdown...
Date:  Tue 24. Jan 2006 11:21 am
Size:  1K
To:  Oscar@xxxxxxxxxxxxx

That is exactly what I am looking for. Would you please provide me with
some more details. I am pretty new to OSCAR and need a bit of direction.
:-) Thanks.


-----Original Message-----
From: heavy@xxxxxxxxxxxxxx [mailto:heavy@xxxxxxxxxxxxxx] 
Sent: Tuesday, January 24, 2006 8:18 AM
To: Ence, David
Cc: Oscar@xxxxxxxxxxxxx
Subject: RE: [oscar] OSCAR shutdown...

No, that is not the case. However, there is a shutdown() method on Oscar
that could be called in the handler...unless it is not public. In that
case, you could always pass in a custom activator into Oscar's
constructor that you could use to do a stop() on the System Bundle in
your handler.

-> richard

-----Original Message-----

From:  "Ence, David" <david.ence@xxxxxxxx>
Subj:  RE: [oscar] OSCAR shutdown...
Date:  Tue 24. Jan 2006 11:03 am
Size:  764 bytes
To:  oscar@xxxxxxxxxxxxx


Is this really the case? 

When I hit Ctrl-C, I don't see my application logging I usually see when
I shutdown from the prompt...


-----Original Message-----
From: Niclas Hedhman [mailto:hedhman@xxxxxxxxx] On Behalf Of Niclas
Sent: Monday, January 23, 2006 7:07 PM
To: oscar@xxxxxxxxxxxxx
Subject: Re: [oscar] OSCAR shutdown...

On Tuesday 24 January 2006 08:57, Ence, David wrote:
> Is there a way that I can catch a TERM signal and tell oscar to 
> shutdown gracefully? I know how to attach a shutdown hook to the VM, 
> but I don't know what to invoke on OSCAR to ask it to shutdown.

AFAIU, that is already the case. Ctrl-C == TERM and the JVM shutdown
hook is capturing that, which Oscar use for graceful shutdowns.


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.