[jboss-svn-commits] JBL Code SVN: r38315 - in labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta: tests/classes and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Apr 10 09:13:01 EDT 2013
Author: raggz
Date: 2013-04-10 09:13:00 -0400 (Wed, 10 Apr 2013)
New Revision: 38315
Added:
labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/tests/classes/TestSetTransactionTimeout.java
Modified:
labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java
Log:
JBTM-1509
Modified: labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2013-04-10 08:42:29 UTC (rev 38314)
+++ labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2013-04-10 13:13:00 UTC (rev 38315)
@@ -514,8 +514,9 @@
* @message com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror
* [com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror]
* {0} - caught: {1}
- * @message com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror[com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror]
- * {0} setTransactionTimeout on XAResource threw: {1}
+ * @message com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror
+ * [com.arjuna.ats.internal.jta.transaction.arjunacore.timeouterror]
+ * {0} setTransactionTimeout for xid {2} on XAResource threw: {1}
* @message com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror
* [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror]
* {0} - XAResource.start returned: {1} for {2}
@@ -774,7 +775,7 @@
"TransactionImple.enlistResource",
XAHelper
.printXAErrorCode(te),
- xid });
+ xid }, te);
}
}
}
Added: labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/tests/classes/TestSetTransactionTimeout.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/tests/classes/TestSetTransactionTimeout.java (rev 0)
+++ labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509/ArjunaJTA/jta/tests/classes/TestSetTransactionTimeout.java 2013-04-10 13:13:00 UTC (rev 38315)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * 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.
+ * 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
+ * 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,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
+
+import junit.framework.TestCase;
+
+public class TestSetTransactionTimeout extends TestCase {
+ public void test() throws NotSupportedException,
+ SystemException, IllegalStateException, RollbackException {
+ javax.transaction.TransactionManager tm = new TransactionManagerImple();
+
+ tm.begin();
+
+ javax.transaction.Transaction theTransaction = tm.getTransaction();
+ theTransaction.enlistResource(new XAResource() {
+
+ public void commit(Xid arg0, boolean arg1) throws XAException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void end(Xid arg0, int arg1) throws XAException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void forget(Xid arg0) throws XAException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int getTransactionTimeout() throws XAException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public boolean isSameRM(XAResource arg0) throws XAException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public int prepare(Xid arg0) throws XAException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Xid[] recover(int arg0) throws XAException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void rollback(Xid arg0) throws XAException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean setTransactionTimeout(int arg0) throws XAException {
+ throw new XAException("foo bar");
+ }
+
+ public void start(Xid arg0, int arg1) throws XAException {
+ // TODO Auto-generated method stub
+
+ }
+ });
+ tm.rollback();
+ }
+
+}
More information about the jboss-svn-commits
mailing list