<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-36428</id>
	<title>Nabble - Camel - Users</title>
	<updated>2009-12-08T21:57:04Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Camel---Users-f36428.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Camel---Users-f36428.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26705567</id>
	<title>Re: Accessing exchange from producer template</title>
	<published>2009-12-08T21:57:04Z</published>
	<updated>2009-12-08T21:57:04Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Wed, Dec 9, 2009 at 4:07 AM, trivedi kumar b
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705567&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Trivedi.Bodlapati@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a bean that is being invoked from a route and this bean has got
&lt;br&gt;&amp;gt; producer template.. and I want the access to exchange object to retrieve
&lt;br&gt;&amp;gt; properties that is being set before in the route. So I have written a small
&lt;br&gt;&amp;gt; piece of code (method) that returns me the exchange object.. pls let me know
&lt;br&gt;&amp;gt; if there is a better to get the exchange object.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Hi
&lt;br&gt;&lt;br&gt;You want to get those properties in the bean, and before you use the
&lt;br&gt;producer template?
&lt;br&gt;&lt;br&gt;You can use bean parameter binding
&lt;br&gt;&lt;a href=&quot;http://camel.apache.org/parameter-binding-annotations.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camel.apache.org/parameter-binding-annotations.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;public void myMethod(String body, @Properties Map properties);
&lt;br&gt;&lt;br&gt;&lt;br&gt;Or just add Exchange as a parameter to your bean.
&lt;br&gt;&lt;br&gt;public void myMethod(String body, Exchange exchange);
&lt;br&gt;&lt;br&gt;&lt;br&gt;PS: Chapter 4 in Camel in Action covers using beans in great details
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; private Exchange getExchange() {
&lt;br&gt;&amp;gt;        Exchange exchange = template.send(new Processor() {
&lt;br&gt;&amp;gt;            public void process(Exchange arg0) throws Exception { }
&lt;br&gt;&amp;gt;        });
&lt;br&gt;&amp;gt;        return exchange;
&lt;br&gt;&amp;gt;    }
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Accessing-exchange-from-producer-template-tp26704478p26704478.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Accessing-exchange-from-producer-template-tp26704478p26704478.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Accessing-exchange-from-producer-template-tp26704478p26705567.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26705482</id>
	<title>Re: handled exception in sub-route</title>
	<published>2009-12-08T21:44:21Z</published>
	<updated>2009-12-08T21:44:21Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Mon, Dec 7, 2009 at 1:19 PM, trivedi kumar b
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705482&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Trivedi.Bodlapati@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Eventhough I use doTry().. doCatch() blocks to handle the issue that Jens
&lt;br&gt;&amp;gt; explained before, the problem is still exists, this is how my route looks
&lt;br&gt;&amp;gt; like in which the call never goes to &amp;quot;direct:C&amp;quot; when there is an exception
&lt;br&gt;&amp;gt; in sub-route &amp;quot;B&amp;quot;:
&lt;br&gt;&amp;gt;        from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;                .doTry()
&lt;br&gt;&amp;gt;                        .transacted().end()
&lt;br&gt;&amp;gt;                        .code goes that throws an exception
&lt;br&gt;&amp;gt;                .doCatch(Exception.class)
&lt;br&gt;&amp;gt;                        .handled(true)
&lt;br&gt;&amp;gt;                        .markRollbackOnly()
&lt;br&gt;&amp;gt;                .end();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;                .....
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Hi
&lt;br&gt;&lt;br&gt;I have just added an unit test to Camel trunk
&lt;br&gt;&lt;a href=&quot;http://svn.apache.org/viewvc?rev=888706&amp;view=rev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/viewvc?rev=888706&amp;view=rev&lt;/a&gt;&lt;br&gt;&lt;br&gt;And try .. catch works as expected where it continues to route.
&lt;br&gt;Can you at try with Camel 2.1 as it have many improvements and fixes over 2.0.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sun, Dec 6, 2009 at 11:25 PM, trivedi kumar b
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705482&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Trivedi.Bodlapati@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If I use doTry.. doCatch, with similar route that includes transactions,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; will that work as expected? I mean, markRollbackOnly() option inside
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; doCatch() will rollback the transaction? Pls let me know the behaviour.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Yes markRollbackOnly() is only for transactions and will issue a
&lt;br&gt;&amp;gt;&amp;gt; status.setRollbackOnly() on the Spring Transaction underneath.
&lt;br&gt;&amp;gt;&amp;gt; That should render the transaction outcome as rollback only.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It will not tamper with the Exchange by setting an exception as
&lt;br&gt;&amp;gt;&amp;gt; rollback() does by setting a RollbackException on the Exchange.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Trivedi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 10:45 AM, kyt &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705482&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kythary@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I need some advice on how to handle an exception in a sub-route and how
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; calling route can continue processing. It is easier to explain this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bit of code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                .onException(Exception.class).handled(true).end()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                . code that throws an exception
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Now, if there is an exception in direct:B, direct:C never gets called.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Through debugging I found out that the pipeline in direct:A stops
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; processing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; because it checks an exchange property (Exchange.ERRORHANDLER_HANDLED).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; using Camel 2.0. Is there a way that the processing in direct:A
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; continues
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; after the exception was handled in direct:B?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Unfortunately the logic for error handling got a bit complex.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Something to improve in 2.2. I am currently making the TX based
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; simpler in internal logic.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Back to your use case.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The doTry .. doCatch will work as regular try .. catch and thus what
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; you would expect so route A will continue
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In terms on onException we should improve this over time, adding some
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; flag to indicate what you want. As some want to use onException to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; catch that error and create a custom error messages as reply and thus
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not process and further.  And others as you want a kinda try .. catch
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; logic and just ignore the damn exception.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Jens
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26676468.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26676468.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26705482.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26705388</id>
	<title>Re: Implementing Publish Subscribe Channel</title>
	<published>2009-12-08T21:27:23Z</published>
	<updated>2009-12-08T21:27:23Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">Hi Hendry
&lt;br&gt;&lt;br&gt;I am a bit busy over the next week or so, due to new book deadline and
&lt;br&gt;a other engagements.
&lt;br&gt;&lt;br&gt;However I haven't forgotten about this use-case and I think we can
&lt;br&gt;improve the seda component
&lt;br&gt;to let it support multiple consumers by sending a copy of the exchange
&lt;br&gt;to each recipient.
&lt;br&gt;&lt;br&gt;Then you should be able to use it as a event broadcaster kinda thingy.
&lt;br&gt;&lt;br&gt;Fell free to create a ticket in JIRA
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sun, Dec 6, 2009 at 6:50 PM, Hendy Irawan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705388&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hendy@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi Claus,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; No seda does *not* support multiple consumers. Its meant to be used
&lt;br&gt;&amp;gt;&amp;gt; with a single consumer only.
&lt;br&gt;&amp;gt;&amp;gt; In 2.1 this is even enforced. Often end users had copy paste mistakes
&lt;br&gt;&amp;gt;&amp;gt; and didnt want multiple consumers to the same seda endpoint.
&lt;br&gt;&amp;gt;&amp;gt; Hence why we enforced this now in 2.1.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What is your use case sine you need this? I am interesting in what you
&lt;br&gt;&amp;gt;&amp;gt; are trying to solve?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What you could do is to extend seda, and have support multiple
&lt;br&gt;&amp;gt;&amp;gt; consumers and have the Exchange being copied before its handed out to
&lt;br&gt;&amp;gt;&amp;gt; every
&lt;br&gt;&amp;gt;&amp;gt; consumers.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Mind that when you copy the Exchange / Message if the body is not a
&lt;br&gt;&amp;gt;&amp;gt; simple type such as String then you may only copy a reference to it
&lt;br&gt;&amp;gt;&amp;gt; and thus have multiple consumers work on it concurrently, and thus you
&lt;br&gt;&amp;gt;&amp;gt; need to be aware of thread safety issues.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; And there is a new interface in Camel 2.1, MultipleConsumersSupport,
&lt;br&gt;&amp;gt;&amp;gt; which indicates whether an endpoint supports multiple consumers or
&lt;br&gt;&amp;gt;&amp;gt; not.
&lt;br&gt;&amp;gt;&amp;gt; You need to implement this and return true in your own component.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm not sure if a separate component is needed for this, because from my
&lt;br&gt;&amp;gt; experience the &amp;lt;multicast&amp;gt; element works fine. And that's what I'm trying to
&lt;br&gt;&amp;gt; get, using the &amp;lt;multicast&amp;gt; functionality in a @Consume'r.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Maybe something like this (proposal):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @Consume(uri=&amp;quot;someuri&amp;quot;, multicast=true)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My use case is using Camel as event publisher. Exactly like Spring
&lt;br&gt;&amp;gt; Application Events.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @EndpointInject(uri=&amp;quot;seda:events.form&amp;quot;)
&lt;br&gt;&amp;gt; ProducerTemplate formEvents;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; formEvents.sendBody(new FormEvent(...));
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; then there are one or more event Listeners like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @Consume(uri=&amp;quot;seda:events.form&amp;quot;)
&lt;br&gt;&amp;gt; public void handleFormEvent(FormEvent event) { ... }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; BTW, the producer and consumer URI may not be the same. i.e. the publisher
&lt;br&gt;&amp;gt; of the event may route it in some way and there may be multiple producers.
&lt;br&gt;&amp;gt; However as far as consumers are concerned, they have this inbox URI (e.g.
&lt;br&gt;&amp;gt; &amp;quot;seda:events.form&amp;quot;) that all events will come together. Then multiple
&lt;br&gt;&amp;gt; consumers can process the messages (it's InOnly, no need to reply).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I can do this with &amp;lt;multicast&amp;gt;, but my &amp;quot;problem&amp;quot; is that I want it to be
&lt;br&gt;&amp;gt; &amp;quot;dynamic&amp;quot; i.e. just @Consume annotation is needed, no change in routes.
&lt;br&gt;&amp;gt; Because the consumers can be created and disposed dynamically.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26667205.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26667205.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26705388.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26704859</id>
	<title>Re: Is camel the right choice for me?</title>
	<published>2009-12-08T19:59:29Z</published>
	<updated>2009-12-08T19:59:29Z</updated>
	<author>
		<name>Tim McNerney</name>
	</author>
	<content type="html">I'm a very new user of Camel, so take that for what it is worth. I
&lt;br&gt;started off using Mule and became disenchanted by it very quickly
&lt;br&gt;(especially when trying to troubleshoot an issue I had with it). It
&lt;br&gt;felt like overkill for what I needed. I was quite pleased by my
&lt;br&gt;attempts with a few test cases in Camel. It was cleaner, more
&lt;br&gt;lightweight and really felt like it was working with me, rather than
&lt;br&gt;trying to push me into its idioms. I've been very happy with it so
&lt;br&gt;far.
&lt;br&gt;&lt;br&gt;Let me throw in one other *huge* plus for using Camel. I have rarely
&lt;br&gt;worked with a more helpful community than the Camel folks. Claus and
&lt;br&gt;Willem and Charles have been hugely helpful for me and I'm pretty sure
&lt;br&gt;they are not real people, but teams of developers answering questions
&lt;br&gt;24/7/364 (they can have New Year's Day off). I'm feeling very
&lt;br&gt;comfortable with my choice to use Camel.
&lt;br&gt;&lt;br&gt;To your specific issues, I'll let Clauemles answer.
&lt;br&gt;&lt;br&gt;--Tim
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 6:22 PM, pangea &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26704859&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yaravind@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Helo all -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; we have a home grown communication framework (based on other open source
&lt;br&gt;&amp;gt; components like apache commons, axis etc) that we have been using so far. It
&lt;br&gt;&amp;gt; works great but
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - It has many limitations like no connection pooling,
&lt;br&gt;&amp;gt; - only supports tcp/ip, http(s), soap (Axis 1.4 only), and JDBC (hibernate
&lt;br&gt;&amp;gt; 2.1.8)
&lt;br&gt;&amp;gt; - we doesnt want to maintain it anymore
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am looking into replacing it with open source framework. I like the DSL
&lt;br&gt;&amp;gt; based approach of Camel and seems like its lightweight unlike Mule and
&lt;br&gt;&amp;gt; others. Appreciate if someone can let me know if camel supports the below
&lt;br&gt;&amp;gt; usecases. Thank you in advance
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; MUST
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1) I should be able to configure/set all the protocol level properties (for
&lt;br&gt;&amp;gt; e.g. in case of http custom headers, keep-alive, GET or POST etc, for tcp-ip
&lt;br&gt;&amp;gt; - so_linger etc) thru configuration and also runtime from code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2) Ability to pool the connections
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 3) Ability to configure multiple URLs for a given endpoint. Our partners
&lt;br&gt;&amp;gt; expose multiple URLs each for DEV, TEST, QA, PROD etc. Idea is to configure
&lt;br&gt;&amp;gt; all the URLs for these different regions during development and choose which
&lt;br&gt;&amp;gt; one to use while deployment.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 4) Ability to expose all the protocol aspects so that we can modify if
&lt;br&gt;&amp;gt; required
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 5) Support for REST
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 6) Support for SOAP (ability to choose Axis or CXF or others)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 7) Proxy configuration, NTLM auth for HTTP
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 8) Re-try strategies
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 9) Performant
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; NICE TO HAVE
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1) Support for polling
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2) Client certs (keystore) support
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Is-camel-the-right-choice-for-me--tp26704160p26704160.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Is-camel-the-right-choice-for-me--tp26704160p26704160.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-camel-the-right-choice-for-me--tp26704160p26704859.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26704478</id>
	<title>Accessing exchange from producer template</title>
	<published>2009-12-08T19:07:20Z</published>
	<updated>2009-12-08T19:07:20Z</updated>
	<author>
		<name>trivedi kumar b</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have a bean that is being invoked from a route and this bean has got producer template.. and I want the access to exchange object to retrieve properties that is being set before in the route. So I have written a small piece of code (method) that returns me the exchange object.. pls let me know if there is a better to get the exchange object.
&lt;br&gt;&lt;br&gt;private Exchange getExchange() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Exchange exchange = template.send(new Processor() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void process(Exchange arg0) throws Exception { } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return exchange;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Accessing-exchange-from-producer-template-tp26704478p26704478.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26704160</id>
	<title>Is camel the right choice for me?</title>
	<published>2009-12-08T18:22:39Z</published>
	<updated>2009-12-08T18:22:39Z</updated>
	<author>
		<name>pangea</name>
	</author>
	<content type="html">Helo all -
&lt;br&gt;&lt;br&gt;we have a home grown communication framework (based on other open source components like apache commons, axis etc) that we have been using so far. It works great but 
&lt;br&gt;&lt;br&gt;- It has many limitations like no connection pooling, 
&lt;br&gt;- only supports tcp/ip, http(s), soap (Axis 1.4 only), and JDBC (hibernate 2.1.8)
&lt;br&gt;- we doesnt want to maintain it anymore
&lt;br&gt;&lt;br&gt;I am looking into replacing it with open source framework. I like the DSL based approach of Camel and seems like its lightweight unlike Mule and others. Appreciate if someone can let me know if camel supports the below usecases. Thank you in advance
&lt;br&gt;&lt;br&gt;&lt;b&gt;MUST&lt;/b&gt;&lt;br&gt;&lt;br&gt;1) I should be able to configure/set all the protocol level properties (for e.g. in case of http custom headers, keep-alive, GET or POST etc, for tcp-ip - so_linger etc) thru configuration and also runtime from code. 
&lt;br&gt;&lt;br&gt;2) Ability to pool the connections
&lt;br&gt;&lt;br&gt;3) Ability to configure multiple URLs for a given endpoint. Our partners expose multiple URLs each for DEV, TEST, QA, PROD etc. Idea is to configure all the URLs for these different regions during development and choose which one to use while deployment.
&lt;br&gt;&lt;br&gt;4) Ability to expose all the protocol aspects so that we can modify if required
&lt;br&gt;&lt;br&gt;5) Support for REST
&lt;br&gt;&lt;br&gt;6) Support for SOAP (ability to choose Axis or CXF or others)
&lt;br&gt;&lt;br&gt;7) Proxy configuration, NTLM auth for HTTP
&lt;br&gt;&lt;br&gt;8) Re-try strategies
&lt;br&gt;&lt;br&gt;9) Performant
&lt;br&gt;&lt;br&gt;&lt;b&gt;NICE TO HAVE&lt;/b&gt;&lt;br&gt;&lt;br&gt;1) Support for polling
&lt;br&gt;&lt;br&gt;2) Client certs (keystore) support</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-camel-the-right-choice-for-me--tp26704160p26704160.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26696627</id>
	<title>camel-bam (Hibernate vs Openjpa)</title>
	<published>2009-12-08T08:30:49Z</published>
	<updated>2009-12-08T08:30:49Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">JPA implementation is radically different between Hibernate and openjpa.
&lt;br&gt;&lt;br&gt;Here is a snapshot of what happens in the transaction who will save the
&lt;br&gt;ProcessDefinition
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; protected ProcessDefinition findOrCreateProcessDefinition() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Map&amp;lt;String, Object&amp;gt; params = new HashMap&amp;lt;String, Object&amp;gt;(1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; params.put(&amp;quot;name&amp;quot;, processName);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;ProcessDefinition&amp;gt; list =
&lt;br&gt;CastUtils.cast(jpaTemplate.findByNamedParams(&amp;quot;select x from &amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + ProcessDefinition.class.getName() + &amp;quot; x where x.name = :name&amp;quot;,
&lt;br&gt;params));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!list.isEmpty()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG.info(&amp;quot;&amp;gt;&amp;gt; list not empty - Definition : &amp;quot; +
&lt;br&gt;list.get(0).toString() + &amp;quot;, name : &amp;quot; + list.get(0).getName() + &amp;quot;, id : &amp;quot; +
&lt;br&gt;list.get(0).getId());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return list.get(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ProcessDefinition answer = new ProcessDefinition();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; answer.setName(processName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG.info(&amp;quot;&amp;gt;&amp;gt; before persist Definition : &amp;quot; + answer.toString() +
&lt;br&gt;&amp;quot;, name : &amp;quot; + answer.getName() + &amp;quot;, id : &amp;quot; + answer.getId());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jpaTemplate.persist(answer);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list = CastUtils.cast(jpaTemplate.find(&amp;quot;select p from &amp;quot; +
&lt;br&gt;ProcessDefinition.class.getName() +&amp;quot; p &amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG.info(&amp;quot;&amp;gt;&amp;gt; Definition name : &amp;quot; + list.get(0).getName() + &amp;quot;, id
&lt;br&gt;: &amp;quot; + list.get(0).getId());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG.info(&amp;quot;&amp;gt;&amp;gt; after persist Definition : &amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return answer;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;1) openjpa
&lt;br&gt;&lt;br&gt;&lt;br&gt;2009-12-08 17:24:43,168 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] INFO
&lt;br&gt;ProcessBuilder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;gt;&amp;gt; before persist Definition :
&lt;br&gt;org.apache.camel.bam.model.ProcessDefinition[null], name : Process-1, id :
&lt;br&gt;null
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Initiating transaction commit
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Committing JPA transaction on EntityManager
&lt;br&gt;[org.apache.openjpa.persistence.EntityManagerImpl@6ffd79]
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;[org.apache.openjpa.persistence.EntityManagerImpl@6ffd79] after transaction
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;EntityManagerFactoryUtils &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Creating new transaction with name [null]:
&lt;br&gt;PROPAGATION_REQUIRED,ISOLATION_DEFAULT
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Opened new EntityManager
&lt;br&gt;[org.apache.openjpa.persistence.EntityManagerImpl@f38cf0] for JPA
&lt;br&gt;transaction
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 15040737, conn 23149395&amp;gt; executing
&lt;br&gt;prepstmnt 31361704 SELECT t0.id, t0.ACTIVITYDEFINITION_ID,
&lt;br&gt;t0.escalationLevel, t0.PROCESSINSTANCE_CORRELATIONKEY,
&lt;br&gt;t0.receivedMessageCount, t0.timeExpected, t0.timeOverdue FROM
&lt;br&gt;CAMEL_ACTIVITYSTATE t0 WHERE (t0.timeOverdue &amp;lt; ?) [params=(Time) 17:24:43]
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 15040737, conn 23149395&amp;gt; [0 ms] spent
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Initiating transaction commit
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Committing JPA transaction on EntityManager
&lt;br&gt;[org.apache.openjpa.persistence.EntityManagerImpl@f38cf0]
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;[org.apache.openjpa.persistence.EntityManagerImpl@f38cf0] after transaction
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;EntityManagerFactoryUtils &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;2009-12-08 17:24:43,184 [tyMonitorEngine] DEBUG
&lt;br&gt;ActivityMonitorEngine &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Sleeping for 1000 millis
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;Runtime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Updating sequence values.
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;Runtime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Getting current sequence values.
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 16703414&amp;gt; executing
&lt;br&gt;prepstmnt 4123674 SELECT SEQUENCE_VALUE FROM OPENJPA_SEQUENCE_TABLE WHERE ID
&lt;br&gt;= ? [params=(int) 0]
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 16703414&amp;gt; [0 ms] spent
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;Runtime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Inserting row for this mapping into
&lt;br&gt;sequence table.
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 32633742&amp;gt; executing
&lt;br&gt;prepstmnt 17912146 INSERT INTO OPENJPA_SEQUENCE_TABLE (ID, SEQUENCE_VALUE)
&lt;br&gt;VALUES (?, ?) [params=(int) 0, (int) 1]
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 32633742&amp;gt; [0 ms] spent
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;Runtime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Updating sequence values.
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;Runtime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Getting current sequence values.
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 16183734&amp;gt; executing
&lt;br&gt;prepstmnt 28117049 SELECT SEQUENCE_VALUE FROM OPENJPA_SEQUENCE_TABLE WHERE
&lt;br&gt;ID = ? [params=(int) 0]
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 16183734&amp;gt; [0 ms] spent
&lt;br&gt;2009-12-08 17:24:43,246 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 16183734&amp;gt; executing
&lt;br&gt;prepstmnt 7806641 UPDATE OPENJPA_SEQUENCE_TABLE SET SEQUENCE_VALUE = ? WHERE
&lt;br&gt;ID = ? AND SEQUENCE_VALUE = ? [params=(long) 51, (int) 0, (long) 1]
&lt;br&gt;2009-12-08 17:24:43,262 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 16183734&amp;gt; [16 ms] spent
&lt;br&gt;2009-12-08 17:24:43,278 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 31352855&amp;gt; executing
&lt;br&gt;prepstmnt 1732792 INSERT INTO CAMEL_PROCESSDEFINITION (id, name) VALUES (?,
&lt;br&gt;?) [params=(long) 1, (null) null]
&lt;br&gt;2009-12-08 17:24:43,278 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 31352855&amp;gt; [0 ms] spent
&lt;br&gt;2009-12-08 17:24:43,278 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 31352855&amp;gt; executing
&lt;br&gt;prepstmnt 13969258 SELECT t0.id, t0.name FROM CAMEL_PROCESSDEFINITION t0
&lt;br&gt;2009-12-08 17:24:43,278 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] TRACE
&lt;br&gt;SQL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;lt;t 14043096, conn 31352855&amp;gt; [0 ms] spent
&lt;br&gt;2009-12-08 17:24:43,278 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] DEBUG
&lt;br&gt;TransactionTemplate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Initiating transaction rollback on
&lt;br&gt;application exception
&lt;br&gt;java.lang.NullPointerException
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.beforeRead(StateManagerImpl.java:939)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1479)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.bam.model.ProcessDefinition.getName(ProcessDefinition.java)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.bam.ProcessBuilder.findOrCreateProcessDefinition(ProcessBuilder.java:216)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.bam.ProcessBuilder.getProcessDefinition(ProcessBuilder.java:145)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.bam.ProcessBuilder$1.doInTransactionWithoutResult(ProcessBuilder.java:103)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
&lt;br&gt;&lt;br&gt;2) Hibernate
&lt;br&gt;&lt;br&gt;2009-12-08 17:19:18,496 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] INFO
&lt;br&gt;ProcessBuilder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;gt;&amp;gt; before persist Definition :
&lt;br&gt;org.apache.camel.bam.model.ProcessDefinition[null], name : Process-1, id :
&lt;br&gt;null
&lt;br&gt;2009-12-08 17:19:18,496 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Creating new transaction with name [null]:
&lt;br&gt;PROPAGATION_REQUIRED,ISOLATION_DEFAULT
&lt;br&gt;2009-12-08 17:19:18,496 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Opened new EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@120cb3] for JPA transaction
&lt;br&gt;2009-12-08 17:19:18,512 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Initiating transaction commit
&lt;br&gt;2009-12-08 17:19:18,512 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Committing JPA transaction on EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@120cb3]
&lt;br&gt;2009-12-08 17:19:18,512 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@120cb3] after transaction
&lt;br&gt;2009-12-08 17:19:18,512 [tyMonitorEngine] DEBUG
&lt;br&gt;EntityManagerFactoryUtils &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;2009-12-08 17:19:18,512 [tyMonitorEngine] DEBUG
&lt;br&gt;ActivityMonitorEngine &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Sleeping for 984 millis
&lt;br&gt;2009-12-08 17:19:18,684 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] INFO
&lt;br&gt;ProcessBuilder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;gt;&amp;gt; after persist Definition :
&lt;br&gt;&lt;br&gt;2009-12-08 17:22:22,293 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] INFO
&lt;br&gt;ProcessBuilder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;gt;&amp;gt; before persist Definition :
&lt;br&gt;org.apache.camel.bam.model.ProcessDefinition[null], name : Process-1, id :
&lt;br&gt;null
&lt;br&gt;2009-12-08 17:22:22,293 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Initiating transaction commit
&lt;br&gt;2009-12-08 17:22:22,293 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Committing JPA transaction on EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@6fdca5]
&lt;br&gt;2009-12-08 17:22:22,293 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@6fdca5] after transaction
&lt;br&gt;2009-12-08 17:22:22,293 [tyMonitorEngine] DEBUG
&lt;br&gt;EntityManagerFactoryUtils &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;2009-12-08 17:22:22,309 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Creating new transaction with name [null]:
&lt;br&gt;PROPAGATION_REQUIRED,ISOLATION_DEFAULT
&lt;br&gt;2009-12-08 17:22:22,325 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Opened new EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@10699ea] for JPA transaction
&lt;br&gt;2009-12-08 17:22:22,325 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Initiating transaction commit
&lt;br&gt;2009-12-08 17:22:22,325 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Committing JPA transaction on EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@10699ea]
&lt;br&gt;2009-12-08 17:22:22,325 [tyMonitorEngine] DEBUG
&lt;br&gt;JpaTransactionManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;[org.hibernate.ejb.EntityManagerImpl@10699ea] after transaction
&lt;br&gt;2009-12-08 17:22:22,325 [tyMonitorEngine] DEBUG
&lt;br&gt;EntityManagerFactoryUtils &amp;nbsp; &amp;nbsp; &amp;nbsp;- Closing JPA EntityManager
&lt;br&gt;2009-12-08 17:22:22,325 [tyMonitorEngine] DEBUG
&lt;br&gt;ActivityMonitorEngine &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Sleeping for 984 millis
&lt;br&gt;2009-12-08 17:22:22,528 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] INFO
&lt;br&gt;ProcessBuilder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;gt;&amp;gt; Definition name : Process-1, id : 1
&lt;br&gt;2009-12-08 17:22:22,528 [main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] INFO
&lt;br&gt;ProcessBuilder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;gt;&amp;gt; after persist Definition :
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-bam-%28Hibernate-vs-Openjpa%29-tp26696627p26696627.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26692325</id>
	<title>Re: Apache Felix Karaf - Equinox - TypeConverter not loaded</title>
	<published>2009-12-08T03:19:32Z</published>
	<updated>2009-12-08T03:19:32Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">In debug mode, we have this classloading issue :
&lt;br&gt;&lt;br&gt;12:13:50,043 | DEBUG | ExtenderThread-4 | OsgiPackageScanClassResolver &amp;nbsp; &amp;nbsp; |
&lt;br&gt;.DefaultPackageScanClassResolver &amp;nbsp;418 | Cannot find class
&lt;br&gt;'org/apache/camel/converter/jaxb/JaxbConverter.class' in classloader:
&lt;br&gt;BundleDelegatingClassLoader for [camel-core (org.apache.camel.camel-core)].
&lt;br&gt;Reason: java.lang.ClassNotFoundException:
&lt;br&gt;org.apache.camel.converter.jaxb.JaxbConverter not found from bundle
&lt;br&gt;[org.apache.camel.camel-core]
&lt;br&gt;java.lang.ClassNotFoundException:
&lt;br&gt;org.apache.camel.converter.jaxb.JaxbConverter not found from bundle
&lt;br&gt;[org.apache.camel.camel-core]
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:405)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.osgi.OsgiPackageScanClassResolver.loadImplementationsInBundle(OsgiPackageScanClassResolver.java:121)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.osgi.OsgiPackageScanClassResolver.findInOsgiClassLoader(OsgiPackageScanClassResolver.java:81)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.osgi.OsgiPackageScanClassResolver.find(OsgiPackageScanClassResolver.java:60)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:100)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.osgi.OsgiAnnotationTypeConverterLoader.load(OsgiAnnotationTypeConverterLoader.java:42)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:379)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:160)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:120)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:113)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.util.IntrospectionSupport.convert(IntrospectionSupport.java:277)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:233)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:200)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:156)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:231)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:65)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:36)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:80)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:416)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:46)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:154)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:109)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:115)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:84)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:630)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:136)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:601)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1156)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1073)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1009)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:158)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:55)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:884)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at java.lang.Thread.run(Thread.java:619)
&lt;br&gt;Caused by: java.lang.ClassNotFoundException:
&lt;br&gt;org.apache.camel.converter.jaxb.JaxbConverter
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
&lt;br&gt;&amp;nbsp; &amp;nbsp; ... 50 more
&lt;br&gt;&lt;br&gt;REMARKS :
&lt;br&gt;- The bundle camel-jaxb is deployed on karaf/equinox
&lt;br&gt;- The manifest file of the project imports the packages :
&lt;br&gt;org.apache.camel.converter.jaxb and validated by checking imports of karaf
&lt;br&gt;--&amp;gt; camel-jaxb (82): org.apache.camel.converter.jaxb;
&lt;br&gt;version=&amp;quot;2.2.0.SNAPSHOT&amp;quot;
&lt;br&gt;&lt;br&gt;It seems to only look in camel-core bundle and not camel-jaxb !!!!!!
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 12:03 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692325&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; It seems that Apache Felxi Karaf 1.1.SNAPSHOT + Equinox
&lt;br&gt;&amp;gt; (osgi-3.5.1.v20090827.jar) does not load a TypeConverter defined in
&lt;br&gt;&amp;gt; META-INF/services/org/apache/camel directory
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from(&amp;quot;file:src/data?noop=true&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .convertBodyTo(PersonDocument.class)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .to(&amp;quot;jpa:org.apache.camel.example.etl.CustomerEntity&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the following will dump the database to files
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; from(&amp;quot;jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false&amp;delay=3000&amp;consumeLockEntity=false&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setHeader(Exchange.FILE_NAME, el(&amp;quot;${in.body.userName}.xml&amp;quot;))
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .to(&amp;quot;file:target/customers&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 11:39:49,934 | INFO &amp;nbsp;| 1: FileComponent | Tracer
&lt;br&gt;&amp;gt; | rg.apache.camel.processor.Logger &amp;nbsp; 88 |
&lt;br&gt;&amp;gt; 5e0daace-f84c-4b28-bfee-33347488e91a &amp;gt;&amp;gt;&amp;gt; (route1) &amp;nbsp;--&amp;gt;
&lt;br&gt;&amp;gt; jpa://org.apache.camel.example.etl.CustomerEntity &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;&amp;gt; Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;&amp;gt; CamelFileAbsolutePath=D:\Temp\tutorial\camel-example-etl\apache-felix-karaf-1.1.0-SNAPSHOT\src\data\row2.xml,
&lt;br&gt;&amp;gt; CamelFileLastModified=Tue Jul 14 10:37:40 CEST 2009,
&lt;br&gt;&amp;gt; CamelFileAbsolute=false, CamelFileParent=src\data,
&lt;br&gt;&amp;gt; CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;&amp;gt; CamelFilePath=src\data\row2.xml, CamelFileLength=982},
&lt;br&gt;&amp;gt; BodyType:org.apache.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;&amp;gt; user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;&amp;gt; 11:39:49,950 | ERROR | 1: FileComponent | GenericFileOnCompletion
&lt;br&gt;&amp;gt; | rg.apache.camel.processor.Logger &amp;nbsp;248 | No body available of type:
&lt;br&gt;&amp;gt; org.apache.camel.example.etl.CustomerEntity but has value: Person[user:
&lt;br&gt;&amp;gt; hiram] of type: org.apache.camel.example.etl.PersonDocument on:
&lt;br&gt;&amp;gt; GenericFileMessage with body: Person[user: hiram] on the exchange:
&lt;br&gt;&amp;gt; Exchange[GenericFileMessage with body: Person[user: hiram]]
&lt;br&gt;&amp;gt; org.apache.camel.InvalidPayloadRuntimeException: No body available of type:
&lt;br&gt;&amp;gt; org.apache.camel.example.etl.CustomerEntity but has value: Person[user:
&lt;br&gt;&amp;gt; hiram] of type: org.apache.camel.example.etl.PersonDocument on:
&lt;br&gt;&amp;gt; GenericFileMessage with body: Person[user: hiram] on the exchange:
&lt;br&gt;&amp;gt; Exchange[GenericFileMessage with body: Person[user: hiram]]
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt; org.apache.camel.component.jpa.JpaEndpoint$1.evaluate(JpaEndpoint.java:268)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any idea is welcome ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Apache-Felix-Karaf---Equinox---TypeConverter-not-loaded-tp26692139p26692325.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26692139</id>
	<title>Apache Felix Karaf - Equinox - TypeConverter not loaded</title>
	<published>2009-12-08T03:03:59Z</published>
	<updated>2009-12-08T03:03:59Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">It seems that Apache Felxi Karaf 1.1.SNAPSHOT + Equinox
&lt;br&gt;(osgi-3.5.1.v20090827.jar) does not load a TypeConverter defined in
&lt;br&gt;META-INF/services/org/apache/camel directory
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from(&amp;quot;file:src/data?noop=true&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .convertBodyTo(PersonDocument.class)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .to(&amp;quot;jpa:org.apache.camel.example.etl.CustomerEntity&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the following will dump the database to files
&lt;br&gt;&lt;br&gt;from(&amp;quot;jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false&amp;delay=3000&amp;consumeLockEntity=false&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setHeader(Exchange.FILE_NAME, el(&amp;quot;${in.body.userName}.xml&amp;quot;))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .to(&amp;quot;file:target/customers&amp;quot;);
&lt;br&gt;&lt;br&gt;&lt;br&gt;11:39:49,934 | INFO &amp;nbsp;| 1: FileComponent | Tracer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |
&lt;br&gt;rg.apache.camel.processor.Logger &amp;nbsp; 88 | 5e0daace-f84c-4b28-bfee-33347488e91a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; (route1) &amp;nbsp;--&amp;gt; jpa://org.apache.camel.example.etl.CustomerEntity &amp;lt;&amp;lt;&amp;lt;
&lt;br&gt;Pattern:InOnly, Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;CamelFileAbsolutePath=D:\Temp\tutorial\camel-example-etl\apache-felix-karaf-1.1.0-SNAPSHOT\src\data\row2.xml,
&lt;br&gt;CamelFileLastModified=Tue Jul 14 10:37:40 CEST 2009,
&lt;br&gt;CamelFileAbsolute=false, CamelFileParent=src\data,
&lt;br&gt;CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;CamelFilePath=src\data\row2.xml, CamelFileLength=982},
&lt;br&gt;BodyType:org.apache.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;11:39:49,950 | ERROR | 1: FileComponent | GenericFileOnCompletion &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|
&lt;br&gt;rg.apache.camel.processor.Logger &amp;nbsp;248 | No body available of type:
&lt;br&gt;org.apache.camel.example.etl.CustomerEntity but has value: Person[user:
&lt;br&gt;hiram] of type: org.apache.camel.example.etl.PersonDocument on:
&lt;br&gt;GenericFileMessage with body: Person[user: hiram] on the exchange:
&lt;br&gt;Exchange[GenericFileMessage with body: Person[user: hiram]]
&lt;br&gt;org.apache.camel.InvalidPayloadRuntimeException: No body available of type:
&lt;br&gt;org.apache.camel.example.etl.CustomerEntity but has value: Person[user:
&lt;br&gt;hiram] of type: org.apache.camel.example.etl.PersonDocument on:
&lt;br&gt;GenericFileMessage with body: Person[user: hiram] on the exchange:
&lt;br&gt;Exchange[GenericFileMessage with body: Person[user: hiram]]
&lt;br&gt;&amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.apache.camel.component.jpa.JpaEndpoint$1.evaluate(JpaEndpoint.java:268)
&lt;br&gt;&lt;br&gt;Any idea is welcome ?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Apache-Felix-Karaf---Equinox---TypeConverter-not-loaded-tp26692139p26692139.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26690334</id>
	<title>Re: camel-example-etl &amp; openJPA (If this is a new instance, make sure  any version and/or auto-generated primary key fields are null/default when  persisting)</title>
	<published>2009-12-08T00:30:08Z</published>
	<updated>2009-12-08T00:30:08Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">This line does not make sense as the instance CustomerEntity is send next to
&lt;br&gt;the JPA endpoint (consuler) who will persist the information in the DB
&lt;br&gt;through Spring Transaction handling and DB connection.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 9:19 AM, Claus Ibsen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690334&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;claus.ibsen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 9:11 AM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690334&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hi Claus,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; By removing the line template.persist(answer), I have been able to solve
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; issue and to run the project with openJPA.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Then it doesn't save the user into the database? Or how do you store
&lt;br&gt;&amp;gt; users in the database?
&lt;br&gt;&amp;gt; I thought there was some detach or the likes you could call after the
&lt;br&gt;&amp;gt; persist so the enttiy can be used outside JPA.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Willem will now adapt the example and will provide different profiles to
&lt;br&gt;&amp;gt; &amp;gt; allow to run etl with Hibernate, OpenJPA and Derby. By the way, we have
&lt;br&gt;&amp;gt; also
&lt;br&gt;&amp;gt; &amp;gt; test it on OSGI server.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; &amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; &amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; *****************************
&lt;br&gt;&amp;gt; &amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 8:20 PM, Claus Ibsen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690334&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;claus.ibsen@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 2:00 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690334&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; I have understand why we have this error :
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; In fact, within the CustomerTransformer class, the method
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; findCustomerByName
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; (which is called) uses 'template.persist(answer);' who will inform
&lt;br&gt;&amp;gt; Spring
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; insert in the DB a customerEntity object if it not find from the SQL
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; query.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Next, the same object is send to the JPA endpoint who will detect that
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; object has not been detached.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; That means that attachment/detachment of objects does not occur in the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; same
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; way using Hibernate, JPA, ... as the code works for Hibernate
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Does anybody knows what was the intend to use this code in the
&lt;br&gt;&amp;gt; transform
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; class ?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; No I guess many of those &amp;quot;standards&amp;quot; are still problematic to use as
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; some impl. do X and others do Y.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I guess maybe some detach or whatever needs to be added when it
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; inserts the customer.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Can you not try looking into this as you are messing with it already?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; **
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; * Finds a customer for the given username, or creates and inserts a
&lt;br&gt;&amp;gt; new
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; one
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; */
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; protected CustomerEntity findCustomerByName(JpaTemplate template,
&lt;br&gt;&amp;gt; String
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; user) {
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; List&amp;lt;CustomerEntity&amp;gt; list = CastUtils.cast(template.find(&amp;quot;select x
&lt;br&gt;&amp;gt; from &amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; CustomerEntity.class.getName() + &amp;quot; x where x.userName = ?1&amp;quot;, user));
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; if (list.isEmpty()) {
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; CustomerEntity answer = new CustomerEntity();
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; answer.setUserName(user);
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; template.persist(answer);
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; return answer;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; } else {
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; return list.get(0);
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; *****************************
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 1:11 PM, Charles Moulliard &amp;lt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690334&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; When I try to use the example camel-example-etl with openJPA, here is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; error that I receive
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] Tracer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INFO
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; be7ae591-e2ea-4021-8179-d6bdd5f5398c &amp;gt;&amp;gt;&amp;gt; (route1) &amp;nbsp;--&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; jpa://org.apache.camel.ex
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; ample.etl.CustomerEntity?consumeLockEntity=true &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFileAbsolutePath=D:\Dvlpt\Java\workspace
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; \apache-camel-source\examples\camel-example-etl\src\data\row2.xml,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFilePath=src\data\row2
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; .xml, CamelFileParent=src\data, CamelFileAbsolute=false,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFileLength=982, CamelFileLastModified=Tue Jul 14 10:37:40 CEST
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 2009},
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; BodyType:org.apach
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; e.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL
&lt;br&gt;&amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; executing prepstmnt 585058
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; SELECT t0.id, t0.city, t0.firstName, t0.phone, t0.street,
&lt;br&gt;&amp;gt; t0.surname,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; WHERE (t0.userName = ?)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; [params=(String) hiram]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL
&lt;br&gt;&amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] CustomerTransformer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Created customer: Customer[userName: hiram firstName: Hiram surname:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Chirino]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL
&lt;br&gt;&amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; executing prepstmnt 19041450
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; SELECT t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; WHERE t0.id = ?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; [params=(long) 0]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL
&lt;br&gt;&amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] DefaultErrorHandler &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Failed delivery for exchangeId: be7ae591-e2ea-4021-8179-d6bdd5f5398c.
&lt;br&gt;&amp;gt; On
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; deliver
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; y attempt: 0 caught:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; org.springframework.dao.DataIntegrityViolationException: Attempt to
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; persist
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; detached object &amp;quot;org.apache.camel.example.etl.Custome
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; rEntity@8bfa09&amp;quot;. &amp;nbsp;If this is a new instance, make sure any version
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; and/or
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; auto-generated primary key fields are null/default when persisting.;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; nested
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; exception is &amp;lt;openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal store
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; error&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; org.apache.openjpa.persistence.EntityExistsException: Attempt to
&lt;br&gt;&amp;gt; persist
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; det
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; ached object &amp;quot;org.apache.camel.example.etl.CustomerEntity@8bfa09&amp;quot;.
&lt;br&gt;&amp;gt; &amp;nbsp;If
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; this is a new instance, make sure any version and/or auto-generated
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; primary
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; key
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp;fields are null/default when persisting.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Anybody has an idea to avoid this ?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-example-etl---openJPA-%28If-this-is-a-new-instance%2C-make-sure-any--version-and-or-auto-generated-primary-key-fields-are-null-default-when--persisting%29-tp26676380p26690334.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26690227</id>
	<title>Re: camel-example-etl &amp; openJPA (If this is a new instance, make sure  any version and/or auto-generated primary key fields are null/default when  persisting)</title>
	<published>2009-12-08T00:19:21Z</published>
	<updated>2009-12-08T00:19:21Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Tue, Dec 8, 2009 at 9:11 AM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690227&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Hi Claus,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; By removing the line template.persist(answer), I have been able to solve the
&lt;br&gt;&amp;gt; issue and to run the project with openJPA.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Then it doesn't save the user into the database? Or how do you store
&lt;br&gt;users in the database?
&lt;br&gt;I thought there was some detach or the likes you could call after the
&lt;br&gt;persist so the enttiy can be used outside JPA.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Willem will now adapt the example and will provide different profiles to
&lt;br&gt;&amp;gt; allow to run etl with Hibernate, OpenJPA and Derby. By the way, we have also
&lt;br&gt;&amp;gt; test it on OSGI server.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 8:20 PM, Claus Ibsen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690227&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;claus.ibsen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 2:00 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690227&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I have understand why we have this error :
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; In fact, within the CustomerTransformer class, the method
&lt;br&gt;&amp;gt;&amp;gt; findCustomerByName
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; (which is called) uses 'template.persist(answer);' who will inform Spring
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; insert in the DB a customerEntity object if it not find from the SQL
&lt;br&gt;&amp;gt;&amp;gt; query.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Next, the same object is send to the JPA endpoint who will detect that
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; object has not been detached.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; That means that attachment/detachment of objects does not occur in the
&lt;br&gt;&amp;gt;&amp;gt; same
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; way using Hibernate, JPA, ... as the code works for Hibernate
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Does anybody knows what was the intend to use this code in the transform
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; class ?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; No I guess many of those &amp;quot;standards&amp;quot; are still problematic to use as
&lt;br&gt;&amp;gt;&amp;gt; some impl. do X and others do Y.
&lt;br&gt;&amp;gt;&amp;gt; I guess maybe some detach or whatever needs to be added when it
&lt;br&gt;&amp;gt;&amp;gt; inserts the customer.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Can you not try looking into this as you are messing with it already?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; **
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; * Finds a customer for the given username, or creates and inserts a new
&lt;br&gt;&amp;gt;&amp;gt; one
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; */
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; protected CustomerEntity findCustomerByName(JpaTemplate template, String
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; user) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; List&amp;lt;CustomerEntity&amp;gt; list = CastUtils.cast(template.find(&amp;quot;select x from &amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; CustomerEntity.class.getName() + &amp;quot; x where x.userName = ?1&amp;quot;, user));
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; if (list.isEmpty()) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; CustomerEntity answer = new CustomerEntity();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; answer.setUserName(user);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; template.persist(answer);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; return answer;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; } else {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; return list.get(0);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; *****************************
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 1:11 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690227&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; When I try to use the example camel-example-etl with openJPA, here is
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; error that I receive
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] Tracer                         INFO
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; be7ae591-e2ea-4021-8179-d6bdd5f5398c &amp;gt;&amp;gt;&amp;gt; (route1)  --&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; jpa://org.apache.camel.ex
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ample.etl.CustomerEntity?consumeLockEntity=true &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFileAbsolutePath=D:\Dvlpt\Java\workspace
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; \apache-camel-source\examples\camel-example-etl\src\data\row2.xml,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFilePath=src\data\row2
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; .xml, CamelFileParent=src\data, CamelFileAbsolute=false,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; CamelFileLength=982, CamelFileLastModified=Tue Jul 14 10:37:40 CEST
&lt;br&gt;&amp;gt;&amp;gt; 2009},
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; BodyType:org.apach
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; e.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 16094  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; executing prepstmnt 585058
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; SELECT t0.id, t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;         t0.userName, t0.zip
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;     FROM Customer t0
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;     WHERE (t0.userName = ?)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; [params=(String) hiram]
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 16094  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] CustomerTransformer            DEBUG
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Created customer: Customer[userName: hiram firstName: Hiram surname:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Chirino]
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 16110  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; executing prepstmnt 19041450
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; SELECT t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;         t0.userName, t0.zip
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;     FROM Customer t0
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;     WHERE t0.id = ?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; [params=(long) 0]
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 16110  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] DefaultErrorHandler            DEBUG
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Failed delivery for exchangeId: be7ae591-e2ea-4021-8179-d6bdd5f5398c. On
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; deliver
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; y attempt: 0 caught:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; org.springframework.dao.DataIntegrityViolationException: Attempt to
&lt;br&gt;&amp;gt;&amp;gt; persist
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; detached object &amp;quot;org.apache.camel.example.etl.Custome
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; rEntity@8bfa09&amp;quot;.  If this is a new instance, make sure any version
&lt;br&gt;&amp;gt;&amp;gt; and/or
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; auto-generated primary key fields are null/default when persisting.;
&lt;br&gt;&amp;gt;&amp;gt; nested
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; exception is &amp;lt;openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal store
&lt;br&gt;&amp;gt;&amp;gt; error&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; org.apache.openjpa.persistence.EntityExistsException: Attempt to persist
&lt;br&gt;&amp;gt;&amp;gt; det
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ached object &amp;quot;org.apache.camel.example.etl.CustomerEntity@8bfa09&amp;quot;.  If
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; this is a new instance, make sure any version and/or auto-generated
&lt;br&gt;&amp;gt;&amp;gt; primary
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; key
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  fields are null/default when persisting.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Anybody has an idea to avoid this ?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-example-etl---openJPA-%28If-this-is-a-new-instance%2C-make-sure-any--version-and-or-auto-generated-primary-key-fields-are-null-default-when--persisting%29-tp26676380p26690227.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26690163</id>
	<title>Re: camel-example-etl &amp; openJPA (If this is a new instance, make sure  any version and/or auto-generated primary key fields are null/default when  persisting)</title>
	<published>2009-12-08T00:11:22Z</published>
	<updated>2009-12-08T00:11:22Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">Hi Claus,
&lt;br&gt;&lt;br&gt;By removing the line template.persist(answer), I have been able to solve the
&lt;br&gt;issue and to run the project with openJPA.
&lt;br&gt;&lt;br&gt;Willem will now adapt the example and will provide different profiles to
&lt;br&gt;allow to run etl with Hibernate, OpenJPA and Derby. By the way, we have also
&lt;br&gt;test it on OSGI server.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 8:20 PM, Claus Ibsen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690163&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;claus.ibsen@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 2:00 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690163&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; I have understand why we have this error :
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; In fact, within the CustomerTransformer class, the method
&lt;br&gt;&amp;gt; findCustomerByName
&lt;br&gt;&amp;gt; &amp;gt; (which is called) uses 'template.persist(answer);' who will inform Spring
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; &amp;gt; insert in the DB a customerEntity object if it not find from the SQL
&lt;br&gt;&amp;gt; query.
&lt;br&gt;&amp;gt; &amp;gt; Next, the same object is send to the JPA endpoint who will detect that
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; object has not been detached.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; That means that attachment/detachment of objects does not occur in the
&lt;br&gt;&amp;gt; same
&lt;br&gt;&amp;gt; &amp;gt; way using Hibernate, JPA, ... as the code works for Hibernate
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Does anybody knows what was the intend to use this code in the transform
&lt;br&gt;&amp;gt; &amp;gt; class ?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No I guess many of those &amp;quot;standards&amp;quot; are still problematic to use as
&lt;br&gt;&amp;gt; some impl. do X and others do Y.
&lt;br&gt;&amp;gt; I guess maybe some detach or whatever needs to be added when it
&lt;br&gt;&amp;gt; inserts the customer.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can you not try looking into this as you are messing with it already?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; **
&lt;br&gt;&amp;gt; &amp;gt; * Finds a customer for the given username, or creates and inserts a new
&lt;br&gt;&amp;gt; one
&lt;br&gt;&amp;gt; &amp;gt; */
&lt;br&gt;&amp;gt; &amp;gt; protected CustomerEntity findCustomerByName(JpaTemplate template, String
&lt;br&gt;&amp;gt; &amp;gt; user) {
&lt;br&gt;&amp;gt; &amp;gt; List&amp;lt;CustomerEntity&amp;gt; list = CastUtils.cast(template.find(&amp;quot;select x from &amp;quot;
&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; &amp;gt; CustomerEntity.class.getName() + &amp;quot; x where x.userName = ?1&amp;quot;, user));
&lt;br&gt;&amp;gt; &amp;gt; if (list.isEmpty()) {
&lt;br&gt;&amp;gt; &amp;gt; CustomerEntity answer = new CustomerEntity();
&lt;br&gt;&amp;gt; &amp;gt; answer.setUserName(user);
&lt;br&gt;&amp;gt; &amp;gt; template.persist(answer);
&lt;br&gt;&amp;gt; &amp;gt; return answer;
&lt;br&gt;&amp;gt; &amp;gt; } else {
&lt;br&gt;&amp;gt; &amp;gt; return list.get(0);
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; &amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; &amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; *****************************
&lt;br&gt;&amp;gt; &amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 1:11 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26690163&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; When I try to use the example camel-example-etl with openJPA, here is
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; error that I receive
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] Tracer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INFO
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; be7ae591-e2ea-4021-8179-d6bdd5f5398c &amp;gt;&amp;gt;&amp;gt; (route1) &amp;nbsp;--&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; jpa://org.apache.camel.ex
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ample.etl.CustomerEntity?consumeLockEntity=true &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; CamelFileAbsolutePath=D:\Dvlpt\Java\workspace
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; \apache-camel-source\examples\camel-example-etl\src\data\row2.xml,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; CamelFilePath=src\data\row2
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; .xml, CamelFileParent=src\data, CamelFileAbsolute=false,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; CamelFileLength=982, CamelFileLastModified=Tue Jul 14 10:37:40 CEST
&lt;br&gt;&amp;gt; 2009},
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; BodyType:org.apach
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; e.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; executing prepstmnt 585058
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; SELECT t0.id, t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; WHERE (t0.userName = ?)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; [params=(String) hiram]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] CustomerTransformer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Created customer: Customer[userName: hiram firstName: Hiram surname:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Chirino]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; executing prepstmnt 19041450
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; SELECT t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; WHERE t0.id = ?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; [params=(long) 0]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL -
&lt;br&gt;&amp;gt; &amp;lt;t
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; [ Camel thread 0: FileComponent] DefaultErrorHandler &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Failed delivery for exchangeId: be7ae591-e2ea-4021-8179-d6bdd5f5398c. On
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; deliver
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; y attempt: 0 caught:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; org.springframework.dao.DataIntegrityViolationException: Attempt to
&lt;br&gt;&amp;gt; persist
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; detached object &amp;quot;org.apache.camel.example.etl.Custome
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; rEntity@8bfa09&amp;quot;. &amp;nbsp;If this is a new instance, make sure any version
&lt;br&gt;&amp;gt; and/or
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; auto-generated primary key fields are null/default when persisting.;
&lt;br&gt;&amp;gt; nested
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; exception is &amp;lt;openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal store
&lt;br&gt;&amp;gt; error&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; org.apache.openjpa.persistence.EntityExistsException: Attempt to persist
&lt;br&gt;&amp;gt; det
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ached object &amp;quot;org.apache.camel.example.etl.CustomerEntity@8bfa09&amp;quot;. &amp;nbsp;If
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; this is a new instance, make sure any version and/or auto-generated
&lt;br&gt;&amp;gt; primary
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; key
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp;fields are null/default when persisting.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Anybody has an idea to avoid this ?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-example-etl---openJPA-%28If-this-is-a-new-instance%2C-make-sure-any--version-and-or-auto-generated-primary-key-fields-are-null-default-when--persisting%29-tp26676380p26690163.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689355</id>
	<title>Re: Camel &amp; MINA Compont</title>
	<published>2009-12-07T22:35:53Z</published>
	<updated>2009-12-07T22:35:53Z</updated>
	<author>
		<name>Adrian Trenaman-2</name>
	</author>
	<content type="html">Hi there,
&lt;br&gt;&lt;br&gt;I recommend first going to the Apache Mina project: there's a pretty good tutorial there on the use of Mina. Then, take a look at the page on the camel mina component at camel.apache.org. &amp;nbsp;
&lt;br&gt;&lt;br&gt;/Ade
&lt;br&gt;&lt;br&gt;----- Original Message -----
&lt;br&gt;From: GilbertLin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689355&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;6555tw.gilbert@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689355&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689355&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Tue Dec 08 01:32:24 2009
&lt;br&gt;Subject: Camel &amp; MINA Compont
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;I am a student, and want research &amp;nbsp;Camel for implement banking payment
&lt;br&gt;gateway currently.
&lt;br&gt;&lt;br&gt;I already study Content Based Router, Splitter, Message Transformation
&lt;br&gt;example from Fuse's Webinar
&lt;br&gt;&lt;br&gt;is there any exmaple about using MINA Compont, I don't know how to start
&lt;br&gt;config or coding?
&lt;br&gt;is Mina &amp;nbsp;like ActiveMQ need before Camel start?
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/file/p26689336/TCP.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/file/p26689336/TCP.jpg&lt;/a&gt;&amp;nbsp;
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/Camel---MINA-Compont-tp26689336p26689336.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Camel---MINA-Compont-tp26689336p26689336.html&lt;/a&gt;&lt;br&gt;Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Camel---MINA-Compont-tp26689355p26689355.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689336</id>
	<title>Camel &amp; MINA Compont</title>
	<published>2009-12-07T22:32:22Z</published>
	<updated>2009-12-07T22:32:22Z</updated>
	<author>
		<name>GilbertLin</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I am a student, and want research &amp;nbsp;Camel for implement banking payment gateway currently.
&lt;br&gt;&lt;br&gt;I already study Content Based Router, Splitter, Message Transformation example from Fuse's Webinar
&lt;br&gt;&lt;br&gt;is there any exmaple about using MINA Compont, I don't know how to start config or coding?
&lt;br&gt;is Mina &amp;nbsp;like ActiveMQ need before Camel start?
&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://old.nabble.com/file/p26689336/TCP.jpg&quot; border=&quot;0&quot; /&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Camel---MINA-Compont-tp26689336p26689336.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26688965</id>
	<title>Re: Request-Response with Producer/Consumer Templates</title>
	<published>2009-12-07T21:31:20Z</published>
	<updated>2009-12-07T21:31:20Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;What JMS Broker are you using?
&lt;br&gt;&lt;br&gt;I do think brokers can mess with the correlation id so its not always
&lt;br&gt;as strait forward as people think with JMS.
&lt;br&gt;And what version of Camel are you using?
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 6:29 AM, Claus Ibsen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26688965&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;claus.ibsen@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you create a route on the server side, then Camel should take care
&lt;br&gt;&amp;gt; of it all. As it can detect the JMSReplyTo header and know where to
&lt;br&gt;&amp;gt; send the reply with the correlation id etc.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 1:39 AM, FCasale &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26688965&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fallfollower@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks, I am much closer now... I'm just not sure how to set the
&lt;br&gt;&amp;gt;&amp;gt; correlationId for the reply message.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It is coming back correlationId=null and is therefore ignored.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On the server side I am trying this:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Exchange exch = consumer.receive(&amp;quot;test-jms:queue:test.queue&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; Message msg = exch.getIn();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; producer.sendBodyAndHeader(msg.getHeader(&amp;quot;JMSReplyTo&amp;quot;).toString(), &amp;quot;Ho Ho&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;JMSCorrelationId&amp;quot;, msg.getHeader(&amp;quot;JMSCorrelationId&amp;quot;).toString());
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --------------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So the message is replying on the correct temporary queue... but with no
&lt;br&gt;&amp;gt;&amp;gt; correlationId so the response message is being ignored....
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; How do I set the correlationId on the response message?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26686915.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26686915.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26688965.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26688960</id>
	<title>Re: Request-Response with Producer/Consumer Templates</title>
	<published>2009-12-07T21:29:51Z</published>
	<updated>2009-12-07T21:29:51Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;If you create a route on the server side, then Camel should take care
&lt;br&gt;of it all. As it can detect the JMSReplyTo header and know where to
&lt;br&gt;send the reply with the correlation id etc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 1:39 AM, FCasale &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26688960&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fallfollower@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks, I am much closer now... I'm just not sure how to set the
&lt;br&gt;&amp;gt; correlationId for the reply message.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It is coming back correlationId=null and is therefore ignored.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On the server side I am trying this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Exchange exch = consumer.receive(&amp;quot;test-jms:queue:test.queue&amp;quot;);
&lt;br&gt;&amp;gt; Message msg = exch.getIn();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; producer.sendBodyAndHeader(msg.getHeader(&amp;quot;JMSReplyTo&amp;quot;).toString(), &amp;quot;Ho Ho&amp;quot;,
&lt;br&gt;&amp;gt; &amp;quot;JMSCorrelationId&amp;quot;, msg.getHeader(&amp;quot;JMSCorrelationId&amp;quot;).toString());
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So the message is replying on the correct temporary queue... but with no
&lt;br&gt;&amp;gt; correlationId so the response message is being ignored....
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How do I set the correlationId on the response message?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26686915.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26686915.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26688960.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26686915</id>
	<title>Re: Request-Response with Producer/Consumer Templates</title>
	<published>2009-12-07T16:39:02Z</published>
	<updated>2009-12-07T16:39:02Z</updated>
	<author>
		<name>FCasale</name>
	</author>
	<content type="html">&lt;br&gt;Thanks, I am much closer now... I'm just not sure how to set the correlationId for the reply message.
&lt;br&gt;&lt;br&gt;It is coming back correlationId=null and is therefore ignored.
&lt;br&gt;&lt;br&gt;On the server side I am trying this:
&lt;br&gt;&lt;br&gt;--------------
&lt;br&gt;&lt;br&gt;Exchange exch = consumer.receive(&amp;quot;test-jms:queue:test.queue&amp;quot;);
&lt;br&gt;Message msg = exch.getIn();
&lt;br&gt;&lt;br&gt;producer.sendBodyAndHeader(msg.getHeader(&amp;quot;JMSReplyTo&amp;quot;).toString(), &amp;quot;Ho Ho&amp;quot;, &amp;quot;JMSCorrelationId&amp;quot;, msg.getHeader(&amp;quot;JMSCorrelationId&amp;quot;).toString());
&lt;br&gt;&lt;br&gt;--------------
&lt;br&gt;&lt;br&gt;So the message is replying on the correct temporary queue... but with no correlationId so the response message is being ignored....
&lt;br&gt;&lt;br&gt;How do I set the correlationId on the response message?
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-Response-with-Producer-Consumer-Templates-tp26635175p26686915.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26682616</id>
	<title>Re: camel-example-etl &amp; openJPA (If this is a new instance, make sure  any version and/or auto-generated primary key fields are null/default when  persisting)</title>
	<published>2009-12-07T11:20:58Z</published>
	<updated>2009-12-07T11:20:58Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Mon, Dec 7, 2009 at 2:00 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26682616&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have understand why we have this error :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In fact, within the CustomerTransformer class, the method findCustomerByName
&lt;br&gt;&amp;gt; (which is called) uses 'template.persist(answer);' who will inform Spring to
&lt;br&gt;&amp;gt; insert in the DB a customerEntity object if it not find from the SQL query.
&lt;br&gt;&amp;gt; Next, the same object is send to the JPA endpoint who will detect that the
&lt;br&gt;&amp;gt; object has not been detached.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That means that attachment/detachment of objects does not occur in the same
&lt;br&gt;&amp;gt; way using Hibernate, JPA, ... as the code works for Hibernate
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Does anybody knows what was the intend to use this code in the transform
&lt;br&gt;&amp;gt; class ?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;No I guess many of those &amp;quot;standards&amp;quot; are still problematic to use as
&lt;br&gt;some impl. do X and others do Y.
&lt;br&gt;I guess maybe some detach or whatever needs to be added when it
&lt;br&gt;inserts the customer.
&lt;br&gt;&lt;br&gt;Can you not try looking into this as you are messing with it already?
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; **
&lt;br&gt;&amp;gt; * Finds a customer for the given username, or creates and inserts a new one
&lt;br&gt;&amp;gt; */
&lt;br&gt;&amp;gt; protected CustomerEntity findCustomerByName(JpaTemplate template, String
&lt;br&gt;&amp;gt; user) {
&lt;br&gt;&amp;gt; List&amp;lt;CustomerEntity&amp;gt; list = CastUtils.cast(template.find(&amp;quot;select x from &amp;quot; +
&lt;br&gt;&amp;gt; CustomerEntity.class.getName() + &amp;quot; x where x.userName = ?1&amp;quot;, user));
&lt;br&gt;&amp;gt; if (list.isEmpty()) {
&lt;br&gt;&amp;gt; CustomerEntity answer = new CustomerEntity();
&lt;br&gt;&amp;gt; answer.setUserName(user);
&lt;br&gt;&amp;gt; template.persist(answer);
&lt;br&gt;&amp;gt; return answer;
&lt;br&gt;&amp;gt; } else {
&lt;br&gt;&amp;gt; return list.get(0);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 1:11 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26682616&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; When I try to use the example camel-example-etl with openJPA, here is the
&lt;br&gt;&amp;gt;&amp;gt; error that I receive
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [ Camel thread 0: FileComponent] Tracer                         INFO
&lt;br&gt;&amp;gt;&amp;gt; be7ae591-e2ea-4021-8179-d6bdd5f5398c &amp;gt;&amp;gt;&amp;gt; (route1)  --&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; jpa://org.apache.camel.ex
&lt;br&gt;&amp;gt;&amp;gt; ample.etl.CustomerEntity?consumeLockEntity=true &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;&amp;gt;&amp;gt; Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;&amp;gt;&amp;gt; CamelFileAbsolutePath=D:\Dvlpt\Java\workspace
&lt;br&gt;&amp;gt;&amp;gt; \apache-camel-source\examples\camel-example-etl\src\data\row2.xml,
&lt;br&gt;&amp;gt;&amp;gt; CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;&amp;gt;&amp;gt; CamelFilePath=src\data\row2
&lt;br&gt;&amp;gt;&amp;gt; .xml, CamelFileParent=src\data, CamelFileAbsolute=false,
&lt;br&gt;&amp;gt;&amp;gt; CamelFileLength=982, CamelFileLastModified=Tue Jul 14 10:37:40 CEST 2009},
&lt;br&gt;&amp;gt;&amp;gt; BodyType:org.apach
&lt;br&gt;&amp;gt;&amp;gt; e.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;&amp;gt;&amp;gt; user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 16094  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; executing prepstmnt 585058
&lt;br&gt;&amp;gt;&amp;gt; SELECT t0.id, t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt;&amp;gt;         t0.userName, t0.zip
&lt;br&gt;&amp;gt;&amp;gt;     FROM Customer t0
&lt;br&gt;&amp;gt;&amp;gt;     WHERE (t0.userName = ?)
&lt;br&gt;&amp;gt;&amp;gt; [params=(String) hiram]
&lt;br&gt;&amp;gt;&amp;gt; 16094  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; 12662763, conn 1634627&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt;&amp;gt; [ Camel thread 0: FileComponent] CustomerTransformer            DEBUG
&lt;br&gt;&amp;gt;&amp;gt; Created customer: Customer[userName: hiram firstName: Hiram surname:
&lt;br&gt;&amp;gt;&amp;gt; Chirino]
&lt;br&gt;&amp;gt;&amp;gt; 16110  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; executing prepstmnt 19041450
&lt;br&gt;&amp;gt;&amp;gt; SELECT t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt;&amp;gt;         t0.userName, t0.zip
&lt;br&gt;&amp;gt;&amp;gt;     FROM Customer t0
&lt;br&gt;&amp;gt;&amp;gt;     WHERE t0.id = ?
&lt;br&gt;&amp;gt;&amp;gt; [params=(long) 0]
&lt;br&gt;&amp;gt;&amp;gt; 16110  camel  TRACE  [Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt;&amp;gt; 12662763, conn 21035203&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt;&amp;gt; [ Camel thread 0: FileComponent] DefaultErrorHandler            DEBUG
&lt;br&gt;&amp;gt;&amp;gt; Failed delivery for exchangeId: be7ae591-e2ea-4021-8179-d6bdd5f5398c. On
&lt;br&gt;&amp;gt;&amp;gt; deliver
&lt;br&gt;&amp;gt;&amp;gt; y attempt: 0 caught:
&lt;br&gt;&amp;gt;&amp;gt; org.springframework.dao.DataIntegrityViolationException: Attempt to persist
&lt;br&gt;&amp;gt;&amp;gt; detached object &amp;quot;org.apache.camel.example.etl.Custome
&lt;br&gt;&amp;gt;&amp;gt; rEntity@8bfa09&amp;quot;.  If this is a new instance, make sure any version and/or
&lt;br&gt;&amp;gt;&amp;gt; auto-generated primary key fields are null/default when persisting.; nested
&lt;br&gt;&amp;gt;&amp;gt; exception is &amp;lt;openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal store error&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; org.apache.openjpa.persistence.EntityExistsException: Attempt to persist det
&lt;br&gt;&amp;gt;&amp;gt; ached object &amp;quot;org.apache.camel.example.etl.CustomerEntity@8bfa09&amp;quot;.  If
&lt;br&gt;&amp;gt;&amp;gt; this is a new instance, make sure any version and/or auto-generated primary
&lt;br&gt;&amp;gt;&amp;gt; key
&lt;br&gt;&amp;gt;&amp;gt;  fields are null/default when persisting.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Anybody has an idea to avoid this ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-example-etl---openJPA-%28If-this-is-a-new-instance%2C-make-sure-any--version-and-or-auto-generated-primary-key-fields-are-null-default-when--persisting%29-tp26676380p26682616.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26682573</id>
	<title>Re: Can't return null with Camel remoting</title>
	<published>2009-12-07T11:18:36Z</published>
	<updated>2009-12-07T11:18:36Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;Could you please use more time to report this issue?
&lt;br&gt;&lt;br&gt;Create a JIRA ticket and attach a sample with the problem if possible.
&lt;br&gt;At least post the stacktrace and you route and remote service
&lt;br&gt;interfaces and whatnot, so we have something to use to track the
&lt;br&gt;issue.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 7:52 PM, Ming Fang &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26682573&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mingfang@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Camel v2.1 no longer allow remote service to return null value.
&lt;br&gt;&amp;gt; I'm getting a InvalidPayloadException in CamelInvocationHandler.invoke().
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is a bug since it is legal to return null values.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; --Ming
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Can%27t-return-null-with-Camel-remoting-tp26682177p26682573.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26682177</id>
	<title>Can't return null with Camel remoting</title>
	<published>2009-12-07T10:52:06Z</published>
	<updated>2009-12-07T10:52:06Z</updated>
	<author>
		<name>Ming Fang</name>
	</author>
	<content type="html">Camel v2.1 no longer allow remote service to return null value.
&lt;br&gt;I'm getting a InvalidPayloadException in CamelInvocationHandler.invoke 
&lt;br&gt;().
&lt;br&gt;&lt;br&gt;This is a bug since it is legal to return null values.
&lt;br&gt;&lt;br&gt;--Ming
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Can%27t-return-null-with-Camel-remoting-tp26682177p26682177.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26676949</id>
	<title>Re: camel-example-etl &amp; openJPA (If this is a new instance, make sure  any version and/or auto-generated primary key fields are null/default when  persisting)</title>
	<published>2009-12-07T05:00:59Z</published>
	<updated>2009-12-07T05:00:59Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">I have understand why we have this error :
&lt;br&gt;&lt;br&gt;In fact, within the CustomerTransformer class, the method findCustomerByName
&lt;br&gt;(which is called) uses 'template.persist(answer);' who will inform Spring to
&lt;br&gt;insert in the DB a customerEntity object if it not find from the SQL query.
&lt;br&gt;Next, the same object is send to the JPA endpoint who will detect that the
&lt;br&gt;object has not been detached.
&lt;br&gt;&lt;br&gt;That means that attachment/detachment of objects does not occur in the same
&lt;br&gt;way using Hibernate, JPA, ... as the code works for Hibernate
&lt;br&gt;&lt;br&gt;Does anybody knows what was the intend to use this code in the transform
&lt;br&gt;class ?
&lt;br&gt;&lt;br&gt;**
&lt;br&gt;* Finds a customer for the given username, or creates and inserts a new one
&lt;br&gt;*/
&lt;br&gt;protected CustomerEntity findCustomerByName(JpaTemplate template, String
&lt;br&gt;user) {
&lt;br&gt;List&amp;lt;CustomerEntity&amp;gt; list = CastUtils.cast(template.find(&amp;quot;select x from &amp;quot; +
&lt;br&gt;CustomerEntity.class.getName() + &amp;quot; x where x.userName = ?1&amp;quot;, user));
&lt;br&gt;if (list.isEmpty()) {
&lt;br&gt;CustomerEntity answer = new CustomerEntity();
&lt;br&gt;answer.setUserName(user);
&lt;br&gt;template.persist(answer);
&lt;br&gt;return answer;
&lt;br&gt;} else {
&lt;br&gt;return list.get(0);
&lt;br&gt;}
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 1:11 PM, Charles Moulliard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26676949&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cmoulliard@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; When I try to use the example camel-example-etl with openJPA, here is the
&lt;br&gt;&amp;gt; error that I receive
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [ Camel thread 0: FileComponent] Tracer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INFO
&lt;br&gt;&amp;gt; be7ae591-e2ea-4021-8179-d6bdd5f5398c &amp;gt;&amp;gt;&amp;gt; (route1) &amp;nbsp;--&amp;gt;
&lt;br&gt;&amp;gt; jpa://org.apache.camel.ex
&lt;br&gt;&amp;gt; ample.etl.CustomerEntity?consumeLockEntity=true &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;&amp;gt; Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;&amp;gt; CamelFileAbsolutePath=D:\Dvlpt\Java\workspace
&lt;br&gt;&amp;gt; \apache-camel-source\examples\camel-example-etl\src\data\row2.xml,
&lt;br&gt;&amp;gt; CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;&amp;gt; CamelFilePath=src\data\row2
&lt;br&gt;&amp;gt; .xml, CamelFileParent=src\data, CamelFileAbsolute=false,
&lt;br&gt;&amp;gt; CamelFileLength=982, CamelFileLastModified=Tue Jul 14 10:37:40 CEST 2009},
&lt;br&gt;&amp;gt; BodyType:org.apach
&lt;br&gt;&amp;gt; e.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;&amp;gt; user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;&amp;gt; 16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt; 12662763, conn 1634627&amp;gt; executing prepstmnt 585058
&lt;br&gt;&amp;gt; SELECT t0.id, t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; WHERE (t0.userName = ?)
&lt;br&gt;&amp;gt; [params=(String) hiram]
&lt;br&gt;&amp;gt; 16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt; 12662763, conn 1634627&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt; [ Camel thread 0: FileComponent] CustomerTransformer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;&amp;gt; Created customer: Customer[userName: hiram firstName: Hiram surname:
&lt;br&gt;&amp;gt; Chirino]
&lt;br&gt;&amp;gt; 16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt; 12662763, conn 21035203&amp;gt; executing prepstmnt 19041450
&lt;br&gt;&amp;gt; SELECT t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; WHERE t0.id = ?
&lt;br&gt;&amp;gt; [params=(long) 0]
&lt;br&gt;&amp;gt; 16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;&amp;gt; 12662763, conn 21035203&amp;gt; [0 ms] spent
&lt;br&gt;&amp;gt; [ Camel thread 0: FileComponent] DefaultErrorHandler &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;&amp;gt; Failed delivery for exchangeId: be7ae591-e2ea-4021-8179-d6bdd5f5398c. On
&lt;br&gt;&amp;gt; deliver
&lt;br&gt;&amp;gt; y attempt: 0 caught:
&lt;br&gt;&amp;gt; org.springframework.dao.DataIntegrityViolationException: Attempt to persist
&lt;br&gt;&amp;gt; detached object &amp;quot;org.apache.camel.example.etl.Custome
&lt;br&gt;&amp;gt; rEntity@8bfa09&amp;quot;. &amp;nbsp;If this is a new instance, make sure any version and/or
&lt;br&gt;&amp;gt; auto-generated primary key fields are null/default when persisting.; nested
&lt;br&gt;&amp;gt; exception is &amp;lt;openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal store error&amp;gt;
&lt;br&gt;&amp;gt; org.apache.openjpa.persistence.EntityExistsException: Attempt to persist det
&lt;br&gt;&amp;gt; ached object &amp;quot;org.apache.camel.example.etl.CustomerEntity@8bfa09&amp;quot;. &amp;nbsp;If
&lt;br&gt;&amp;gt; this is a new instance, make sure any version and/or auto-generated primary
&lt;br&gt;&amp;gt; key
&lt;br&gt;&amp;gt; &amp;nbsp;fields are null/default when persisting.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anybody has an idea to avoid this ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Charles Moulliard
&lt;br&gt;&amp;gt; Senior Enterprise Architect
&lt;br&gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *****************************
&lt;br&gt;&amp;gt; blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt; Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Apache Camel Group :
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-example-etl---openJPA-%28If-this-is-a-new-instance%2C-make-sure-any--version-and-or-auto-generated-primary-key-fields-are-null-default-when--persisting%29-tp26676380p26676949.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26676499</id>
	<title>Re: handled exception in sub-route</title>
	<published>2009-12-07T04:21:24Z</published>
	<updated>2009-12-07T04:21:24Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Mon, Dec 7, 2009 at 1:19 PM, trivedi kumar b
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26676499&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Trivedi.Bodlapati@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Eventhough I use doTry().. doCatch() blocks to handle the issue that Jens
&lt;br&gt;&amp;gt; explained before, the problem is still exists, this is how my route looks
&lt;br&gt;&amp;gt; like in which the call never goes to &amp;quot;direct:C&amp;quot; when there is an exception
&lt;br&gt;&amp;gt; in sub-route &amp;quot;B&amp;quot;:
&lt;br&gt;&amp;gt;        from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;                .doTry()
&lt;br&gt;&amp;gt;                        .transacted().end()
&lt;br&gt;&amp;gt;                        .code goes that throws an exception
&lt;br&gt;&amp;gt;                .doCatch(Exception.class)
&lt;br&gt;&amp;gt;                        .handled(true)
&lt;br&gt;&amp;gt;                        .markRollbackOnly()
&lt;br&gt;&amp;gt;                .end();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;                .....
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Yeah the original ticket is not resolved
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sun, Dec 6, 2009 at 11:25 PM, trivedi kumar b
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26676499&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Trivedi.Bodlapati@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If I use doTry.. doCatch, with similar route that includes transactions,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; will that work as expected? I mean, markRollbackOnly() option inside
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; doCatch() will rollback the transaction? Pls let me know the behaviour.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Yes markRollbackOnly() is only for transactions and will issue a
&lt;br&gt;&amp;gt;&amp;gt; status.setRollbackOnly() on the Spring Transaction underneath.
&lt;br&gt;&amp;gt;&amp;gt; That should render the transaction outcome as rollback only.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It will not tamper with the Exchange by setting an exception as
&lt;br&gt;&amp;gt;&amp;gt; rollback() does by setting a RollbackException on the Exchange.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Trivedi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 10:45 AM, kyt &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26676499&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kythary@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I need some advice on how to handle an exception in a sub-route and how
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; calling route can continue processing. It is easier to explain this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bit of code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                .onException(Exception.class).handled(true).end()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                . code that throws an exception
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Now, if there is an exception in direct:B, direct:C never gets called.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Through debugging I found out that the pipeline in direct:A stops
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; processing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; because it checks an exchange property (Exchange.ERRORHANDLER_HANDLED).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; using Camel 2.0. Is there a way that the processing in direct:A
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; continues
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; after the exception was handled in direct:B?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Unfortunately the logic for error handling got a bit complex.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Something to improve in 2.2. I am currently making the TX based
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; simpler in internal logic.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Back to your use case.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The doTry .. doCatch will work as regular try .. catch and thus what
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; you would expect so route A will continue
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In terms on onException we should improve this over time, adding some
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; flag to indicate what you want. As some want to use onException to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; catch that error and create a custom error messages as reply and thus
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not process and further.  And others as you want a kinda try .. catch
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; logic and just ignore the damn exception.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Jens
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26676468.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26676468.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26676499.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26676468</id>
	<title>Re: handled exception in sub-route</title>
	<published>2009-12-07T04:19:20Z</published>
	<updated>2009-12-07T04:19:20Z</updated>
	<author>
		<name>trivedi kumar b</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Eventhough I use doTry().. doCatch() blocks to handle the issue that Jens explained before, the problem is still exists, this is how my route looks like in which the call never goes to &amp;quot;direct:C&amp;quot; when there is an exception in sub-route &amp;quot;B&amp;quot;:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .doTry()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .transacted().end()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .code goes that throws an exception
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .doCatch(Exception.class)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .handled(true)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .markRollbackOnly()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .end();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .....
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On Sun, Dec 6, 2009 at 11:25 PM, trivedi kumar b
&lt;br&gt;&amp;lt;Trivedi.Bodlapati@ge.com&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I use doTry.. doCatch, with similar route that includes transactions,
&lt;br&gt;&amp;gt; will that work as expected? I mean, markRollbackOnly() option inside
&lt;br&gt;&amp;gt; doCatch() will rollback the transaction? Pls let me know the behaviour.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes markRollbackOnly() is only for transactions and will issue a
&lt;br&gt;status.setRollbackOnly() on the Spring Transaction underneath.
&lt;br&gt;That should render the transaction outcome as rollback only.
&lt;br&gt;&lt;br&gt;It will not tamper with the Exchange by setting an exception as
&lt;br&gt;rollback() does by setting a RollbackException on the Exchange.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Trivedi
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 10:45 AM, kyt &amp;lt;kythary@t-online.de&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I need some advice on how to handle an exception in a sub-route and how
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; calling route can continue processing. It is easier to explain this with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; bit of code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                .onException(Exception.class).handled(true).end()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                . code that throws an exception
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Now, if there is an exception in direct:B, direct:C never gets called.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Through debugging I found out that the pipeline in direct:A stops
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; processing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; because it checks an exchange property (Exchange.ERRORHANDLER_HANDLED).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; using Camel 2.0. Is there a way that the processing in direct:A continues
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; after the exception was handled in direct:B?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Unfortunately the logic for error handling got a bit complex.
&lt;br&gt;&amp;gt;&amp;gt; Something to improve in 2.2. I am currently making the TX based
&lt;br&gt;&amp;gt;&amp;gt; simpler in internal logic.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Back to your use case.
&lt;br&gt;&amp;gt;&amp;gt; The doTry .. doCatch will work as regular try .. catch and thus what
&lt;br&gt;&amp;gt;&amp;gt; you would expect so route A will continue
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In terms on onException we should improve this over time, adding some
&lt;br&gt;&amp;gt;&amp;gt; flag to indicate what you want. As some want to use onException to
&lt;br&gt;&amp;gt;&amp;gt; catch that error and create a custom error messages as reply and thus
&lt;br&gt;&amp;gt;&amp;gt; not process and further.  And others as you want a kinda try .. catch
&lt;br&gt;&amp;gt;&amp;gt; logic and just ignore the damn exception.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Jens
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26676468.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26676380</id>
	<title>camel-example-etl &amp; openJPA (If this is a new instance, make sure any  version and/or auto-generated primary key fields are null/default when  persisting)</title>
	<published>2009-12-07T04:11:19Z</published>
	<updated>2009-12-07T04:11:19Z</updated>
	<author>
		<name>cmoulliard</name>
	</author>
	<content type="html">When I try to use the example camel-example-etl with openJPA, here is the
&lt;br&gt;error that I receive
&lt;br&gt;&lt;br&gt;[ Camel thread 0: FileComponent] Tracer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INFO
&lt;br&gt;be7ae591-e2ea-4021-8179-d6bdd5f5398c &amp;gt;&amp;gt;&amp;gt; (route1) &amp;nbsp;--&amp;gt;
&lt;br&gt;jpa://org.apache.camel.ex
&lt;br&gt;ample.etl.CustomerEntity?consumeLockEntity=true &amp;lt;&amp;lt;&amp;lt; Pattern:InOnly,
&lt;br&gt;Headers:{CamelFileNameOnly=row2.xml,
&lt;br&gt;CamelFileAbsolutePath=D:\Dvlpt\Java\workspace
&lt;br&gt;\apache-camel-source\examples\camel-example-etl\src\data\row2.xml,
&lt;br&gt;CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
&lt;br&gt;CamelFilePath=src\data\row2
&lt;br&gt;.xml, CamelFileParent=src\data, CamelFileAbsolute=false,
&lt;br&gt;CamelFileLength=982, CamelFileLastModified=Tue Jul 14 10:37:40 CEST 2009},
&lt;br&gt;BodyType:org.apach
&lt;br&gt;e.camel.example.etl.PersonDocument, Body:&amp;lt;person
&lt;br&gt;user=&amp;quot;hiram&amp;quot;&amp;gt;&amp;lt;firstName&amp;gt;Hiram&amp;lt;/firstName&amp;gt;&amp;lt;lastName&amp;gt;Chirino&amp;lt;/lastName&amp;gt;&amp;lt;city&amp;gt;Tampa&amp;lt;/city&amp;gt;&amp;lt;/person&amp;gt;
&lt;br&gt;16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;12662763, conn 1634627&amp;gt; executing prepstmnt 585058
&lt;br&gt;SELECT t0.id, t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;nbsp; &amp;nbsp; WHERE (t0.userName = ?)
&lt;br&gt;[params=(String) hiram]
&lt;br&gt;16094 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;12662763, conn 1634627&amp;gt; [0 ms] spent
&lt;br&gt;[ Camel thread 0: FileComponent] CustomerTransformer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG
&lt;br&gt;Created customer: Customer[userName: hiram firstName: Hiram surname:
&lt;br&gt;Chirino]
&lt;br&gt;16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;12662763, conn 21035203&amp;gt; executing prepstmnt 19041450
&lt;br&gt;SELECT t0.city, t0.firstName, t0.phone, t0.street, t0.surname,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t0.userName, t0.zip
&lt;br&gt;&amp;nbsp; &amp;nbsp; FROM Customer t0
&lt;br&gt;&amp;nbsp; &amp;nbsp; WHERE t0.id = ?
&lt;br&gt;[params=(long) 0]
&lt;br&gt;16110 &amp;nbsp;camel &amp;nbsp;TRACE &amp;nbsp;[Camel thread 0: FileComponent] openjpa.jdbc.SQL - &amp;lt;t
&lt;br&gt;12662763, conn 21035203&amp;gt; [0 ms] spent
&lt;br&gt;[ Camel thread 0: FileComponent] DefaultErrorHandler &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEBUG Failed
&lt;br&gt;delivery for exchangeId: be7ae591-e2ea-4021-8179-d6bdd5f5398c. On deliver
&lt;br&gt;y attempt: 0 caught:
&lt;br&gt;org.springframework.dao.DataIntegrityViolationException: Attempt to persist
&lt;br&gt;detached object &amp;quot;org.apache.camel.example.etl.Custome
&lt;br&gt;rEntity@8bfa09&amp;quot;. &amp;nbsp;If this is a new instance, make sure any version and/or
&lt;br&gt;auto-generated primary key fields are null/default when persisting.; nested
&lt;br&gt;exception is &amp;lt;openjpa-1.3.0-SNAPSHOT-r422266:881892 nonfatal store error&amp;gt;
&lt;br&gt;org.apache.openjpa.persistence.EntityExistsException: Attempt to persist det
&lt;br&gt;ached object &amp;quot;org.apache.camel.example.etl.CustomerEntity@8bfa09&amp;quot;. &amp;nbsp;If this
&lt;br&gt;is a new instance, make sure any version and/or auto-generated primary key
&lt;br&gt;&amp;nbsp;fields are null/default when persisting.
&lt;br&gt;&lt;br&gt;Anybody has an idea to avoid this ?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Charles Moulliard
&lt;br&gt;Senior Enterprise Architect
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;*****************************
&lt;br&gt;blog : &lt;a href=&quot;http://cmoulliard.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com&lt;/a&gt;&lt;br&gt;twitter : &lt;a href=&quot;http://twitter.com/cmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/cmoulliard&lt;/a&gt;&lt;br&gt;Linkedlin : &lt;a href=&quot;http://www.linkedin.com/in/charlesmoulliard&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/charlesmoulliard&lt;/a&gt;&lt;br&gt;&lt;br&gt;Apache Camel Group :
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/groups?home=&amp;gid=2447439&amp;trk=anet_ug_hm&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Charles Moulliard
&lt;br&gt;SOA Architect
&lt;br&gt;&lt;br&gt;My Blog : &lt;a href=&quot;http://cmoulliard.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cmoulliard.blogspot.com/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/camel-example-etl---openJPA-%28If-this-is-a-new-instance%2C-make-sure-any--version-and-or-auto-generated-primary-key-fields-are-null-default-when--persisting%29-tp26676380p26676380.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26674507</id>
	<title>Re: cometd client connector for Camel</title>
	<published>2009-12-07T01:12:01Z</published>
	<updated>2009-12-07T01:12:01Z</updated>
	<author>
		<name>Hendy Irawan</name>
	</author>
	<content type="html">Hi Claus,
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;I have no idea. But we love contributions so if you think you can
&lt;br&gt;improved the camel-cometd component then that would be great.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I tried making my own camel-comet component. The reason I didn't improve cometd because they're technically different (comet-cometd is a server while camel-comet is a client) and I believe cometd uses an older version of cometd/Bayeux, that's not compatible with the new bayeux I'm using.
&lt;br&gt;&lt;br&gt;I need some help though, Claus. The Producer test runs alright, however the Consumer test is not working.
&lt;br&gt;&lt;br&gt;The logs said that the CometConsumer received the messages correctly, however doing processor.process(exchange) seem to do &amp;quot;nothing&amp;quot;. I configured the test to route from the comet endpoint to &amp;quot;mock:received&amp;quot;, however upon asserts, nothing is received by &amp;quot;mock:received&amp;quot;.
&lt;br&gt;&lt;br&gt;Could somebody help me?
&lt;br&gt;&lt;br&gt;The project is here:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://github.com/ceefour/camel-comet&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/ceefour/camel-comet&lt;/a&gt;&lt;br&gt;&lt;br&gt;In order to run the tests, a local cometd server is needed.
&lt;br&gt;&lt;br&gt;Get the `cometd-demo` project here:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://github.com/ceefour/cometd-demo&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/ceefour/cometd-demo&lt;/a&gt;&lt;br&gt;&lt;br&gt;Deploy it or install the resulting WAR on your container under `/cometd-demo` context so it's accesible by:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://localhost:8080/cometd-demo&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8080/cometd-demo&lt;/a&gt;&lt;br&gt;&lt;br&gt;Run `mvn test` from the `camel-cometd` project to run the tests.
&lt;br&gt;&lt;br&gt;Thank you in advance.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cometd-client-connector-for-Camel-tp26635861p26674507.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26673822</id>
	<title>Re: handled exception in sub-route</title>
	<published>2009-12-06T23:58:59Z</published>
	<updated>2009-12-06T23:58:59Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Sun, Dec 6, 2009 at 11:25 PM, trivedi kumar b
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26673822&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Trivedi.Bodlapati@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I use doTry.. doCatch, with similar route that includes transactions,
&lt;br&gt;&amp;gt; will that work as expected? I mean, markRollbackOnly() option inside
&lt;br&gt;&amp;gt; doCatch() will rollback the transaction? Pls let me know the behaviour.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes markRollbackOnly() is only for transactions and will issue a
&lt;br&gt;status.setRollbackOnly() on the Spring Transaction underneath.
&lt;br&gt;That should render the transaction outcome as rollback only.
&lt;br&gt;&lt;br&gt;It will not tamper with the Exchange by setting an exception as
&lt;br&gt;rollback() does by setting a RollbackException on the Exchange.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Trivedi
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 10:45 AM, kyt &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26673822&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kythary@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I need some advice on how to handle an exception in a sub-route and how
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; calling route can continue processing. It is easier to explain this with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; bit of code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                .onException(Exception.class).handled(true).end()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                . code that throws an exception
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;            from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Now, if there is an exception in direct:B, direct:C never gets called.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Through debugging I found out that the pipeline in direct:A stops
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; processing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; because it checks an exchange property (Exchange.ERRORHANDLER_HANDLED).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; using Camel 2.0. Is there a way that the processing in direct:A continues
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; after the exception was handled in direct:B?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Unfortunately the logic for error handling got a bit complex.
&lt;br&gt;&amp;gt;&amp;gt; Something to improve in 2.2. I am currently making the TX based
&lt;br&gt;&amp;gt;&amp;gt; simpler in internal logic.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Back to your use case.
&lt;br&gt;&amp;gt;&amp;gt; The doTry .. doCatch will work as regular try .. catch and thus what
&lt;br&gt;&amp;gt;&amp;gt; you would expect so route A will continue
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In terms on onException we should improve this over time, adding some
&lt;br&gt;&amp;gt;&amp;gt; flag to indicate what you want. As some want to use onException to
&lt;br&gt;&amp;gt;&amp;gt; catch that error and create a custom error messages as reply and thus
&lt;br&gt;&amp;gt;&amp;gt; not process and further.  And others as you want a kinda try .. catch
&lt;br&gt;&amp;gt;&amp;gt; logic and just ignore the damn exception.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Jens
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26673822.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26673811</id>
	<title>Re: Group of routes and Synchronization on outputs of the group after  a split</title>
	<published>2009-12-06T23:56:53Z</published>
	<updated>2009-12-06T23:56:53Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Sun, Dec 6, 2009 at 9:03 PM, Seb- &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26673811&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;seba.public@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think there is a small problem with this solution that will make it
&lt;br&gt;&amp;gt; unusable as-is for the case when RecipientList returns dynamic recipient
&lt;br&gt;&amp;gt; list.
&lt;br&gt;&amp;gt; AggregationStrategy uses a predefined static messagecount while
&lt;br&gt;&amp;gt; RecipientList may return a dynamic recipient list at runtime (ie in my
&lt;br&gt;&amp;gt; example a certain message might flow out only through o2 and not o1).
&lt;br&gt;&amp;gt; So the AggregationStrategy would need to update messagecount for certain
&lt;br&gt;&amp;gt; message through all their life in the flow (possibly incrementing when a
&lt;br&gt;&amp;gt; RecipientList throws 2 entries or keep as-is when only 1 entry).
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;No AggregationStrategy does not use a predefined static message count.
&lt;br&gt;&lt;br&gt;If your recipient list returns 1 endpoint, the aggregation will only
&lt;br&gt;be invoked once, to aggregate o1 with the input message.
&lt;br&gt;&lt;br&gt;If your recipient list returns 2 endpoints, the aggregation will be
&lt;br&gt;invoked twice, to aggregate o1 with input message, and then o2 with
&lt;br&gt;the &amp;quot;result from last aggregation&amp;quot;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Seb- wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Sounds interesting.
&lt;br&gt;&amp;gt;&amp;gt; I'll have a look at this.
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; Sébastien.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Sun, Dec 6, 2009 at 6:53 PM, Seb- &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26673811&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;seba.public@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Let's say I have 3 components, Component1 is a RecipientList sending the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; message to both Component2 and Component3.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Is there an easy configuration way for Camel to do a synchronization on
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; outputs (o2 &amp; o3) of Component2 &amp; Component3 with the original message
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; coming from Component1.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;             /----[]----- o2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; i1 --[]--/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;           \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;             \-----[]---- o3
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Yes its possible unfortunately we didnt make that possible easily out
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; of the box until Camel 2.2. You may say that slipped our minds.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The recipient list in 2.2 supports AggregationStrategy so you can
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; combine the response from o2 and o3 as you like.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ticket about it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-2223&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-2223&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; See more at, section Using custom AggregationStrategy
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://camel.apache.org/recipient-list.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camel.apache.org/recipient-list.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; See this thread for how you may work around and with some custom
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; coding do that in 2.1 or older
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/recipientList-multithreading-td26635868.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/recipientList-multithreading-td26635868.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sébastien.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Apache Camel Committer
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26668433.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26668433.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26673811.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26669550</id>
	<title>Re: handled exception in sub-route</title>
	<published>2009-12-06T14:25:53Z</published>
	<updated>2009-12-06T14:25:53Z</updated>
	<author>
		<name>trivedi kumar b</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;If I use doTry.. doCatch, with similar route that includes transactions, will that work as expected? I mean, markRollbackOnly() option inside doCatch() will rollback the transaction? Pls let me know the behaviour.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Trivedi
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On Thu, Dec 3, 2009 at 10:45 AM, kyt &amp;lt;kythary@t-online.de&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I need some advice on how to handle an exception in a sub-route and how the
&lt;br&gt;&amp;gt; calling route can continue processing. It is easier to explain this with a
&lt;br&gt;&amp;gt; bit of code:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;            from(&amp;quot;direct:A&amp;quot;)
&lt;br&gt;&amp;gt;                .to(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;                .to(&amp;quot;direct:C&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;            from(&amp;quot;direct:B&amp;quot;)
&lt;br&gt;&amp;gt;                .onException(Exception.class).handled(true).end()
&lt;br&gt;&amp;gt;                . code that throws an exception
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;            from(&amp;quot;direct:C&amp;quot;)
&lt;br&gt;&amp;gt;                ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now, if there is an exception in direct:B, direct:C never gets called.
&lt;br&gt;&amp;gt; Through debugging I found out that the pipeline in direct:A stops processing
&lt;br&gt;&amp;gt; because it checks an exchange property (Exchange.ERRORHANDLER_HANDLED). I'm
&lt;br&gt;&amp;gt; using Camel 2.0. Is there a way that the processing in direct:A continues
&lt;br&gt;&amp;gt; after the exception was handled in direct:B?
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Unfortunately the logic for error handling got a bit complex.
&lt;br&gt;Something to improve in 2.2. I am currently making the TX based
&lt;br&gt;simpler in internal logic.
&lt;br&gt;&lt;br&gt;Back to your use case.
&lt;br&gt;The doTry .. doCatch will work as regular try .. catch and thus what
&lt;br&gt;you would expect so route A will continue
&lt;br&gt;&lt;br&gt;In terms on onException we should improve this over time, adding some
&lt;br&gt;flag to indicate what you want. As some want to use onException to
&lt;br&gt;catch that error and create a custom error messages as reply and thus
&lt;br&gt;not process and further. &amp;nbsp;And others as you want a kinda try .. catch
&lt;br&gt;logic and just ignore the damn exception.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Jens
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26623326.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/handled-exception-in-sub-route-tp26623326p26669550.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26668433</id>
	<title>Re: Group of routes and Synchronization on outputs of the group after  a split</title>
	<published>2009-12-06T12:03:17Z</published>
	<updated>2009-12-06T12:03:17Z</updated>
	<author>
		<name>Seb-</name>
	</author>
	<content type="html">I think there is a small problem with this solution that will make it unusable as-is for the case when RecipientList returns dynamic recipient list.
&lt;br&gt;AggregationStrategy uses a predefined static messagecount while RecipientList may return a dynamic recipient list at runtime (ie in my example a certain message might flow out only through o2 and not o1).
&lt;br&gt;So the AggregationStrategy would need to update messagecount for certain message through all their life in the flow (possibly incrementing when a RecipientList throws 2 entries or keep as-is when only 1 entry).
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Seb-&quot;&gt;&lt;br&gt;Sounds interesting.
&lt;br&gt;I'll have a look at this.
&lt;br&gt;Thanks,
&lt;br&gt;Sébastien.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On Sun, Dec 6, 2009 at 6:53 PM, Seb- &amp;lt;seba.public@gmail.com&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; Let's say I have 3 components, Component1 is a RecipientList sending the
&lt;br&gt;&amp;gt; message to both Component2 and Component3.
&lt;br&gt;&amp;gt; Is there an easy configuration way for Camel to do a synchronization on
&lt;br&gt;&amp;gt; outputs (o2 &amp; o3) of Component2 &amp; Component3 with the original message
&lt;br&gt;&amp;gt; coming from Component1.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;             /----[]----- o2
&lt;br&gt;&amp;gt; i1 --[]--/
&lt;br&gt;&amp;gt;           \
&lt;br&gt;&amp;gt;             \-----[]---- o3
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes its possible unfortunately we didnt make that possible easily out
&lt;br&gt;of the box until Camel 2.2. You may say that slipped our minds.
&lt;br&gt;The recipient list in 2.2 supports AggregationStrategy so you can
&lt;br&gt;combine the response from o2 and o3 as you like.
&lt;br&gt;&lt;br&gt;Ticket about it
&lt;br&gt;&lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-2223&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-2223&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;See more at, section Using custom AggregationStrategy
&lt;br&gt;&lt;a href=&quot;http://camel.apache.org/recipient-list.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camel.apache.org/recipient-list.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;See this thread for how you may work around and with some custom
&lt;br&gt;coding do that in 2.1 or older
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/recipientList-multithreading-td26635868.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/recipientList-multithreading-td26635868.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Sébastien.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26668433.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26668227</id>
	<title>Re: Group of routes and Synchronization on outputs of the group after  a split</title>
	<published>2009-12-06T11:40:55Z</published>
	<updated>2009-12-06T11:40:55Z</updated>
	<author>
		<name>Seb-</name>
	</author>
	<content type="html">Sounds interesting.
&lt;br&gt;I'll have a look at this.
&lt;br&gt;Thanks,
&lt;br&gt;Sébastien.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On Sun, Dec 6, 2009 at 6:53 PM, Seb- &amp;lt;seba.public@gmail.com&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; Let's say I have 3 components, Component1 is a RecipientList sending the
&lt;br&gt;&amp;gt; message to both Component2 and Component3.
&lt;br&gt;&amp;gt; Is there an easy configuration way for Camel to do a synchronization on
&lt;br&gt;&amp;gt; outputs (o2 &amp; o3) of Component2 &amp; Component3 with the original message
&lt;br&gt;&amp;gt; coming from Component1.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;             /----[]----- o2
&lt;br&gt;&amp;gt; i1 --[]--/
&lt;br&gt;&amp;gt;           \
&lt;br&gt;&amp;gt;             \-----[]---- o3
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Yes its possible unfortunately we didnt make that possible easily out
&lt;br&gt;of the box until Camel 2.2. You may say that slipped our minds.
&lt;br&gt;The recipient list in 2.2 supports AggregationStrategy so you can
&lt;br&gt;combine the response from o2 and o3 as you like.
&lt;br&gt;&lt;br&gt;Ticket about it
&lt;br&gt;&lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-2223&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-2223&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;See more at, section Using custom AggregationStrategy
&lt;br&gt;&lt;a href=&quot;http://camel.apache.org/recipient-list.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camel.apache.org/recipient-list.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;See this thread for how you may work around and with some custom
&lt;br&gt;coding do that in 2.1 or older
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/recipientList-multithreading-td26635868.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/recipientList-multithreading-td26635868.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Sébastien.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26668227.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26667880</id>
	<title>Re: Group of routes and Synchronization on outputs of the group after  a split</title>
	<published>2009-12-06T11:05:43Z</published>
	<updated>2009-12-06T11:05:43Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Sun, Dec 6, 2009 at 6:53 PM, Seb- &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26667880&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;seba.public@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; Let's say I have 3 components, Component1 is a RecipientList sending the
&lt;br&gt;&amp;gt; message to both Component2 and Component3.
&lt;br&gt;&amp;gt; Is there an easy configuration way for Camel to do a synchronization on
&lt;br&gt;&amp;gt; outputs (o2 &amp; o3) of Component2 &amp; Component3 with the original message
&lt;br&gt;&amp;gt; coming from Component1.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;             /----[]----- o2
&lt;br&gt;&amp;gt; i1 --[]--/
&lt;br&gt;&amp;gt;           \
&lt;br&gt;&amp;gt;             \-----[]---- o3
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Yes its possible unfortunately we didnt make that possible easily out
&lt;br&gt;of the box until Camel 2.2. You may say that slipped our minds.
&lt;br&gt;The recipient list in 2.2 supports AggregationStrategy so you can
&lt;br&gt;combine the response from o2 and o3 as you like.
&lt;br&gt;&lt;br&gt;Ticket about it
&lt;br&gt;&lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-2223&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-2223&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;See more at, section Using custom AggregationStrategy
&lt;br&gt;&lt;a href=&quot;http://camel.apache.org/recipient-list.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camel.apache.org/recipient-list.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;See this thread for how you may work around and with some custom
&lt;br&gt;coding do that in 2.1 or older
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/recipientList-multithreading-td26635868.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/recipientList-multithreading-td26635868.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Sébastien.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667880.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26667241</id>
	<title>Group of routes and Synchronization on outputs of the group after a split</title>
	<published>2009-12-06T09:53:33Z</published>
	<updated>2009-12-06T09:53:33Z</updated>
	<author>
		<name>Seb-</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;Let's say I have 3 components, Component1 is a RecipientList sending the message to both Component2 and Component3.
&lt;br&gt;Is there an easy configuration way for Camel to do a synchronization on outputs (o2 &amp; o3) of Component2 &amp; Component3 with the original message coming from Component1.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/----[]----- o2
&lt;br&gt;i1 --[]--/
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\-----[]---- o3
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Regards,
&lt;br&gt;Sébastien.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Group-of-routes-and-Synchronization-on-outputs-of-the-group-after-a-split-tp26667241p26667241.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26667205</id>
	<title>Re: Implementing Publish Subscribe Channel</title>
	<published>2009-12-06T09:50:26Z</published>
	<updated>2009-12-06T09:50:26Z</updated>
	<author>
		<name>Hendy Irawan</name>
	</author>
	<content type="html">Hi Claus,
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;No seda does *not* support multiple consumers. Its meant to be used
&lt;br&gt;with a single consumer only.
&lt;br&gt;In 2.1 this is even enforced. Often end users had copy paste mistakes
&lt;br&gt;and didnt want multiple consumers to the same seda endpoint.
&lt;br&gt;Hence why we enforced this now in 2.1.
&lt;br&gt;&lt;br&gt;What is your use case sine you need this? I am interesting in what you
&lt;br&gt;are trying to solve?
&lt;br&gt;&lt;br&gt;&lt;br&gt;What you could do is to extend seda, and have support multiple
&lt;br&gt;consumers and have the Exchange being copied before its handed out to
&lt;br&gt;every
&lt;br&gt;consumers.
&lt;br&gt;&lt;br&gt;Mind that when you copy the Exchange / Message if the body is not a
&lt;br&gt;simple type such as String then you may only copy a reference to it
&lt;br&gt;and thus have multiple consumers work on it concurrently, and thus you
&lt;br&gt;need to be aware of thread safety issues.
&lt;br&gt;&lt;br&gt;And there is a new interface in Camel 2.1, MultipleConsumersSupport,
&lt;br&gt;which indicates whether an endpoint supports multiple consumers or
&lt;br&gt;not.
&lt;br&gt;You need to implement this and return true in your own component.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I'm not sure if a separate component is needed for this, because from my experience the &amp;lt;multicast&amp;gt; element works fine. And that's what I'm trying to get, using the &amp;lt;multicast&amp;gt; functionality in a @Consume'r.
&lt;br&gt;&lt;br&gt;Maybe something like this (proposal):
&lt;br&gt;&lt;br&gt;@Consume(uri=&amp;quot;someuri&amp;quot;, multicast=true)
&lt;br&gt;&lt;br&gt;My use case is using Camel as event publisher. Exactly like Spring Application Events.
&lt;br&gt;&lt;br&gt;@EndpointInject(uri=&amp;quot;seda:events.form&amp;quot;)
&lt;br&gt;ProducerTemplate formEvents;
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;formEvents.sendBody(new FormEvent(...));
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;then there are one or more event Listeners like this:
&lt;br&gt;&lt;br&gt;@Consume(uri=&amp;quot;seda:events.form&amp;quot;)
&lt;br&gt;public void handleFormEvent(FormEvent event) { ... }
&lt;br&gt;&lt;br&gt;BTW, the producer and consumer URI may not be the same. i.e. the publisher of the event may route it in some way and there may be multiple producers. However as far as consumers are concerned, they have this inbox URI (e.g. &amp;quot;seda:events.form&amp;quot;) that all events will come together. Then multiple consumers can process the messages (it's InOnly, no need to reply).
&lt;br&gt;&lt;br&gt;I can do this with &amp;lt;multicast&amp;gt;, but my &amp;quot;problem&amp;quot; is that I want it to be &amp;quot;dynamic&amp;quot; i.e. just @Consume annotation is needed, no change in routes. Because the consumers can be created and disposed dynamically.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26667205.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26666408</id>
	<title>Re: Implementing Publish Subscribe Channel</title>
	<published>2009-12-06T08:13:30Z</published>
	<updated>2009-12-06T08:13:30Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Sun, Dec 6, 2009 at 4:51 PM, Hendy Irawan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26666408&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hendy@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Maybe spring event can be used also?
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://camel.apache.org/event.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camel.apache.org/event.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I guess that'd mean my message has to be an ApplicationEvent.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Dont know if Spring enforces to implement an interface but I would
&lt;br&gt;envision they did.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You can create you own component that offers topic like functionally.
&lt;br&gt;&amp;gt;&amp;gt; You could extend the seda or direct component and implement the logic
&lt;br&gt;&amp;gt;&amp;gt; missing.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for the encouragement. :-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would assume adding @Consume to any POJO does not require any routes
&lt;br&gt;&amp;gt;&amp;gt; to pre existing and cannot see why its not dynamic.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes indeed, unfortunately @Consume breaks when there are two @Consume'rs on
&lt;br&gt;&amp;gt; the same endpoint that is not a publish-subscribe channel. It seems like
&lt;br&gt;&amp;gt; it's doing round-robin (?) instead of multicast.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For example, I'd like:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* bean1 */
&lt;br&gt;&amp;gt; @Consume(&amp;quot;seda:mychannel&amp;quot;) public void Yeeha(String msg) { }
&lt;br&gt;&amp;gt; /* bean2 */
&lt;br&gt;&amp;gt; @Consume(&amp;quot;seda:mychannel&amp;quot;) public void Yaahi(String msg) { }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; to behave as if an explicit route is specified (with multicast):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;from uri=&amp;quot;seda:channel&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;multicast&amp;gt;
&lt;br&gt;&amp;gt;  &amp;lt;to uri=&amp;quot;bean:bean1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;  &amp;lt;to uri=&amp;quot;bean:bean2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/multicast&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/from&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but right now, it seems messages are being routed round-robin when using the
&lt;br&gt;&amp;gt; @Consumer. That's why I said doing multicast dynamically (with @Consume)
&lt;br&gt;&amp;gt; seem to be not possible.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;No seda does *not* support multiple consumers. Its meant to be used
&lt;br&gt;with a single consumer only.
&lt;br&gt;In 2.1 this is even enforced. Often end users had copy paste mistakes
&lt;br&gt;and didnt want multiple consumers to the same seda endpoint.
&lt;br&gt;Hence why we enforced this now in 2.1.
&lt;br&gt;&lt;br&gt;What is your use case sine you need this? I am interesting in what you
&lt;br&gt;are trying to solve?
&lt;br&gt;&lt;br&gt;&lt;br&gt;What you could do is to extend seda, and have support multiple
&lt;br&gt;consumers and have the Exchange being copied before its handed out to
&lt;br&gt;every
&lt;br&gt;consumers.
&lt;br&gt;&lt;br&gt;Mind that when you copy the Exchange / Message if the body is not a
&lt;br&gt;simple type such as String then you may only copy a reference to it
&lt;br&gt;and thus have multiple consumers work on it concurrently, and thus you
&lt;br&gt;need to be aware of thread safety issues.
&lt;br&gt;&lt;br&gt;And there is a new interface in Camel 2.1, MultipleConsumersSupport,
&lt;br&gt;which indicates whether an endpoint supports multiple consumers or
&lt;br&gt;not.
&lt;br&gt;You need to implement this and return true in your own component.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thank you.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26666101.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26666101.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26666408.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26666234</id>
	<title>Re: Camel source not available -- Re: cometd client connector for  Camel</title>
	<published>2009-12-06T08:03:39Z</published>
	<updated>2009-12-06T08:03:39Z</updated>
	<author>
		<name>Claus Ibsen-2</name>
	</author>
	<content type="html">On Sun, Dec 6, 2009 at 4:54 PM, Hendy Irawan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26666234&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hendy@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Claus Ibsen-2 wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have no idea. But we love contributions so if you think you can
&lt;br&gt;&amp;gt;&amp;gt; improved the camel-cometd component then that would be great.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks Claus, I guess that's the only logical action I should take.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Trying to download Camel source though gives me 404 error:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.apache.org/dist/camel/apache-camel/2.1.0/apache-camel-2.1.0-src.tar.gz&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apache.org/dist/camel/apache-camel/2.1.0/apache-camel-2.1.0-src.tar.gz&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Brings me:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Not Found
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The requested URL
&lt;br&gt;&amp;gt; /dist/camel/apache-camel/2.1.0/apache-camel-2.1.0-src.tar.gz was not found
&lt;br&gt;&amp;gt; on this server.
&lt;br&gt;&amp;gt; Apache/2.3.4 (Unix) mod_fcgid/2.3.2-dev Server at www.apache.org Port 80
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;See this topic
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/2.1-release-download-td26658552.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/2.1-release-download-td26658552.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/cometd-client-connector-for-Camel-tp26635861p26666122.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/cometd-client-connector-for-Camel-tp26635861p26666122.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Claus Ibsen
&lt;br&gt;Apache Camel Committer
&lt;br&gt;&lt;br&gt;Author of Camel in Action: &lt;a href=&quot;http://www.manning.com/ibsen/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.manning.com/ibsen/&lt;/a&gt;&lt;br&gt;Open Source Integration: &lt;a href=&quot;http://fusesource.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fusesource.com&lt;/a&gt;&lt;br&gt;Blog: &lt;a href=&quot;http://davsclaus.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://davsclaus.blogspot.com/&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/davsclaus&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cometd-client-connector-for-Camel-tp26635861p26666234.html" />
</entry>

</feed>
