You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by 祝乃庆 <di...@gmail.com> on 2009/07/21 16:05:09 UTC
about remote jcr
hi,everyone
when i use jackrabbit-jcr-rmi.jar to setup an remote respository.
how can i to set up a remote listener to listener server event.
give me some hints,thx.
--
>From Disller Zhu
Re: about remote jcr
Posted by 祝乃庆 <di...@gmail.com>.
I will try it.
thx.
On Wed, Jul 22, 2009 at 3:07 AM, Alexander Klimetschek <ak...@day.com>wrote:
> On Tue, Jul 21, 2009 at 6:31 PM, 祝乃庆<di...@gmail.com> wrote:
> > I have a problem about multi-client .
> > I have read the soure ,when i export an ServerObservationManager to
> > JNDI,there is just one queue in Server,and client poll the event by
> getting
> > first elements,and fire client event by listenerId.there is a doubting:
> > How can i get events each client is interesting in?
>
> I am not sure if I understand you. Do you mean that you looked at the
> source of the RMI observation implementation and came to the
> conclusion that it would not work if there are multiple RMI clients?
> Because there is only one queue?
>
> I think the implementation is correct, as there would be multiple
> event listeners registered in case of multiple clients and hence the
> repository would create multiple events for the same source, for each
> event listener. But I don't know the details of the implementation.
>
> If you only looked at the source so far, please test it if it works
> for your scenario. If you see an actual issue, please file a JIRA
> issue at http://issues.apache.org/jira/browse/JCRRMI
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>
--
>From Disller Zhu
Re: about remote jcr
Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Jul 21, 2009 at 6:31 PM, 祝乃庆<di...@gmail.com> wrote:
> I have a problem about multi-client .
> I have read the soure ,when i export an ServerObservationManager to
> JNDI,there is just one queue in Server,and client poll the event by getting
> first elements,and fire client event by listenerId.there is a doubting:
> How can i get events each client is interesting in?
I am not sure if I understand you. Do you mean that you looked at the
source of the RMI observation implementation and came to the
conclusion that it would not work if there are multiple RMI clients?
Because there is only one queue?
I think the implementation is correct, as there would be multiple
event listeners registered in case of multiple clients and hence the
repository would create multiple events for the same source, for each
event listener. But I don't know the details of the implementation.
If you only looked at the source so far, please test it if it works
for your scenario. If you see an actual issue, please file a JIRA
issue at http://issues.apache.org/jira/browse/JCRRMI
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: about remote jcr
Posted by 祝乃庆 <di...@gmail.com>.
I have a problem about multi-client .
I have read the soure ,when i export an ServerObservationManager to
JNDI,there is just one queue in Server,and client poll the event by getting
first elements,and fire client event by listenerId.there is a doubting:
How can i get events each client is interesting in?
thx.
On Tue, Jul 21, 2009 at 10:42 PM, Alexander Klimetschek <ak...@day.com>wrote:
> On Tue, Jul 21, 2009 at 4:05 PM, 祝乃庆<di...@gmail.com> wrote:
> > hi,everyone
> >
> > when i use jackrabbit-jcr-rmi.jar to setup an remote respository.
> > how can i to set up a remote listener to listener server event.
>
> Support for that is implemented in the RMI jar. Just do normal JCR
> observation manager registration, internally the
> ClientObservationManager will poll the server for events, but this is
> transparent to the API user. The only thing to note is that you have
> to keep the JCR session open as long as you want to receive events and
> that you need to make sure your client JVM does not terminate, because
> the thread that does the polling in the background will not block
> system exit AFAIK.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>
--
>From Disller Zhu
Re: about remote jcr
Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Jul 21, 2009 at 4:05 PM, 祝乃庆<di...@gmail.com> wrote:
> hi,everyone
>
> when i use jackrabbit-jcr-rmi.jar to setup an remote respository.
> how can i to set up a remote listener to listener server event.
Support for that is implemented in the RMI jar. Just do normal JCR
observation manager registration, internally the
ClientObservationManager will poll the server for events, but this is
transparent to the API user. The only thing to note is that you have
to keep the JCR session open as long as you want to receive events and
that you need to make sure your client JVM does not terminate, because
the thread that does the polling in the background will not block
system exit AFAIK.
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com