jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AElsher...@idc.com
Subject Jackrabbit Observation with Spring
Date Tue, 02 Feb 2010 10:04:26 GMT
Hi All,

I am new to observation, although the repository supports observation, 
onEvent() is never invocked. Here're the details:

I created a Param class, and it's just a POJO with setters and getters 
hasing properties that each represents a parameter for: 
ObservationManager.addEventListener()

I careted an interface XListener that extends EventListener, and defined a 
method: Params getParameters().

Crated MyEventListener implements XListener and implements the 
getParameters() and onEvent()
getParameters() just populate a Param object (with NODE_ADDED) and return 
it to be used later to add *this* listener,
and onEvent() currently it only prints out that NEW NODE ADDED.

Then created a new class ListenerRigistrar and added it in the 
applicationContext.xml for Spring with a <constructor-arg> which is a set 
of XListeners.
Added a new bean for MyEventListener.

back to ListenerRegistrar, I iterate over the set of listeners and use the 
Params object embeded with the listener to call 
ObservationManager.addEventListener()

The problem is that the message NEW NODE ADDED is never been printed means 
onEvent() method is never invocked!!

Can anyone help me please?

Thank you in advance,
shre3y


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message