Hi Alex,

Thanks a lot for your reply.

Well, at the begining I configured the listeners with the sessionFactory bean in the spring's applicationContext.xml.
Then I installed jackrabbit-jca on jboss, and I don't know how to configure spring to obtain the session(hope if you can help me in this it will be perfect because I'd like to use spring to look after all that stuff although I know it's not the point to talk about here), so I created my own class that has getSession() and registerListeners() methods.

I also created ObservationUtil.java class to registerListener() and check isRegisteredListener().

And because I don't want to configure all listeners with all their properties in one place, I did the following:

1. Created an EventListenerPropertiesclass which is just a POJO with all properties needed for the observationManager() method.
2. Created a CustomEventListener interface that extends the EventListener interface and has some extra methods, for now the important method to mention here is buildEventListenerProperties() method that need to be implemented by sub classes so that each CustomEventListener implementation will have its own properties embedded.
3. Created MyNodeAddedListener1and MyNodeAddedListener2 that implements the CustomEventListener interface.

Please find here with attached the code each in a separate file.