[jboss-svn-commits] JBL Code SVN: r38456 - in labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692: ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 30 07:20:45 EDT 2015


Author: raggz
Date: 2015-06-30 07:20:44 -0400 (Tue, 30 Jun 2015)
New Revision: 38456

Modified:
   labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java
   labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java
   labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
Log:
JBPAPP-11225. 3rd attempt to backport JBTM-692.

Modified: labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java	2015-06-30 10:55:04 UTC (rev 38455)
+++ labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java	2015-06-30 11:20:44 UTC (rev 38456)
@@ -278,6 +278,8 @@
  * @message com.arjuna.ats.arjuna.coordinator.BasicAction_71
  *          [com.arjuna.ats.arjuna.coordinator.BasicAction_71] - Deactivation of
  *          atomic action with id {0} and type {1} unexpectedly failed
+ * @message com.arjuna.ats.arjuna.coordinator.norecordfound
+ *          [com.arjuna.ats.arjuna.coordinator.norecordfound] - Could not recreate abstract record {0}
  */
 
 public class BasicAction extends StateManager
@@ -1479,10 +1481,11 @@
 						RecordType.typeToClassName(record_type), record_type,
 						true);
 
-				res = (record.restore_state(os, ot) && heuristicList.insert(record));
-
 				try
 				{
+				
+					res = (record.restore_state(os, ot) && heuristicList.insert(record));
+					
 					record_type = os.unpackInt();
 
 					if (tsLogger.arjLoggerI18N.debugAllowed())
@@ -1495,6 +1498,13 @@
 				{
 					res = false;
 				}
+				catch (final NullPointerException ex)
+				{
+				    if (tsLogger.arjLoggerI18N.isWarnEnabled())
+                                        tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.coordinator.norecordfound", new Object[] { record_type});
+				    
+				    res = false;
+				}
 			}
 		}
 

Modified: labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java	2015-06-30 10:55:04 UTC (rev 38455)
+++ labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java	2015-06-30 11:20:44 UTC (rev 38456)
@@ -621,9 +621,10 @@
 						        return TwoPhaseOutcome.HEURISTIC_HAZARD;  // something terminated the transaction!
 						case XAException.XAER_PROTO:
 						case XAException.XA_RETRY:
+						case XAException.XAER_RMFAIL:
 							return TwoPhaseOutcome.FINISH_ERROR;
 						case XAException.XAER_INVAL:
-						case XAException.XAER_RMFAIL: // resource manager
+						 // resource manager
 							// failed, did it
 							// rollback?
 							return TwoPhaseOutcome.HEURISTIC_HAZARD;
@@ -898,6 +899,8 @@
 	{
 		if ((_theXAResource != null) && (_tranID != null))
 		{
+			_heuristic = TwoPhaseOutcome.FINISH_OK;
+
 			try
 			{
 				_theXAResource.forget(_tranID);
@@ -1216,6 +1219,11 @@
 		_recovered = true;
 	}
 
+	public String toString ()
+	{
+		return "XAResourceRecord < resource:"+_theXAResource+", txid:"+_tranID+", heuristic"+TwoPhaseOutcome.stringForm(_heuristic)+" "+super.toString()+" >";
+	}
+
 	/**
 	 * For those objects where the original XAResource could not be saved.
 	 */

Modified: labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java	2015-06-30 10:55:04 UTC (rev 38455)
+++ labs/jbosstm/branches/JBOSSTS_4_6_1_GA_CP13_JBTM-1481_JBTM-1509_JBTM-692/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java	2015-06-30 11:20:44 UTC (rev 38456)
@@ -592,11 +592,9 @@
                             throw new TRANSACTION_ROLLEDBACK();
 
 						case XAException.XA_RETRY:
+						case XAException.XAER_RMFAIL:
 							throw new UNKNOWN();
 						case XAException.XAER_INVAL:
-						case XAException.XAER_RMFAIL: // resource manager
-													  // failed, did it
-													  // rollback?
 							throw new org.omg.CosTransactions.HeuristicHazard();
 						default:
 							throw new org.omg.CosTransactions.HeuristicHazard();
@@ -916,6 +914,8 @@
 	{
 		if ((_theXAResource != null) && (_tranID != null))
 		{
+			_heuristic = TwoPhaseOutcome.FINISH_OK;
+
 			try
 			{
 				_theXAResource.forget(_tranID);
@@ -985,9 +985,7 @@
 
                                     os.packBoolean(false);
                                 }
-			}
-			else
-			{
+			} else {
 				os.packInt(RecoverableXAConnection.AUTO_RECOVERY);
 				os.packString(_recoveryObject.getClass().getName());
 
@@ -1197,6 +1195,11 @@
 		_valid = loadState();
 	}
 
+	public String toString ()
+	{
+		return "XAResourceRecord < resource:"+_theXAResource+", txid:"+_tranID+", heuristic"+TwoPhaseOutcome.stringForm(_heuristic)+" "+super.toString()+" >";
+	}
+	
 	/**
 	 * For those objects where the original XAResource could not be saved.
 	 */



More information about the jboss-svn-commits mailing list