You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by quipere <jq...@hotmail.com> on 2010/02/26 17:25:58 UTC

removing a versionable Node and its baseversion within a XA Transaction gives XAException when this Node was created outside a transaction.

Using JackRabbit 1.6.1.

When I remove a Node and its versions within a XA transaction I get a
XAException, when this Node was created outside a transaction.

First add a node not using any transaction. After that doing the following
within a XATransaction:

1. remove the added Node
2. remove the baseVersion of the Node
3. commit -> XAException

After debugging I noticed the cause of the XAException is a
ReferentialIntegrityException. It seems within the transaction the removal
of the Node is not added to the changelog. Therefor a
ReferentialIntegrityException is thrown because JackRabbit thinks the
baseVersion is still used by the Node. Which it shoudn't since it is already
removed.

The strange thing is, when the Node was also created within a transaction,
all goes well. 

I have created a TestCase with the failing and the passing test.

http://n4.nabble.com/file/n1570872/RemoveVersionsWithinTransactionTestCase.java
RemoveVersionsWithinTransactionTestCase.java 
http://n4.nabble.com/file/n1570872/repository.xml repository.xml 
-- 
View this message in context: http://n4.nabble.com/removing-a-versionable-Node-and-its-baseversion-within-a-XA-Transaction-gives-XAException-when-this--tp1570872p1570872.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: removing a versionable Node and its baseversion within a XA Transaction gives XAException when this Node was created outside a transaction.

Posted by quipere <jq...@hotmail.com>.
Forgot to mention this test also fails on JackRabbit 1.5.5, 1.5.6, 1.5.7 and
1.6.0.
-- 
View this message in context: http://n4.nabble.com/removing-a-versionable-Node-and-its-baseversion-within-a-XA-Transaction-gives-XAException-when-this--tp1570872p1570915.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: removing a versionable Node and its baseversion within a XA Transaction gives XAException when this Node was created outside a transaction.

Posted by quipere <jq...@hotmail.com>.
Submitted JIRA issue:

https://issues.apache.org/jira/browse/JCR-2545
https://issues.apache.org/jira/browse/JCR-2545 
-- 
View this message in context: http://n4.nabble.com/removing-a-versionable-Node-and-its-baseversion-within-a-XA-Transaction-gives-XAException-when-this--tp1570872p1579346.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: removing a versionable Node and its baseversion within a XA Transaction gives XAException when this Node was created outside a transaction.

Posted by quipere <jq...@hotmail.com>.
Can anyone confirm this is a Bug or I am doing something wrong here? So in
case it is a bug I can file a jira issue.
-- 
View this message in context: http://n4.nabble.com/removing-a-versionable-Node-and-its-baseversion-within-a-XA-Transaction-gives-XAException-when-this--tp1570872p1576791.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.