Hi Matthias,
> the surrounding transaction in myMethod(...) should be rolled back, by the
> container but after the 
> method left by exception and not before its internal catch block. 

I agree. 

Here is another vista to explore

> 'myMethod()' is tagged as Transaction.Requires

>@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
>    public void finishTask(String name) { 
>     Task task = entityManager.find(Task.class, name);  // effectively

Say myMethod() is invoked in txn T1. So entityManager is in T1.
myMethod() bombed. 
Internal catch block called finishTask(). 
finishTask() with REQUIRES_NEW is invoked on a new txn T2. 
But same entityManager.find() is now invoked on txn T2, though T1 has not
ended yet. 
Now that may make things hairy.

How about trying?
@TransactionAttribute(TransactionAttributeType.REQUIRES)
    public void finishTask(String name) { 


-----
Pinaki 
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/cursor-prepared-statement-problem-with-WebLogic-10-3-2-tp5724027p5745513.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to