You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by yanshaozhiGmail <ya...@gmail.com> on 2009/02/17 06:50:37 UTC
How can I make a event all the time and never be joined backlist.
HI everyone:
how can I set the event's time of timeout , a service often be joined to backlist . however it's important for us how can a handle it?
log as : org.apache.felix.eventadmin EventAdmin: Blacklisting ServiceReference [[org.osgi.service.event.EventHandler] | Bundle(com.gopha.ekm.dms.photo.services [4])] due to timeout!
thanks.
2009-02-17
yanjie
Re: How can I make a event all the time and never be joined backlist.
Posted by Clement Escoffier <cl...@gmail.com>.
On 17.02.2009, at 09:05, Carsten Ziegeler wrote:
> yanshaozhiGmail wrote:
>> HI everyone:
>>
>> how can I set the event's time of timeout , a service often be
>> joined to backlist . however it's important for us how can a handle
>> it?
>> log as : org.apache.felix.eventadmin EventAdmin: Blacklisting
>> ServiceReference [[org.osgi.service.event.EventHandler] |
>> Bundle(com.gopha.ekm.dms.photo.services [4])] due to timeout!
>>
> By default the Felix EventAdmin implementation has a timeout of 5000
> ms.
> Your event handler has to return from the handle event method in this
> time frame. I'm not sure what the best solution is, but we usually
> just
> acknowledge the receive of an event and handle it asynchronously by
> for
> example either starting a background thread in the handle event method
> or by putting the event into a queue which is processed by a running
> background thread.
>
> You can also change the timeout value for the Felix event admin
> implementation by setting the property to a corresponding value:
> org.apache.felix.eventadmin.Timeout
>
>
> See here for how to see properties:
> http://felix.apache.org/site/apache-felix-usage-documentation.html#ApacheFelixUsageDocumentation-configuringfelix
>
> (If you're using Sling, you can also add this property to the
> sling.properties file).
An other way is to create a processing thread that process events.
So, when a data is received, you just add the event into a list and
notify the thread. So, you don't process the event in the event admin
thread and so you will not be blacklisted. This way avoid setting an
arbitrary time.
Regards,
Clement
>
>
> HTH
> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How can I make a event all the time and never be joined backlist.
Posted by Carsten Ziegeler <cz...@apache.org>.
yanshaozhiGmail wrote:
> HI everyone:
>
> how can I set the event's time of timeout , a service often be joined to backlist . however it's important for us how can a handle it?
> log as : org.apache.felix.eventadmin EventAdmin: Blacklisting ServiceReference [[org.osgi.service.event.EventHandler] | Bundle(com.gopha.ekm.dms.photo.services [4])] due to timeout!
>
By default the Felix EventAdmin implementation has a timeout of 5000 ms.
Your event handler has to return from the handle event method in this
time frame. I'm not sure what the best solution is, but we usually just
acknowledge the receive of an event and handle it asynchronously by for
example either starting a background thread in the handle event method
or by putting the event into a queue which is processed by a running
background thread.
You can also change the timeout value for the Felix event admin
implementation by setting the property to a corresponding value:
org.apache.felix.eventadmin.Timeout
See here for how to see properties:
http://felix.apache.org/site/apache-felix-usage-documentation.html#ApacheFelixUsageDocumentation-configuringfelix
(If you're using Sling, you can also add this property to the
sling.properties file).
HTH
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How can I make a event all the time and never be joined backlist.
Posted by Karl Pauls <ka...@gmail.com>.
Just start felix with:
-Dorg.apache.felix.eventadmin.Timeout=0
regards,
Karl
On Tue, Feb 17, 2009 at 6:50 AM, yanshaozhiGmail
<ya...@gmail.com> wrote:
> HI everyone:
>
> how can I set the event's time of timeout , a service often be joined to backlist . however it's important for us how can a handle it?
> log as : org.apache.felix.eventadmin EventAdmin: Blacklisting ServiceReference [[org.osgi.service.event.EventHandler] | Bundle(com.gopha.ekm.dms.photo.services [4])] due to timeout!
>
> thanks.
>
> 2009-02-17
>
>
>
> yanjie
>
--
Karl Pauls
karlpauls@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org