Re: Help adding logic to camel component that executes before onComplete

2016-09-08 Thread Quinn Stevenson
I just retested this, and the EXCEPTION_CAUGHT property is NOT on the exchange sent to onCompletion.onFailureOnly element. So my last question is - can I do something in the SyncronizationAdapter so that the onException elements will get triggered? > On Sep 8, 2016, at 8:23 AM, Quinn Stevenso

Re: Help adding logic to camel component that executes before onComplete

2016-09-08 Thread Quinn Stevenson
Thanks for the quick reply Claus - I always use the hasOut() to figure out what message to work with in my processors - I’m not sure why I missed it here the first time around. I was a little surprised about the out message being there (since I don’t explicitly use one) - I thought I’d read th

Re: Help adding logic to camel component that executes before onComplete

2016-09-08 Thread Claus Ibsen
On Thu, Sep 8, 2016 at 3:36 PM, Quinn Stevenson wrote: > I made some progress with this. > > In my SynchronizationAdapter, I had been calling > exchange.getIn().setHeader(…) - I’d never looked to see if there was an “out” > message. Once I changed this to set the header on the out message, the

Re: Help adding logic to camel component that executes before onComplete

2016-09-08 Thread Quinn Stevenson
I made some progress with this. In my SynchronizationAdapter, I had been calling exchange.getIn().setHeader(…) - I’d never looked to see if there was an “out” message. Once I changed this to set the header on the out message, the headers started showing up where I wanted them. Now I’m down

Re: Help adding logic to camel component that executes before onComplete

2016-09-06 Thread Quinn Stevenson
I’m struggling with this, and I can’t seem to get what I’m after. I added a SynchronizationAdapter (via addOnCompletion), but the exchange passed to the onComplete portion of the route still doesn’t have the headers I’m setting in the Syncronizationadapter. I’ve tried setting the header in both

Re: Help adding logic to camel component that executes before onComplete

2016-09-06 Thread Claus Ibsen
There is an addOnCompletion on the exchange you can use. Then your onCompletion can implement that interface, or extend SynchronizationAdapter On Tue, Sep 6, 2016 at 9:52 PM, Quinn Stevenson wrote: > Thank you for the prompt reply :-) > > This sounds like exactly what I need, but I’m a little unc

Re: Help adding logic to camel component that executes before onComplete

2016-09-06 Thread Quinn Stevenson
Thank you for the prompt reply :-) This sounds like exactly what I need, but I’m a little unclear about how to implement it. I tried creating a UnitOfWork, adding a Synchronization, and then setting the UnitOfWork on the exchange when I create it, but my Synchronization isn’t getting called.

Re: Help adding logic to camel component that executes before onComplete

2016-09-06 Thread Claus Ibsen
If you talk about UoW completions with Synchronization: org.apache.camel.spi.Synchronization Then you can implement Ordered, and then set the value to be HIGHEST so this one is run before the others. On Tue, Sep 6, 2016 at 9:20 PM, Quinn Stevenson wrote: > I would like to enhance the camel-mllp