openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: cursor/prepared statement problem with WebLogic 10.3.2
Date Tue, 16 Nov 2010 21:17:37 GMT

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

>    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?
    public void finishTask(String name) { 

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message