jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Anescu" <mane...@totalsoft.ro>
Subject RE: JBoss JTA transaction timeout
Date Mon, 02 Jul 2007 11:52:52 GMT
Yes, I got it.
I modified my code, so I create a session attribute and init that one, and I test before doing
the repo.login() to see if I don't have an active session. 
I cannot use session.logout() as this also comes with its bugs :(. Apparently inside a JTA
transaction the session will attach to it and be closed when the JTA transaction performs
the commit.

So, I modified my code to have only one session. I can upload the message, but when it downloads
it after that it says:

Caused by: java.lang.IllegalStateException: Inactive logical session handle called
	at org.apache.jackrabbit.jca.JCAManagedConnection.getSession(JCAManagedConnection.java:227)
	at org.apache.jackrabbit.jca.JCASessionHandle.getSession(JCASessionHandle.java:84)
	at org.apache.jackrabbit.jca.JCASessionHandle.getRootNode(JCASessionHandle.java:135)


-----Original Message-----
From: KÖLL Claus [mailto:C.KOELL@TIROL.GV.AT] 
Sent: Monday, July 02, 2007 12:42 PM
To: users@jackrabbit.apache.org
Subject: AW: JBoss JTA transaction timeout

> Yes, I may open a new session inside the same transaction (I'm quite new to Seam so I
don't know in detail how it handles everything, but almost sure I open more 
> than one transaction). 

... you can not open more than 1 session inside a container transaction ..

> Both the upload & download methods get a new session when they start doing their
job.
ok thats the normal way ..

public void testme() { <-- is a EJB SesssionBean Method
//ContainerTransaction begnis ...
Session sess = getRepository().login(credentials, workspaceName);
sess.getRootNode().addNode(....);
...
sess.save();
sess.logout();
}
//Container Transaction ends
if you now open a second session inside this transaction you will get a timeout eception ...

BR,
claus

-----Original Message-----
From: KÖLL Claus [mailto:C.KOELL@TIROL.GV.AT] 
Sent: Monday, July 02, 2007 11:58 AM
To: users@jackrabbit.apache.org
Subject: AW: JBoss JTA transaction timeout

the only thing you must looking for not to open 2 sessions in 1 transaction !
maybe you are opening a adminsession in the accessmanager ?
even if you do only reading with the second session you will get a timeout exception !

the locking strategy is at the moment designed not to allow 2 sessions in one transaction
!

BR,
claus


Mime
View raw message