camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r772869 - in /camel/branches/camel-1.x: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/impl/ components/camel-spring/src/main/java/org/apache/camel/spring/spi/
Date Fri, 08 May 2009 07:28:14 GMT
Author: davsclaus
Date: Fri May  8 07:28:14 2009
New Revision: 772869

URL: http://svn.apache.org/viewvc?rev=772869&view=rev
Log:
CAMEL-1592: Fixed bug with TRANSCATED being double registered somehow and causing a TX route
to not work. @deprecated ExchangeProperty.

Modified:
    camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
    camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
    camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionInterceptor.java

Modified: camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java?rev=772869&r1=772868&r2=772869&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
Fri May  8 07:28:14 2009
@@ -53,6 +53,8 @@
  *  <b>Note:</b> that if ExchangeProperty instance get or set methods are used
then type checks
  *  of property's value are performed and a runtime exception can be thrown if type
  *  safety is violated.
+ *
+ * @deprecated will be removed in Camel 2.0
  */
 public class ExchangeProperty<T> {
 

Modified: camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java?rev=772869&r1=772868&r2=772869&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
Fri May  8 07:28:14 2009
@@ -290,8 +290,8 @@
     }
 
     public boolean isTransacted() {
-        ExchangeProperty<?> property = ExchangeProperty.get("transacted");
-        return property != null && property.get(this) == Boolean.TRUE;
+        Boolean transacted = getProperty("org.apache.camel.transacted", Boolean.class);
+        return transacted != null && transacted;
     }
 
     public UnitOfWork getUnitOfWork() {

Modified: camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionInterceptor.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionInterceptor.java?rev=772869&r1=772868&r2=772869&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionInterceptor.java
(original)
+++ camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionInterceptor.java
Fri May  8 07:28:14 2009
@@ -17,7 +17,6 @@
 package org.apache.camel.spring.spi;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.ExchangeProperty;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.processor.DelayPolicy;
@@ -41,8 +40,6 @@
  * @version $Revision$
  */
 public class TransactionInterceptor extends DelegateProcessor {
-    public static final ExchangeProperty<Boolean> TRANSACTED =
-        new ExchangeProperty<Boolean>("transacted", "org.apache.camel.transacted",
Boolean.class);
     private static final transient Log LOG = LogFactory.getLog(TransactionInterceptor.class);
     private final TransactionTemplate transactionTemplate;
     private RedeliveryPolicy redeliveryPolicy;
@@ -107,7 +104,7 @@
                     // okay mark the exchange as transacted, then the DeadLetterChannel or
others know
                     // its a transacted exchange
                     if (activeTx) {
-                        TRANSACTED.set(exchange, Boolean.TRUE);
+                        exchange.setProperty("org.apache.camel.transacted", Boolean.TRUE);
                     }
 
                     // process the exchange



Mime
View raw message