AFAIK, the transaction is associated with a thread of execution. In you
example, the transaction is started in the "splitter" thread and the thread
which executed the processor do not have a transaction associated with it.
Try the following:
from(endpoint)
.split().method(myMethod).stopOnException().streaming().executorService(MyThreadPoolExecutor)
.to("direct:sub");
from("direct:sub")
.transacted(PROPAGATION_REQ_TRANSACION_POLICY_ID)
.process(MyProcessor)
.aggregate(..)
.to(END);
Best,
Christian
On Thu, Feb 23, 2012 at 9:42 PM, Babak Vahdat
<[email protected]>wrote:
> Hi
>
> Not sure if this could be the cause of the problem but may be check the
> transaction setting [1] of your EJB method, for example if it's
> REQUIRES_NEW
> then this would clarify the behavior. And using Camel's own EJB component
> [2] could also make it easier to integrate an EJB call inside your route
> (instead of using a custom processor as in your code snippet).
>
> [1]
> http://docs.oracle.com/javaee/6/api/javax/ejb/TransactionAttributeType.html
> [2] http://camel.apache.org/ejb.html
>
> Babak
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JTA-Transaction-problems-rollback-doesn-t-affect-DB-tp5509159p5509292.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>