You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by anjan <po...@gmail.com> on 2013/09/03 16:02:28 UTC

Event Handler not called

I have created an event handler to listen to the Event Topic
org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED.  It is working
fine as expected.  But today I noticed that the event handler is not
called(verified through Debug) when I am adding resources.  I don't see any
exceptions in the logs.  From the Sling console, I can see that the Event is
generated successfully.  So I am not sure why the registered event handler
is not called.

After I restarted the server, the event handler is called again.  What could
be the reason for this behavior?  Any pointers.



--
View this message in context: http://apache-sling.73963.n3.nabble.com/Event-Handler-not-called-tp4026649.html
Sent from the Sling - Users mailing list archive at Nabble.com.

Re: Event Handler not called

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Sep 4, 2013 at 7:53 AM, anjan <po...@gmail.com> wrote:
> ...I guess the options could be to increase the
> Timeout or configuring the event listener in "Ignore Timeouts" parameter....

Writing your event handlers so they always execute quickly is much
better - I usually just "take note" of what's to be done in a handler,
and do the actual work elsewhere.

-Bertrand

Re: Event Handler not called

Posted by anjan <po...@gmail.com>.
Thanks Bertrand for the clue.  I guess the options could be to increase the
Timeout or configuring the event listener in "Ignore Timeouts" parameter.



--
View this message in context: http://apache-sling.73963.n3.nabble.com/Event-Handler-not-called-tp4026649p4026685.html
Sent from the Sling - Users mailing list archive at Nabble.com.

Re: Event Handler not called

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Tue, Sep 3, 2013 at 4:02 PM, anjan <po...@gmail.com> wrote:
> ...I noticed that the event handler is not
> called(verified through Debug) when I am adding resources...

> ...After I restarted the server, the event handler is called again...

your event handler might have been blacklisted, if it took too long to
process events (which stopping in debugger will also trigger IIRC) -
search "blacklist" in
http://felix.apache.org/site/apache-felix-event-admin.html for more
info.

-Bertrand