Update of /var/cvs/src/org/mmbase/module/core
In directory james.mmbase.org:/tmp/cvs-serv12516

Modified Files:
        TransactionManager.java 
Log Message:
I saw an UnsupportedOperation happen on that spot. Catching it and replacing it 
by something more clear.


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/core


Index: TransactionManager.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/core/TransactionManager.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- TransactionManager.java     28 Jul 2008 17:49:01 -0000      1.45
+++ TransactionManager.java     30 Oct 2008 13:16:03 -0000      1.46
@@ -21,7 +21,7 @@
  * @javadoc
  *
  * @author Rico Jansen
- * @version $Id: TransactionManager.java,v 1.45 2008/07/28 17:49:01 michiel 
Exp $
+ * @version $Id: TransactionManager.java,v 1.46 2008/10/30 13:16:03 michiel 
Exp $
  */
 public class TransactionManager {
 
@@ -124,7 +124,12 @@
         MMObjectNode node = getTemporaryNodeManager().getNode(owner, 
tmpnumber);
         if (node != null) {
             if (!transaction.contains(node)) {
+                try {
                 transaction.add(node);
+                } catch (UnsupportedOperationException uoe) {
+                    transactions.remove(transactionName);
+                    throw new TransactionManagerException("Cannot add node " + 
node + " to transaction '" + transactionName + "'. It probably was committed 
already. This transaction is removed now.", uoe);
+                }
 //            } else {
 //                throw new TransactionManagerException(
 //                    "Node " + tmpnumber + " not added as it was already in 
transaction " + transactionName);
@@ -197,7 +202,7 @@
                 throw new TransactionManagerException("Can't resolve 
transaction " + transactionName + " (it has " + transaction.size() + " nodes)", 
te);
             }
         } else {
-            log.service("Resolved already");
+            log.service("Resolved already " + transaction.getClass());
             return false;
         }
         return true;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to