svn commit: r713259 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean: BeanExchange.java CamelInvocationHandler.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r713259 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean: BeanExchange.java CamelInvocationHandler.java

hadrian-3
Author: hadrian
Date: Tue Nov 11 19:59:40 2008
New Revision: 713259

URL: http://svn.apache.org/viewvc?rev=713259&view=rev
Log:
CAMEL-1078.  Removed BeanExchange.

Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanExchange.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/CamelInvocationHandler.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/CamelInvocationHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/CamelInvocationHandler.java?rev=713259&r1=713258&r2=713259&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/CamelInvocationHandler.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/CamelInvocationHandler.java Tue Nov 11 19:59:40 2008
@@ -21,8 +21,10 @@
 import java.lang.reflect.Method;
 
 import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Producer;
+import org.apache.camel.impl.DefaultExchange;
 
 /**
  * An {@link java.lang.reflect.InvocationHandler} which invokes a
@@ -48,8 +50,8 @@
         if (methodInfo != null) {
             pattern = methodInfo.getPattern();
         }
-        BeanExchange exchange = new BeanExchange(endpoint.getCamelContext(), pattern);
-        exchange.setInvocation(invocation);
+        Exchange exchange = new DefaultExchange(endpoint.getCamelContext(), pattern);
+        exchange.getIn().setBody(invocation);
 
         producer.process(exchange);
         Throwable fault = exchange.getException();