jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: RMI Observation
Date Thu, 29 Nov 2007 20:24:56 GMT

Not sure, what you are trying to accomplish. From your description it
seems something like this:

   class MyThread extends Thread {
      public void run() {
          // register listener

If this is so, it is expected behaviour :-) You register the listener
and then the events are dispatched to the onEvent method is called
asynchronously. What you would want to do is something like this:

    class MyListener implements EventListener {
        void start() {
            // register listener
        void stop() {
            // unregister listener
        public void onEvent(EventIterator events) {


Am Donnerstag, den 29.11.2007, 11:22 -0800 schrieb qcfireball:
> I noticed that when registering a new Observer via RMI, if I do not provide a
> "thread trick" the Thread immediately dies, and the Observer with it.
> Basically I am synchronizing on an arbitrary Object, then calling 'wait'. 
> Not a very nice solution, but it works for now.  Seems like a hack to me.
> I guess it makes sense that the Thread would immediately die without some
> kind of effert.  I am wondering how other people are making sure that their
> Observer does not die?  Are there ways that are preferred over others?
> Is this behavior going to be the same when registering an Observer within a
> web container, directly using the Jackrabbit API's?

View raw message