openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: Possible problem with ddl with only a jta-datasource and sequences
Date Tue, 24 Apr 2007 22:28:49 GMT
On Apr 24, 2007, at 2:17 PM, Kevin Sutter wrote:

> Patrick,
> On 4/24/07, Patrick Linskey <> wrote:
>> > One way to do this would
>> > be to package the work up in a Runnable and execute it in an
>> > appropriate transactional environment.  It might be easier to
>> > understand if the sequence code had a similar implementation.
>> We talked about this in a thread several months ago. I think that the
>> conclusion was that it'd be neat to make our ManagedRuntime interface
>> have a runInNewTransaction(Runnable) method, and to move things to  
>> use
>> that instead of doing tx logic directly inside the sequence classes.
>> This would be an easy change; the lack of a concrete need (i.e., a
>> server that both denied transactional control and provided a means to
>> execute a Runnable in a new tx) prevented us from changing things
>> around.
> A "concrete need" is surfacing with WebSphere.  WebSphere does not  
> allow for
> direct transactional control (ie. suspend/resume) and it has recently
> provided the means to execute a Runnable in a new Tx (via the  
> "runUnderUOW"
> feature).  Although WebSphere may be the exception to the rule, we are
> planning on providing the mechanism so that OpenJPA can play in  
> this game.


Can you ask the websphere team to support a Callable also, so we can  
easily return a value or throw an exception from the task?  It may  
also be important to runWithoutTx for databases that don't support  
transactional DDL, but I suppose that could be done with a new thread.


View raw message