[jboss-svn-commits] JBL Code SVN: r19234 - in labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx: jts/jca and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Mar 26 07:04:57 EDT 2008
Author: jhalliday
Date: 2008-03-26 07:04:57 -0400 (Wed, 26 Mar 2008)
New Revision: 19234
Modified:
labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jta/jca/XATerminator.java
labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jts/jca/XATerminator.java
Log:
Fixed timeout unit conversion in JCA XATerminator. JBTM-351. (see also JBTM-274).
Modified: labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jta/jca/XATerminator.java
===================================================================
--- labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jta/jca/XATerminator.java 2008-03-26 03:54:05 UTC (rev 19233)
+++ labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jta/jca/XATerminator.java 2008-03-26 11:04:57 UTC (rev 19234)
@@ -1,20 +1,20 @@
/*
* JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
* See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
- *
+ *
* (C) 2005-2006,
* @author JBoss Inc.
*/
@@ -56,12 +56,12 @@
/**
* The implementation of JBossXATerminator using the purely local (ArjunaCore)
* implementation of the JTA.
- *
+ *
* The JBossXATerminator is the way in JBoss 4.x for adding work to an inflowed
* transaction. JCA 1.5 has the concept of a WorkManager.
- *
+ *
* @author mcl
- *
+ *
* @message com.arjuna.ats.jbossatx.jta.jca.inactive [message
* com.arjuna.ats.jbossatx.jta.jca.inactive] Transaction is inactive!
* @message com.arjuna.ats.jbossatx.jta.jca.completing [message
@@ -84,18 +84,18 @@
* thread-to-transaction association is not changed yet. Basically this
* operation only lets the transaction system know about the work and
* nothing else.
- *
+ *
* @param work
* the work to associate with the transaction.
* @param xid
* the transaction within which the work will be performed.
* @param timeout
* the lifetime of the transaction.
- *
+ *
* @throws WorkCompletedException
* thrown if the work cannot be associated with the transaction.
- *
- *
+ *
+ *
*/
public void registerWork (Work work, Xid xid, long timeout)
@@ -104,11 +104,11 @@
try
{
/*
- * Remember to conver timeout to seconds.
+ * Remember to convert timeout to seconds.
*/
-
- TransactionImple tx = TxImporter.importTransaction(xid, (int) timeout);
+ TransactionImple tx = TxImporter.importTransaction(xid, (int) timeout/1000);
+
switch (tx.getStatus())
{
case Status.STATUS_NO_TRANSACTION:
@@ -130,7 +130,7 @@
* TODO currently means one synchronization per work item and that
* instance isn't removed when/if the work item is cancelled and
* another work item is later added.
- *
+ *
* Synchronizations are pretty lightweight and this add/remove/add
* scenario will hopefully not happen that much. So, we don't
* optimise for it at the moment. Re-evaluate if it does become an
@@ -162,13 +162,13 @@
* 4.x, they assume that the work has already been registered, so we do
* likewise, i.e., we don't do a register if it hasn't, but we will throw an
* exception (which is more than JBoss does).
- *
+ *
* @param work the Work to start
* @param xid the transaction to associate with the current thread.
- *
+ *
* @throws WorkCompletedException thrown if there are any errors.
*/
-
+
public void startWork (Work work, Xid xid) throws WorkCompletedException
{
try
@@ -207,11 +207,11 @@
* Disassociate the thread from the transaction and remove the
* work from the transaction pool of workers. This assumes that
* the invoking thread is the one doing the work.
- *
+ *
* @param work the Work unit to remove.
* @param xid the transaction to remove the work from.
*/
-
+
public void endWork (Work work, Xid xid)
{
try
@@ -231,11 +231,11 @@
/**
* Remove the associated work from the transaction. Do not do
* any thread-to-transaction disassociation.
- *
+ *
* @param work the unit of work to remove.
* @param xid the transaction from which it should be disassociated.
*/
-
+
public void cancelWork (Work work, Xid xid)
{
try
Modified: labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jts/jca/XATerminator.java
===================================================================
--- labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jts/jca/XATerminator.java 2008-03-26 03:54:05 UTC (rev 19233)
+++ labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jts/jca/XATerminator.java 2008-03-26 11:04:57 UTC (rev 19234)
@@ -1,20 +1,20 @@
/*
* JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
* See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
- *
+ *
* (C) 2005-2006,
* @author JBoss Inc.
*/
@@ -56,9 +56,9 @@
/**
* The implementation of JBossXATerminator using the JTS implementation of the
* JTA.
- *
+ *
* @author mcl
- *
+ *
* @message com.arjuna.ats.jbossatx.jts.jca.inactive [message
* com.arjuna.ats.jbossatx.jts.jca.inactive] Transaction is inactive!
* @message com.arjuna.ats.jbossatx.jts.jca.completing [message
@@ -79,31 +79,31 @@
* thread-to-transaction association is not changed yet. Basically this
* operation only lets the transaction system know about the work and
* nothing else.
- *
+ *
* @param work
* the work to associate with the transaction.
* @param xid
* the transaction within which the work will be performed.
* @param timeout
* the lifetime of the transaction.
- *
+ *
* @throws WorkCompletedException
* thrown if the work cannot be associated with the transactin.
- *
- *
+ *
+ *
*/
-
+
public void registerWork (Work work, Xid xid, long timeout)
throws WorkCompletedException
{
try
{
/*
- * Remember to conver timeout to seconds.
+ * Remember to convert timeout to seconds.
*/
-
- TransactionImple tx = TxImporter.importTransaction(xid, (int) timeout);
+ TransactionImple tx = TxImporter.importTransaction(xid, (int) timeout/1000);
+
switch (tx.getStatus())
{
case Status.STATUS_NO_TRANSACTION:
@@ -125,7 +125,7 @@
* TODO currently means one synchronization per work item and that
* instance isn't removed when/if the work item is cancelled and
* another work item is later added.
- *
+ *
* Synchronizations are pretty lightweight and this add/remove/add
* scenario will hopefully not happen that much. So, we don't
* optimise for it at the moment. Re-evaluate if it does become an
@@ -157,13 +157,13 @@
* 4.x, they assume that the work has already been registered, so we do
* likewise, i.e., we don't do a register if it hasn't, but we will throw an
* exception (which is more than JBoss does).
- *
+ *
* @param work the Work to start
* @param xid the transaction to associate with the current thread.
- *
+ *
* @throws WorkCompletedException thrown if there are any errors.
*/
-
+
public void startWork (Work work, Xid xid) throws WorkCompletedException
{
try
@@ -177,7 +177,7 @@
throw new WorkCompletedException(jbossatxLogger.logMesg.getString("com.arjuna.ats.jbossatx.jts.jca.unknownwork"),
WorkException.INTERNAL);
}
-
+
TransactionManager.transactionManager().resume(tx);
}
catch (XAException ex)
@@ -202,11 +202,11 @@
* Disassociate the thread from the transaction and remove the
* work from the transaction pool of workers. This assumes that
* the invoking thread is the one doing the work.
- *
+ *
* @param work the Work unit to remove.
* @param xid the transaction to remove the work from.
*/
-
+
public void endWork (Work work, Xid xid)
{
try
@@ -226,11 +226,11 @@
/**
* Remove the associated work from the transaction. Do not do
* any thread-to-transaction disassociation.
- *
+ *
* @param work the unit of work to remove.
* @param xid the transaction from which it should be disassociated.
*/
-
+
public void cancelWork (Work work, Xid xid)
{
try
More information about the jboss-svn-commits
mailing list