[jboss-svn-commits] JBL Code SVN: r38453 - in 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 and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jun 30 06:03:14 EDT 2015
Author: raggz
Date: 2015-06-30 06:03:14 -0400 (Tue, 30 Jun 2015)
New Revision: 38453
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/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
Log:
Second attempt backport of JBTM-692
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-29 09:24:24 UTC (rev 38452)
+++ 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:03:14 UTC (rev 38453)
@@ -621,10 +621,13 @@
return TwoPhaseOutcome.HEURISTIC_HAZARD; // something terminated the transaction!
case XAException.XAER_PROTO:
case XAException.XA_RETRY:
- case XAException.XAER_RMFAIL: // resource manager failed, did it rollback?
- _committed = true;
+ case XAException.XAER_RMFAIL:
return TwoPhaseOutcome.FINISH_ERROR;
case XAException.XAER_INVAL:
+ // resource manager
+ // failed, did it
+ // rollback?
+ return TwoPhaseOutcome.HEURISTIC_HAZARD;
default:
return TwoPhaseOutcome.HEURISTIC_HAZARD;
}
@@ -842,7 +845,6 @@
return TwoPhaseOutcome.HEURISTIC_HAZARD; // something committed or rolled back without asking us!
case XAException.XAER_PROTO:
case XAException.XAER_INVAL:
- return TwoPhaseOutcome.HEURISTIC_HAZARD;
case XAException.XAER_RMFAIL: // resource manager failed,
// did it rollback?
return TwoPhaseOutcome.FINISH_ERROR;
@@ -898,7 +900,7 @@
if ((_theXAResource != null) && (_tranID != null))
{
_heuristic = TwoPhaseOutcome.FINISH_OK;
-
+
try
{
_theXAResource.forget(_tranID);
@@ -1216,13 +1218,12 @@
_theTransaction = null;
_recovered = true;
}
-
- public String toString ()
- {
- return "XAResourceRecord < resource:"+_theXAResource+", txid:"+_tranID+", heuristic"+TwoPhaseOutcome.stringForm(_heuristic)+" "+super.toString()+" >";
- }
-
+ 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-29 09:24:24 UTC (rev 38452)
+++ 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:03:14 UTC (rev 38453)
@@ -593,9 +593,9 @@
case XAException.XA_RETRY:
case XAException.XAER_RMFAIL:
- _committed = true; // remember for recovery later.
- throw new UNKNOWN(); // will cause log to be rewritten.
- case XAException.XAER_INVAL: // resource manager failed, did it rollback?
+ throw new UNKNOWN();
+ case XAException.XAER_INVAL:
+ throw new org.omg.CosTransactions.HeuristicHazard();
default:
throw new org.omg.CosTransactions.HeuristicHazard();
}
@@ -853,11 +853,11 @@
// presumed abort (or we could be really paranoid and throw a heuristic)
throw new TRANSACTION_ROLLEDBACK();
- case XAException.XAER_INVAL: // resource manager failed, did it rollback?
- throw new org.omg.CosTransactions.HeuristicHazard();
- case XAException.XAER_RMFAIL:
+ case XAException.XAER_INVAL:
+ case XAException.XAER_RMFAIL: // resource manager failed,
+ // did it rollback?
+ throw new UNKNOWN();
default:
- _committed = true; // will cause log to be rewritten
throw new UNKNOWN();
}
}
@@ -914,9 +914,8 @@
{
if ((_theXAResource != null) && (_tranID != null))
{
-
_heuristic = TwoPhaseOutcome.FINISH_OK;
-
+
try
{
_theXAResource.forget(_tranID);
@@ -986,9 +985,7 @@
os.packBoolean(false);
}
- }
- else
- {
+ } else {
os.packInt(RecoverableXAConnection.AUTO_RECOVERY);
os.packString(_recoveryObject.getClass().getName());
@@ -1180,11 +1177,6 @@
return _recoveryCoordinator;
}
- public String toString ()
- {
- return "XAResourceRecord < resource:"+_theXAResource+", txid:"+_tranID+", heuristic"+TwoPhaseOutcome.stringForm(_heuristic)+" "+super.toString()+" >";
- }
-
protected XAResourceRecord(Uid u)
{
_theXAResource = null;
@@ -1203,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