[
http://jira.jboss.com/jira/browse/JBTM-128?page=comments#action_12343896 ]
Mark Little commented on JBTM-128:
----------------------------------
This is a result of using interoposition on a remote transaction manager: the TM is not
local so there will be no BasicAction instance. The code needs to duplicate the contents
of the ClassCastException to cover this:
try
{
/*
* If this is an imported transaction and we have just performed
* interposition, then register a purely local Synchronization.
* This gets us over a performance issue with JacORB.
*/
theTx = (TwoPhaseCoordinator) BasicAction.Current();
if (theTx != null) // TM is local
theTx.addSynchronization(new LocalCleanupSynchronization(this));
else
registerSynchronization(new
CleanupSynchronization(this));
}
catch (ClassCastException ex)
{
/*
* Not a local/interposed transaction.
*/
registerSynchronization(new CleanupSynchronization(this));
}
warning with TransactionManager interface in JTS with external TM
-----------------------------------------------------------------
Key: JBTM-128
URL:
http://jira.jboss.com/jira/browse/JBTM-128
Project: JBoss Transaction Manager
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JTS Implementation
Affects Versions: 4.2.1
Environment: TS 4.2.1 with JacORB on jdk 1.5.0_07, fedora core 5 linux
Reporter: Jonathan Halliday
Assigned To: Mark Little
When using JTS with external transaction manager and accessing transaction via
javax.transaction.TransactionManager interface, an empty transaction generates a warning:
2006-09-22 14:35:10,928 [main] WARN com.arjuna.ats.jta.logging.loggerI18N -
[com.arjuna.ats.internal.jta.transaction.jts.syncproblem]
[com.arjuna.ats.internal.jta.transaction.jts.syncproble] - cleanup synchronization failed
to register:
java.lang.NullPointerException
at
com.arjuna.ats.internal.jta.transaction.jts.TransactionImple.<init>(TransactionImple.java:136)
at
com.arjuna.ats.internal.jta.transaction.jts.BaseTransaction.begin(BaseTransaction.java:128)
This does not occur when using a local transaction manager or managing the transaction
through OTSManager.get_current instead.
Test code to reproduce warning:
System.setProperty("com.arjuna.ats.jta.jtaTMImplementation","com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple");
System.setProperty("com.arjuna.ats.jta.jtaUTImplementation","com.arjuna.ats.internal.jta.transaction.jts.UserTransactionImple");
ORB myORB = ORB.getInstance("ServerSide");
OA myOA = OA.getRootOA(myORB);
myORB.initORB(args, null);
myOA.initOA();
javax.transaction.TransactionManager transactionManager =
com.arjuna.ats.jta.TransactionManager.transactionManager();
transactionManager.begin();
transactionManager.commit();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira