felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: How to handle "java.lang.IllegalStateException: The EventAdmin is stopped" during shutdown
Date Wed, 05 Jan 2011 10:49:16 GMT
Hi,

which version of the event admin are you using? And can you post all
exception stack traces you see?


Thanks
Carsten

Alexander Broekhuis  wrote
> Hello,
> 
> I also see the following exception:
> 
> WARNING: EventAdmin: Exception: java.lang.InterruptedException
> (java.lang.InterruptedException)
> java.lang.InterruptedException
> 	at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.offer(Unknown Source)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(Unknown Source)
> 	at org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool.executeTask(DefaultThreadPool.java:110)
> 	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:223)
> 	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Thread.java:680)
> 
> 
> On 5 January 2011 08:28, Alexander Broekhuis <a.broekhuis@gmail.com> wrote:
>> Hi all,
>>
>> In my project I am upgrading Felix (1.0.3) and the EventAdmin (1.0.0)
>> to the latest version, and now during shutdown (using the shutdownhook
>> and ctrl-c), I get an IllegalStateException indicating the eventadmin
>> is stopped.
>> The exception is thrown when trying to send events during shutdown.
>> Somehow I expected the framework to deregister the EventAdmin service
>> before actually stopping it, so the client wouldn't be able to use it
>> anymore. Now the service is still available, but the actual behavior
>> isn't.
>> This exception blocks the shutdown, and the only way to stop the
>> process is by killing it.
>>
>> How should I handle this case? Do I have to catch an
>> IllegalStateException at all sendEvent call's?
>>
>> --
>> With kind regards,
>>
>> Alexander Broekhuis
>>
> 
> 
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message