[jboss-svn-commits] JBL Code SVN: r21259 - in labs/jbosstm/trunk: ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 28 13:28:29 EDT 2008
Author: mmusgrov
Date: 2008-07-28 13:28:28 -0400 (Mon, 28 Jul 2008)
New Revision: 21259
Added:
labs/jbosstm/trunk/ArjunaJTS/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionWrapper.java
Removed:
labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonAdapter.java
labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonListener.java
labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/TxTester.java
Log:
Resolves issue JBTM-382 and JBTM-366
Deleted: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonAdapter.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonAdapter.java 2008-07-28 17:23:01 UTC (rev 21258)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonAdapter.java 2008-07-28 17:28:28 UTC (rev 21259)
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-package com.arjuna.ats.tools.objectstorebrowser.panels;
-
-/*
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: DetailsButtonAdapter.java 2342 2006-03-30 13:06:17Z $
- */
-
-public abstract class DetailsButtonAdapter implements DetailsButtonListener
-{
- public abstract void detailsButtonPressed();
-}
Deleted: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonListener.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonListener.java 2008-07-28 17:23:01 UTC (rev 21258)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/DetailsButtonListener.java 2008-07-28 17:28:28 UTC (rev 21259)
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-package com.arjuna.ats.tools.objectstorebrowser.panels;
-
-/*
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: DetailsButtonListener.java 2342 2006-03-30 13:06:17Z $
- */
-
-public interface DetailsButtonListener
-{
- public void detailsButtonPressed();
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/TxTester.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/TxTester.java 2008-07-28 17:23:01 UTC (rev 21258)
+++ labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/TxTester.java 2008-07-28 17:28:28 UTC (rev 21259)
@@ -1,142 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, 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) 2008,
- * @author JBoss Inc.
- */
-package com.arjuna.ats.tools.objectstorebrowser.rootprovider;
-
-import javax.transaction.*;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import javax.transaction.xa.XAException;
-import java.io.Serializable;
-
-public class TxTester
-{
- static DummyTx[] ta = new DummyTx[2];
-
- public void createTransactions()
- {
- boolean endTx = false;
-
- for (int i = 0; i < ta.length; i++)
- {
- try
- {
- if (ta[i] == null || ta[i].terminateTxIfNotActive())
- ta[i] = newTx(endTx);
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- if (endTx)
- ta[i] = null;
- }
- }
- }
-
- private DummyTx newTx(boolean commit)
- {
- DummyTx t = new DummyTx();
-
- t.commit = commit;
- t.start();
- return t;
- }
-
- private class DummyTx extends Thread
- {
- UserTransaction ut;
- Transaction tx;
- boolean commit;
-
- private Synchronization getSynchronization() throws SystemException, RollbackException
- {
- return new Synchronization() {
- public void beforeCompletion()
- {
- System.out.println("Before completion");
- }
-
- public void afterCompletion(int i)
- {
- System.out.println("After completion");
- }
- };
- }
-
- public int getStatus()
- {
- try
- {
- return ut.getStatus();
- }
- catch (SystemException e)
- {
- System.out.println(e.getMessage());
- return Status.STATUS_UNKNOWN;
- }
- }
-
- public boolean terminateTxIfNotActive()
- {
- if (getStatus() != Status.STATUS_ACTIVE && getStatus() != Status.STATUS_NO_TRANSACTION)
- {
- try
- {
- ut.rollback();
- }
- catch (Throwable e)
- {
- System.out.println(e.getMessage());
- }
-
- return true;
- }
-
- return false;
- }
-
- public void run()
- {
-// Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
- ut = com.arjuna.ats.jta.UserTransaction.userTransaction();
-
- try{
- ut.setTransactionTimeout(3000);
- ut.begin();
- tx = com.arjuna.ats.jta.TransactionManager.transactionManager().getTransaction();
- tx.registerSynchronization(getSynchronization());
- tx.registerSynchronization(getSynchronization());
- tx.enlistResource(new DummyXAResource(false));
- tx.enlistResource(new DummyXAResource(true));
- tx.enlistResource(new DummyXAResource(true));
-
- if (commit)
- ut.commit();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-}
Added: labs/jbosstm/trunk/ArjunaJTS/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionWrapper.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionWrapper.java (rev 0)
+++ labs/jbosstm/trunk/ArjunaJTS/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionWrapper.java 2008-07-28 17:28:28 UTC (rev 21259)
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.arjunatransaction;
+
+import com.arjuna.ats.arjuna.coordinator.BasicAction;
+import com.arjuna.ats.arjuna.coordinator.RecordList;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.arjuna.ObjectType;
+import com.arjuna.ats.arjuna.gandiva.ObjectName;
+import com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple;
+
+public class ArjunaTransactionWrapper extends BasicAction
+{
+ public ArjunaTransactionWrapper(Uid objUid, ObjectName objectName)
+ {
+ super(objUid, ObjectType.ANDPERSISTENT, objectName);
+ }
+
+ /**
+ * Overloads StateManager.type()
+ */
+ public String type()
+ {
+ return ArjunaTransactionImple.typeName();
+ }
+
+ public RecordList getFailedList()
+ {
+ return failedList;
+ }
+
+ public RecordList getHeuristicList()
+ {
+ return heuristicList;
+ }
+
+ public RecordList getPendingList()
+ {
+ return pendingList;
+ }
+
+ public RecordList getPreparedList()
+ {
+ return preparedList;
+ }
+
+ public RecordList getReadOnlyList()
+ {
+ return readonlyList;
+ }
+}
More information about the jboss-svn-commits
mailing list