i have this in my code:
private ThreadLocal<Session> session = new ThreadLocal<Session>();
protected Session getSession() throws LoginException,
RepositoryException {
if (session.get() == null) {
Session session = repository.login(new
SimpleCredentials("admin", "admin".toCharArray()));
this.session.set(session);
}
return session.get();
}
ObservationManager observationManager =
getSession().getWorkspace().getObservationManager();
observationManager.addEventListener(eventListener,
Event.PROPERTY_CHANGED, "/content/servicemix/config", true, null, null,
false);
public class ConfigEventListener implements EventListener {
public void onEvent(EventIterator event) {
LOG.debug("event! change configuration");
try {
marshaler = getMarshaler();
} catch (PathNotFoundException e) {
e.printStackTrace();
} catch (LoginException e) {
e.printStackTrace();
} catch (RepositoryException e) {
e.printStackTrace();
}
}
}
but if i change property in /content/servicemix/config node (over POST
request) method onEvent is not called..
Do you know, where can be problem ?
thanks
--
/**************************************/
Best regards / S pozdravem
Vladislav Krejčiřík
http://www.vkrejcirik.info