You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/06/09 13:25:06 UTC

svn commit: r1133795 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: CamelUnitOfWorkException.java impl/DefaultUnitOfWork.java model/ProcessorDefinition.java

Author: davsclaus
Date: Thu Jun  9 11:25:06 2011
New Revision: 1133795

URL: http://svn.apache.org/viewvc?rev=1133795&view=rev
Log:
CAMEL-4078: Added shareUnitOfWork option to splitter,multicast and recipient list. This helps support some fairly common use cased in Camel routes more easily for end users. To keep API compatible I added a SubUnitOfWork instead of breaking API in current UnitOfWork which we can do in Camel 3.0

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/CamelUnitOfWorkException.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/CamelUnitOfWorkException.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelUnitOfWorkException.java?rev=1133795&r1=1133794&r2=1133795&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/CamelUnitOfWorkException.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/CamelUnitOfWorkException.java Thu Jun  9 11:25:06 2011
@@ -23,7 +23,7 @@ import java.util.List;
  * <p/>
  * This implementation will provide the first exception from the list in its cause, so its shown
  * in the stacktrace etc when logging this exception. But the remainder exceptions is only available
- * from the {@link #getCause()} method.
+ * from the {@link #getCauses()} method.
  */
 public class CamelUnitOfWorkException extends CamelExchangeException {
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java?rev=1133795&r1=1133794&r2=1133795&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java Thu Jun  9 11:25:06 2011
@@ -291,7 +291,6 @@ public class DefaultUnitOfWork implement
         if (subUnitOfWorks == null) {
             subUnitOfWorks = new Stack<DefaultSubUnitOfWork>();
         }
-        // push a new savepoint
         subUnitOfWorks.push(new DefaultSubUnitOfWork());
     }
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=1133795&r1=1133794&r2=1133795&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Thu Jun  9 11:25:06 2011
@@ -246,7 +246,7 @@ public abstract class ProcessorDefinitio
             // by checking that any of our parent(s) is not a try .. catch or finally type
         } else if (defn instanceof MulticastDefinition) {
             // do not use error handler for multicast as it offers fine grained error handlers for its outputs
-            // however if sub unit of work is enabled, we need to wrap an error handler on the multicast parent
+            // however if share unit of work is enabled, we need to wrap an error handler on the multicast parent
             MulticastDefinition def = (MulticastDefinition) defn;
             if (def.isShareUnitOfWork() && child == null) {
                 // only wrap the parent (not the children of the multicast)
@@ -254,7 +254,7 @@ public abstract class ProcessorDefinitio
             }
         } else if (defn instanceof RecipientListDefinition) {
             // do not use error handler for recipient list as it offers fine grained error handlers for its outputs
-            // however if sub unit of work is enabled, we need to wrap an error handler on the recipient list parent
+            // however if share unit of work is enabled, we need to wrap an error handler on the recipient list parent
             RecipientListDefinition def = (RecipientListDefinition) defn;
             if (def.isShareUnitOfWork() && child == null) {
                 // only wrap the parent (not the children of the multicast)