[Mulgara-svn] r1330 - trunk/src/jar/resolver/java/org/mulgara/resolver

pag at mulgara.org pag at mulgara.org
Thu Oct 16 19:03:24 UTC 2008


Author: pag
Date: 2008-10-16 12:03:23 -0700 (Thu, 16 Oct 2008)
New Revision: 1330

Modified:
   trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java
   trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraXAResourceContext.java
   trunk/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java
Log:
Changed various pieces of logging data from info to debug

Modified: trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java
===================================================================
--- trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java	2008-10-16 19:01:36 UTC (rev 1329)
+++ trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java	2008-10-16 19:03:23 UTC (rev 1330)
@@ -253,7 +253,7 @@
         explicitXA = null;
         if (autoCommit) {
           // AutoCommit on -> on === no-op.  Log info.
-          logger.info("Attempting to set autocommit true without setting it false");
+          if (logger.isDebugEnabled()) logger.debug("Attempting to set autocommit true without setting it false");
         } else {
           // AutoCommit on -> off == Start new transaction.
           getTransaction(true); // Set's writeTransaction.
@@ -275,7 +275,7 @@
     acquireMutex(0, MulgaraTransactionException.class);
     try {
       try {
-        logger.info("Beginning Transaction");
+        if (logger.isDebugEnabled()) logger.debug("Beginning Transaction");
         if (activeTransactions.get(Thread.currentThread()) != null) {
           throw new MulgaraTransactionException(
               "Attempt to start transaction in thread with exiting active transaction.");

Modified: trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraXAResourceContext.java
===================================================================
--- trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraXAResourceContext.java	2008-10-16 19:01:36 UTC (rev 1329)
+++ trunk/src/jar/resolver/java/org/mulgara/resolver/MulgaraXAResourceContext.java	2008-10-16 19:03:23 UTC (rev 1330)
@@ -81,7 +81,7 @@
   private final UUID uniqueId;
 
   MulgaraXAResourceContext(MulgaraExternalTransactionFactory factory, DatabaseSession session) {
-    logger.info("Creating MulgaraXAResource");
+    if (logger.isDebugEnabled()) logger.debug("Creating MulgaraXAResource");
     this.factory = factory;
     this.session = session;
     this.xa2xid = new Assoc1toNMap<MulgaraExternalTransaction, Xid>();
@@ -113,7 +113,7 @@
       factory.acquireMutex(0, XAException.class);
       try {
         xid = convertXid(xid);
-        logger.info("Performing commit: " + parseXid(xid));
+        if (logger.isDebugEnabled()) logger.debug("Performing commit: " + parseXid(xid));
         MulgaraExternalTransaction xa = xa2xid.get1(xid);
         if (xa == null) {
           throw new XAException(XAException.XAER_NOTA);
@@ -180,7 +180,7 @@
       factory.acquireMutex(0, XAException.class);
       try {
         xid = convertXid(xid);
-        logger.info("Performing end(" + formatFlags(flags) + "): " + parseXid(xid));
+        if (logger.isDebugEnabled()) logger.debug("Performing end(" + formatFlags(flags) + "): " + parseXid(xid));
         MulgaraExternalTransaction xa = xa2xid.get1(xid);
         if (xa == null) {
           throw new XAException(XAException.XAER_NOTA);
@@ -218,7 +218,7 @@
       factory.acquireMutex(0, XAException.class);
       try {
         xid = convertXid(xid);
-        logger.info("Performing forget: " + parseXid(xid));
+        if (logger.isDebugEnabled()) logger.debug("Performing forget: " + parseXid(xid));
         MulgaraExternalTransaction xa = xa2xid.get1(xid);
         if (xa == null) {
           throw new XAException(XAException.XAER_NOTA);
@@ -243,7 +243,7 @@
     public int getTransactionTimeout() throws XAException {
       factory.acquireMutex(0, XAException.class);
       try {
-        logger.info("Performing getTransactionTimeout");
+        if (logger.isDebugEnabled()) logger.debug("Performing getTransactionTimeout");
         return (int) (session.getTransactionTimeout() / 1000);
       } finally {
         factory.releaseMutex();
@@ -253,7 +253,7 @@
     public boolean isSameRM(XAResource xares) throws XAException {
       factory.acquireMutex(0, XAException.class);
       try {
-        logger.info("Performing isSameRM");
+        if (logger.isDebugEnabled()) logger.debug("Performing isSameRM");
         if (!xares.getClass().equals(MulgaraXAResource.class)) {
           return false;
         } else {
@@ -272,7 +272,7 @@
       factory.acquireMutex(0, XAException.class);
       try {
         xid = convertXid(xid);
-        logger.info("Performing prepare: " + parseXid(xid));
+        if (logger.isDebugEnabled()) logger.debug("Performing prepare: " + parseXid(xid));
         MulgaraExternalTransaction xa = xa2xid.get1(xid);
         if (xa == null) {
           throw new XAException(XAException.XAER_NOTA);
@@ -296,7 +296,7 @@
     public Xid[] recover(int flag) throws XAException {
       factory.acquireMutex(0, XAException.class);
       try {
-        logger.info("Performing recover");
+        if (logger.isDebugEnabled()) logger.debug("Performing recover");
         return new Xid[] {};
       } finally {
         factory.releaseMutex();
@@ -308,7 +308,7 @@
       factory.acquireMutex(0, XAException.class);
       try {
         xid = convertXid(xid);
-        logger.info("Performing rollback: " + parseXid(xid));
+        if (logger.isDebugEnabled()) logger.debug("Performing rollback: " + parseXid(xid));
         MulgaraExternalTransaction xa = xa2xid.get1(xid);
         if (xa == null) {
           throw new XAException(XAException.XAER_NOTA);
@@ -344,7 +344,7 @@
 
       factory.acquireMutex(0, XAException.class);
       try {
-        logger.info("Performing setTransactionTimeout");
+        if (logger.isDebugEnabled()) logger.debug("Performing setTransactionTimeout");
         session.setTransactionTimeout(seconds * 1000L);
         return true;
       } finally {
@@ -357,7 +357,7 @@
       factory.acquireMutex(0, XAException.class);
       try {
         xid = convertXid(xid);
-        logger.info("Performing start(" + formatFlags(flags) + "): " + parseXid(xid));
+        if (logger.isDebugEnabled()) logger.debug("Performing start(" + formatFlags(flags) + "): " + parseXid(xid));
         switch (flags) {
           case TMNOFLAGS:
             if (xa2xid.containsN(xid)) {

Modified: trunk/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java
===================================================================
--- trunk/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java	2008-10-16 19:01:36 UTC (rev 1329)
+++ trunk/src/jar/resolver/java/org/mulgara/resolver/TransactionalAnswer.java	2008-10-16 19:03:23 UTC (rev 1330)
@@ -232,8 +232,8 @@
   }
 
   private void report(String desc) {
-    if (logger.isInfoEnabled()) {
-      logger.info(desc + ": " + System.identityHashCode(this) + ", xa=" + System.identityHashCode(transaction));
+    if (logger.isDebugEnabled()) {
+      logger.debug(desc + ": " + System.identityHashCode(this) + ", xa=" + System.identityHashCode(transaction));
     }
   }
 




More information about the Mulgara-svn mailing list