Hi Willem,

He was interested in preserving the original message, since the
marsTraceProcessor.traceExchange transforms the body into the Entity that
the JPA endpoint expects, and that Entity is transferred back to the main
route after the interception is applied. That's why I suggested running
this asynchronously...

The fact that the file isn't moved may have something to do with the Unit
of Work being modified? If so, calling out to the SEDA route via a <wireTap
/> inside the <interceptor /> solve it?

Regards,
Raúl.

On 20 December 2011 08:53, Willem Jiang <[email protected]> wrote:

> <intercept>
>
> <to uri="seda:trace" />
>
> </intercept>
>
> <route>
>
> <from uri="seda:trace" />
>
> <bean ref="marsTraceProcessor" method="traceExchange"/>
>
> <log message="Persisting to Trace to Database"/>
>
> <to uri="jpa://com.vzw.fp.mars.**entities.MarsTracerEntity"/>
>
> </route>
>
> The interceptor will affect the route, I think the we should put the trace
> part into the inteceptor block like this.
>
> <intercept>
>
>
> <bean ref="marsTraceProcessor" method="traceExchange"/>
>
> <log message="Persisting to Trace to Database"/>
>
> <to uri="jpa://com.vzw.fp.mars.**entities.MarsTracerEntity"/>
>
> </intercept>
>
>
> On Tue Dec 20 06:25:07 2011, Raul Kripalani wrote:
>
>> Hi Ebe,
>>
>> Camel delegates the connection handling to the JPA framework. Your
>> JDBC driver may be using a connection pool or something. All that is
>> handled by the JPA EntityManager, so you may want to look at options
>> to configure the behaviour regarding the connection.
>>
>> As to the file not being moved when processing finishes, can you place
>> an OnComplete block that sends to a log endpoint with showAll=true and
>> paste the logging output?
>>
>> Are there any exceptions occurring?
>>
>> Regards,
>> Raul.
>>
>> On 19 Dec 2011, at 18:14, 
>> ebinsingh<ebenezer.singh@**verizonwireless.com<[email protected]>>
>>  wrote:
>>
>>  Looks like the JPA connection does not close after persisting the data
>>> in the
>>> database. Not sure how to resolve this.
>>>
>>> Appreciate any help.
>>>
>>> --
>>> View this message in context: http://camel.465427.n5.nabble.**
>>> com/Intercept-issue-need-help-**tp5080816p5086885.html<http://camel.465427.n5.nabble.com/Intercept-issue-need-help-tp5080816p5086885.html>
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>>
>
>
> --
> Willem
> ------------------------------**----
> FuseSource
> Web: http://www.fusesource.com
> Blog:    
> http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
>        http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang Weibo: willemjiang
>

Reply via email to