jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r475638 - in /jackrabbit/trunk/jackrabbit/src: main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java test/java/org/apache/jackrabbit/core/UserTransactionImpl.java
Date Thu, 16 Nov 2006 08:34:24 GMT
Author: dpfister
Date: Thu Nov 16 00:34:23 2006
New Revision: 475638

URL: http://svn.apache.org/viewvc?view=rev&rev=475638
Log:
Remove stacktrace logs since root cause is passed.

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/core/UserTransactionImpl.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java?view=diff&rev=475638&r1=475637&r2=475638
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java
Thu Nov 16 00:34:23 2006
@@ -150,11 +150,9 @@
                 }
                 update = sharedStateMgr.beginUpdate(txLog, factory, virtualProvider);
             } catch (ReferentialIntegrityException rie) {
-                log.error(rie.getMessage(), rie);
                 txLog.undo(sharedStateMgr);
                 throw new TransactionException("Unable to prepare transaction.", rie);
             } catch (ItemStateException ise) {
-                log.error(ise.getMessage(), ise);
                 txLog.undo(sharedStateMgr);
                 throw new TransactionException("Unable to prepare transaction.", ise);
             }
@@ -170,7 +168,6 @@
             try {
                 update.end();
             } catch (ItemStateException ise) {
-                log.error(ise.getMessage(), ise);
                 txLog.undo(sharedStateMgr);
                 throw new TransactionException("Unable to commit transaction.", ise);
             }

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/core/UserTransactionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/core/UserTransactionImpl.java?view=diff&rev=475638&r1=475637&r2=475638
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/core/UserTransactionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/core/UserTransactionImpl.java
Thu Nov 16 00:34:23 2006
@@ -113,11 +113,15 @@
 
             if (e.errorCode >= XAException.XA_RBBASE &&
                     e.errorCode <= XAException.XA_RBEND) {
-                throw new RollbackException("Transaction rolled back: " +
-                        "XA_ERR=" + e.errorCode);
+                RollbackException re = new RollbackException(
+                        "Transaction rolled back: XA_ERR=" + e.errorCode);
+                re.initCause(e.getCause());
+                throw re;
             } else {
-                throw new SystemException("Unable to commit transaction: " +
-                        "XA_ERR=" + e.errorCode);
+                SystemException se = new SystemException(
+                        "Unable to commit transaction: XA_ERR=" + e.errorCode);
+                se.initCause(e.getCause());
+                throw se;
             }
         }
     }
@@ -149,9 +153,10 @@
             status = Status.STATUS_ROLLEDBACK;
 
         } catch (XAException e) {
-
-            throw new SystemException("Unable to rollback transaction: " +
-                    "XA_ERR=" + e.errorCode);
+            SystemException se = new SystemException(
+                    "Unable to rollback transaction: XA_ERR=" + e.errorCode);
+            se.initCause(e.getCause());
+            throw se;
         }
     }
 



Mime
View raw message