[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-464?page=co...
]
Barry Kaplan commented on ANN-464:
----------------------------------
Yes, you are right. I am wrong. My TM was not configured in the data source correctly. I
sincerly appoligize for the noise.
AbstractEntityManagerImpl.joinTransaction() has dead code block
---------------------------------------------------------------
Key: ANN-464
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-464
Project: Hibernate Annotations
Type: Bug
Versions: 3.2.0.cr3
Reporter: Barry Kaplan
In the method joinTransaction(boolean ignoreJoining) there is the snippet:
joinableCMTTransaction.markForJoined();
session.isOpen(); //register to the Tx
if ( joinableCMTTransaction.getStatus() ==
JoinableCMTTransaction.JoinStatus.NOT_JOINED ) {
...
else
if ( joinableCMTTransaction.getStatus() ==
JoinableCMTTransaction.JoinStatus.MARKED_FOR_JOINED ) {
throw new AssertionFailure( "Transaction MARKED_FOR_JOINED after isOpen()
call" );
}
The method joinableCMTTransaction.markForJoined() ensure that
joinableCMTTransaction.getStatus() is either JoinStatus.JOINED or
JoinStatus.MARKED_FOR_JOINED, ie:
public void markForJoined() {
if ( status != JoinStatus.JOINED ) status = JoinStatus.MARKED_FOR_JOINED;
}
Hence the if-block can never be entered.
I'm not sure what the implications of this are
In my program when joinableCMTTransaction.markForJoined() is invoked status !=
JoinStatus.JOINED is true, hence status gets assigned JoinStatus.MARKED_FOR_JOINED and the
exception is always thrown.
I ran into this problem (not this issues problems though) when using the Geronimo
transaction manager via jencks. Using JbossTM with everthing all others things unchanged I
don't see the below exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira