jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Waschkowski" <mwaschkow...@gmail.com>
Subject Re: Problem with RMI, JBOSS reconnect issues, application session getting null
Date Mon, 27 Aug 2007 12:25:09 GMT
Hi Sudhan,

I'm not a jackrabbit dev, just a user, but wanted to let you know my
thoughts since nobody else has responded yet.

The behavior that you have seen is expected given the type of implementation
that jackrabbit has, based on the original spec. IMHO, given the way
jackrabbit is implemented currently, your situation/architecture is
problematic for robust event listening. In jackrabbit 1.x the session that
was used to register an event listener MUST stay open for those event
listeners to work.

  ie. you must keep a listener session open for the lifetime of the
application.

This is obviously a huge problem if a connection is lost, even temporarily,
when there doesn't appear to be any mechanism to reconnect a session. A
confirmation of this from the devs would be appreciated.

This isn't the most robust way to do facilitate observation, an improved
version would involve the jackrabbit system itself managing listeners once
registered (ie. not being bound to a particular session). It looks to me
like the next version of the spec points to this (through journaling),
although the spec is still in development, so we'll have to wait and see.

Of course, if you follow a model - 2 deployment approach, embedding jcr
within the server, then you won't have these kinds of issues.

Sorry that the doesn't appear to be an existing solution to your problem.

Best,

Mark

On 8/23/07, Sudhan <s.kanade@gmail.com> wrote:
>
>
> Hi,
>
> I have an application which runs on JBoss and connects to Jackrabbit
> repository through RMI(We have also deployed jackrabbit - webapp war
> inside
> same instance of JBoss, ie. on local machine). Now my problem starts when
> I
> unplug the network cable and after 5-6 seconds plug it back to the network
> my application Session gets destroyed. This is because i am registering
> Node_Added and Node_Deleted events by implementing
> javax.jcr.observation.EventListener in my application.
>
> I can access the repository through DAVExplorer aswell as our customised
> GUI. Now when i create a new node it gets added to the repository and but
> my
> Class which is implementing EventListener interface is not able to  listen
> to any of these events.
>
> The likely reason seems to me is that, the session it used before
> unplugging
> is no longer available and thus there are no listeners registered after
> unplug. And these behavior does not improve after re-plugging it back.
> Meaning the session object is still null and thus cannot listen to any
> events registered before.
>
> I am using org.springmodules.jcr.JcrSessionFactory to get my session. Now
> can somebody help me in resolving this problem or point me if i am doing
> something wrong.
>
> thanks for your support.
>
> Sudhan
> --
> View this message in context:
> http://www.nabble.com/Problem-with-RMI%2C-JBOSS-reconnect-issues%2C-application-session-getting-null-tf4319183.html#a12299402
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>


-- 
Best,

Mark Waschkowski

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message