geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: SLSB transactions: First invocation throws exception, successive calls don't
Date Mon, 31 Mar 2008 16:10:27 GMT

On Mar 31, 2008, at 4:47 AM, Łukasz Budnik wrote:

> Hi David,
>
>> Now.... on startup, openjpa is likely to do a bunch of metadata  
>> analysis of
>> the database, including possibly creating the tables etc for you,  
>> but I
>> think at least checking that the mapping it has will work.  If it  
>> creates
>> the tables, it first looks for a non-jta datasource; if there is  
>> none, it
>> tries to use a connection from the jta-datasource
>
> It's not the problem - recently I remember adding country field to a
> User class and OpenJPA run ALTER TABLE without any error.

In this case I'd expect that openjpa would succeed in doing whatever  
metadata operations it was trying to do but possibly leave the  
connection it was using in the wrong transactional state for the DML  
operations, which is exactly what you observe.
>
>> I'd also strongly advise using the db2-specific tranql adapter.  I  
>> need to
>> release the latest fixed version, but a snapshot is at
>> http://snapshots.repository.codehaus.org/org/tranql/tranql- 
>> connector-db2-xa/1.2-SNAPSHOT/tranql-connector-db2- 
>> xa-1.2-20080326.214959-2.rar
>
> I was already using 1.2-SNAPSHOT, but above version is newer and
> differs in size  by 1 byte ;) but changing the connector did not help
> either.
>
> any other clues?

-- use <xa-transaction><transaction-caching></xa-transaction> in the  
jta ds plan.  If what I think is happening is happening, this would  
either fix the problem or produce a different error.
-- use <no-transaction/> in a separate non-jta ds plan

Hope this helps
david jencks

>
> best regards
> Łukasz


Mime
View raw message