You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Dirk Högemann <di...@googlemail.com> on 2012/07/27 19:59:59 UTC

EventListener

Hi,

I am trying to write an EventListener for jackrabbit2.2.
The connection is done via RMI:

HashMap<String, String> params = new HashMap<String, String>();

params.put(JcrUtils.REPOSITORY_URI,"rmi://localhost:1099/hipporepository");
    repository = JcrUtils.getRepository(params);


The eventlistener should be able to receive Events from ongoing work with
the repository.
But in addition it should be possible to start with events in the past.

I tried this with the following code:

      ObservationManager observationManager =
session.getWorkspace().getObservationManager();
      EventJournal journal = observationManager.getEventJournal();
      journal.skipTo(System.currentTimeMillis() - 30000);

Unfortunately the getEventJournal() Method is not implemented and throws an
UnsupportedRepositoryOperationException.

Code in the corresponding Class: ClientObservationManager:
    public EventJournal getEventJournal() throws RepositoryException {
        throw new UnsupportedRepositoryOperationException("TODO:
JCRRMI-26");
    }


Is there another way to get this job done, or can someone give me advice
how to implement that method?

Best
Dirk Högemann