jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Cenkier <marcin.cenk...@cognifide.com>
Subject Bug in JR transaction implementation (XASession)
Date Thu, 22 Sep 2005 13:50:50 GMT
Hi,
I have big problems with transactions using XASession. The following 
code runs ok without transactions, but when transactions are used, it fails:

Node versionableParent = 
session.getRootNode().getNode(PARENT_NODE_NAME); //mix:versionable

versionableParent.checkout();

Node node = versionableParent.addNode("NODE");

node.addMixin("mix:versionable");

versionableParent.save();

node.checkin();                    <=========(*)

versionableParent.checkin();

log.info("node.isCheckedOut()" + node.isCheckedOut());

In transaction, (*) line doesn't make the node check in (it stays 
checked out) and trying to commit the transaction causes:

15:41:14,434 ERROR (TransactionalItemStateManager.java:114) - 
org.apache.jackrabbit.core.state.NoSuchItemStateException: 
31f78b39-6422-4ec8-b41e-2571b6807b05/{http://www.jcp.org/jcr/1.0}isCheckedOut
java.lang.Exception: Cannot commit transaction.
[...]
Caused by: org.apache.jackrabbit.core.state.TransactionException: Unable 
to commit transaction.: 
31f78b39-6422-4ec8-b41e-2571b6807b05/{http://www.jcp.org/jcr/1.0}isCheckedOut
[...]
Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 
31f78b39-6422-4ec8-b41e-2571b6807b05/{http://www.jcp.org/jcr/1.0}isCheckedOut

When I removed (*) line, transaction commits well, but the node stays 
checked out...

Any ideas?

PS.
I can send you a simple code that shows the problem if you want.

-- 
Best Regards,                              Senior developer at Cognifide 

Marcin Cenkier                                         www.cognifide.com

Mime
View raw message