If you really want to wait for the operation to complete, then you
shouldn't be doing it on a separate thread. Just do it in your activator
stop() method with the calling thread or have the calling thread wait
for your other thread.
-> richard
On 9/16/10 4:22, Christopher Brind wrote:
I believe the standard Felix launcher calls System.exit after the framework
bundle stops, which of course does not care if there are non-daemon threads
or otherwise.
See this page for info:
http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
You could create a custom launcher or create a controller bundle which is
responsible for shutting down the framework by calling stop on the bundles
that need time to shutdown gracefully and then when they're finished calls
shutdown on bundle 0 as normal.
I'd probably go with the latter as you might not be sure what other bundles
are creating non-daemon threads which will prevent your container from
shutting down at all.
Cheers,
Chris
On 16 September 2010 12:01, Damian Minkov<[email protected]>wrote:
Hi,
I'm currently looking at a problem in sip-communicator on shutting
down. To shut down we stop bundle with id 0. But in some of our
bundles we need to do some stuff which involves network operations,
and so we create a non daemon Thread in order to do it. But just a
little after the Thread is created and started the application exits
and don't finish all the operations.
Any ideas why this happen or just am I missing some configuration?
Thanks
damencho
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]