Search code examples
javaevent-handlingosgiapache-felix

Apache felix blocked an event - how to remove it?


I've got an EventHandler, which is fired on some event. From time to time that event is blocked by Apache Felix (or OSGi container itself). Is there a way to "unblock" that event?

By "blocked" I mean that my event handler is not fired. I'm sure that event was fired, but my event handler didn't do it's logic. I assume that this is a safety feature, but maybe somehow I can change something in OSGi configuration to never block my events?

Cheers


Solution

  • The answer is here: http://felix.apache.org/documentation/subprojects/apache-felix-event-admin.html

    There are two properties which controls the timeout. First one

    org.apache.felix.eventadmin.Timeout
    

    Controls the timout time (time after which the event will be blocked, if event processing will reach the timeout value). If set to 100, it disables the timeout for all events,

    Property

    org.apache.felix.eventadmin.IgnoreTimeout
    

    Configure event handlers to be called without a timeout.

    Both properties can be set on EventAdmin service or in framework properties file.