Hi all, In our application we noticed, that on each invocation of a LogService.log method the log event is immediately handled by the EventAdmin to post the Event asynchronously. This means, that the EventAdmin EventHandler list for the log event is evaluated during the call to the LogService.log method. The problem is, that this evaluation may block the LogService.log call, which should IMHO return as fast as possible.
The concrete implementation of the LogService is the Apache Sling Log Bundle, which does not call the EventAdmin itself but only calls the registered LogListeners. The implementation of the EventAdmin Service is the Apache Felix EventAdmin which in turn registers a LogListener to get log events and calls EventAdmin.post to send them to registered handlers asynchronosly. According to Section 101.6.4, Log Events, of the compendium spec, the interaction with EventAdmin is stated as "Log events must be delivered to the Event Admin service asynchronously". According to Section 113.7.2, Asynchronous Event Delivery, asynchronous events are delivered asynchronously but the list of handlers has to be built during the call to the EventAdmin.post method. My interpretation of Section 101.6.4 is, that the EventAdmin.post or EventAdmin.send method must not be called during the LogService.log call but asynchronously, i.e. in a separate thread. On the other hand it is not stated whether the event should be delivered asynchronously or synchronously from this separate thread. Is this assumption correct ? TIA for any help. Regards Felix _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
