jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudhan <s.kan...@gmail.com>
Subject Re: Problem with RMI, JBOSS reconnect issues, application session getting null
Date Tue, 28 Aug 2007 20:27:18 GMT

Hi Mark,

Thank you very much for your detailed response. I counld'nt check your reply
because i was out for last couple of days. Hope these issue is addressed in
the next specification release. 

But there is some good news about session dropping upon network
disconnection. With the help of my co-workers we are now able to get pass
this issue by performing -Djava.rmi.server.hostname=127.0.0.1

I modified JBoss/bin/run.bat and appended the bat file. And to my luck it is
working perfectly now. We do not have any issues of unpluggability now.

Reference :
http://java.sun.com/javase/6/docs/platform/rmi/spec/rmi-properties2.html

So yaa this is just a hack or say some sort of workaround. But there should
be some mechanism to handle session timeouts.

Anyways, Mark thanks for your reply.

-- Sudhan

Mark Waschkowski wrote:
> 
> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-RMI%2C-JBOSS-reconnect-issues%2C-application-session-getting-null-tf4319183.html#a12375319
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message