[jboss-svn-commits] JBL Code SVN: r26704 - in labs/jbosstm/trunk: 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
Sat May 23 06:48:14 EDT 2009
Author: mark.little at jboss.com
Date: 2009-05-23 06:48:13 -0400 (Sat, 23 May 2009)
New Revision: 26704
Modified:
labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java
labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
Log:
https://jira.jboss.org/jira/browse/JBTM-257
Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java 2009-05-23 10:17:33 UTC (rev 26703)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/resources/arjunacore/XAResourceRecord.java 2009-05-23 10:48:13 UTC (rev 26704)
@@ -82,6 +82,12 @@
* @message com.arjuna.ats.internal.jta.resources.arjunacore.assumecomplete
* [com.arjuna.ats.internal.jta.resources.arjunacore.assumecomplete]
* Being told to assume complete on Xid {0}
+ * @message com.arjuna.ats.internal.jta.resources.arjunacore.savestateerror
+ * [com.arjuna.ats.internal.jta.resources.arjunacore.savestateerror]
+ * An error occurred during save_state for XAResource {0} and transaction {1}
+ * @message com.arjuna.ats.internal.jta.resources.arjunacore.restorestateerror
+ * [com.arjuna.ats.internal.jta.resources.arjunacore.restorestateerror]
+ * An error occurred during restore_state for XAResource {0} and transaction {1}
*/
public class XAResourceRecord extends AbstractRecord
@@ -263,13 +269,13 @@
if (_theXAResource.prepare(_tranID) == XAResource.XA_RDONLY)
{
- if (TxControl.isReadonlyOptimisation())
- {
- // we won't be called again, so we need to tidy up now
- removeConnection();
- }
+ if (TxControl.isReadonlyOptimisation())
+ {
+ // we won't be called again, so we need to tidy up now
+ removeConnection();
+ }
- return TwoPhaseOutcome.PREPARE_READONLY;
+ return TwoPhaseOutcome.PREPARE_READONLY;
}
else
return TwoPhaseOutcome.PREPARE_OK;
@@ -1042,8 +1048,15 @@
}
catch (Exception e)
{
- e.printStackTrace();
-
+ if (jtaLogger.loggerI18N.isWarnEnabled())
+ {
+ jtaLogger.loggerI18N
+ .warn(
+ "com.arjuna.ats.internal.jta.resources.arjunacore.savestateerror",
+ new Object[]
+ { _theXAResource, _tranID }, e);
+ }
+
res = false;
}
@@ -1167,9 +1180,16 @@
}
catch (Exception e)
{
- e.printStackTrace();
+ if (jtaLogger.loggerI18N.isWarnEnabled())
+ {
+ jtaLogger.loggerI18N
+ .warn(
+ "com.arjuna.ats.internal.jta.resources.arjunacore.restorestateerror",
+ new Object[]
+ { _theXAResource, _tranID }, e);
+ }
- res = false;
+ res = false;
}
if (res)
Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java 2009-05-23 10:17:33 UTC (rev 26703)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java 2009-05-23 10:48:13 UTC (rev 26704)
@@ -82,10 +82,13 @@
* {0} - null transaction!
* @message com.arjuna.ats.internal.jta.resources.jts.orbspecific.xaerror
* [com.arjuna.ats.internal.jta.resources.jts.orbspecific.xaerror] {0}
- * caused an XA error: {1}
+ * caused an XA error: {1} from resource {2} in transaction {3}
* @message com.arjuna.ats.internal.jta.resources.jts.orbspecific.loadstateread
* [com.arjuna.ats.internal.jta.resources.jts.orbspecific.loadstateread]
* Reading state caught: {1}
+ * @message com.arjuna.ats.internal.jta.resources.jts.orbspecific.generror
+ * [com.arjuna.ats.internal.jta.resources.jts.orbspecific.generror] {0}
+ * caused an error from resource {1} in transaction {2}
*/
public class XAResourceRecord extends com.arjuna.ArjunaOTS.OTSAbstractRecordPOA
@@ -180,7 +183,7 @@
/**
* @message com.arjuna.ats.internal.jta.resources.jts.orbspecific.preparefailed
* [com.arjuna.ats.internal.jta.resources.jts.orbspecific.preparefailed]
- * XAResource prepare failed with: {1}
+ * XAResource prepare failed on resource {1} for transaction {2} with: {3}
*/
public org.omg.CosTransactions.Vote prepare() throws HeuristicMixed,
@@ -266,7 +269,7 @@
.warn(
"com.arjuna.ats.internal.jta.resources.jts.orbspecific.preparefailed",
new Object[]
- { XAHelper
+ { _theXAResource, _tranID, XAHelper
.printXAErrorCode(e1) });
}
@@ -306,7 +309,7 @@
.warn(
"com.arjuna.ats.internal.jta.resources.jts.orbspecific.preparefailed",
new Object[]
- { e2 });
+ { _theXAResource, _tranID, e2 });
}
if (_rollbackOptimization) // won't have rollback called on it
@@ -414,7 +417,7 @@
{
"XAResourceRecord.rollback",
XAHelper
- .printXAErrorCode(e1) });
+ .printXAErrorCode(e1), _theXAResource, _tranID });
}
switch (e1.errorCode)
@@ -457,8 +460,17 @@
}
catch (Exception e2)
{
- e2.printStackTrace();
+ if (jtaLogger.loggerI18N.isWarnEnabled())
+ {
+ jtaLogger.loggerI18N
+ .warn(
+ "com.arjuna.ats.internal.jta.resources.jts.orbspecific.generror",
+ new Object[]
+ {
+ "XAResourceRecord.rollback",
+ _theXAResource, _tranID }, e2);
+ }
throw new UNKNOWN();
}
finally
@@ -546,7 +558,7 @@
{
"XAResourceRecord.commit",
XAHelper
- .printXAErrorCode(e1) });
+ .printXAErrorCode(e1), _theXAResource, _tranID });
}
/*
@@ -607,7 +619,16 @@
{
_committed = false;
- e2.printStackTrace();
+ if (jtaLogger.loggerI18N.isWarnEnabled())
+ {
+ jtaLogger.loggerI18N
+ .warn(
+ "com.arjuna.ats.internal.jta.resources.jts.orbspecific.generror",
+ new Object[]
+ {
+ "XAResourceRecord.commit",
+ _theXAResource, _tranID }, e2);
+ }
throw new UNKNOWN();
}
More information about the jboss-svn-commits
mailing list