On Wed, Sep 3, 2008 at 8:08 AM, Felix Meschberger <[EMAIL PROTECTED]> wrote:

> 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.

I brought this up a year ago, and I think the response then was that
it is the Log service responsibilty to deliver Events to Event Admin
if one is present. Not doing so is a bug in the Sling implementaton.

> 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.

Which means that this is also a bug in this implementation of the
Event Admin service.

> 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".

I have missed this paragraph. To me it is clear that the post() call
must happen in separate thread, and that the Log service in reality
just hands over the LogEvent to such worker thread, which does the
rest of the processing. Exactl details I presume is a implementation
detail.

> 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.

This I have to read again when I am a bit more awake... ;o)

> 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 ?

Well, the assumption is that there is a bug in Apache Sling's
implementation. And you shouldn't be registering a Log listener at
all, which is another bug.

Cheers
Niclas
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to