geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfr...@teamhuber.com
Subject Re: AS/400 config JPA and Database Pools
Date Thu, 10 Mar 2011 15:51:04 GMT
Thanks for your response.  I know its been awhile, but I needed time to analyze your
information.

I'm not sure how to use the DB2-specific adapters with an AS/400 database.  The fields
don't seem to match up for me.  However, we will try out the v2.1.1.5 DB2 iSeries
adapter.

Where can I find documentation on database type values (XA, Local, None)?  I didn't
think I needed distributed tx support, but even before your suggestion here I was getting
the impressions that things would work better if I used XA in Geronimo.  I'd really
like to understand why though.

I'm attaching a sample JPA exception with rollback errors.  One of the confusing
things in the stacktrace are the conflicting messages of "The transaction has been rolled
back" and "Unable to rollback".

- David Frahm


-----David Jencks <david_jencks@yahoo.com> wrote: -----

To: user@geronimo.apache.org
From: David Jencks <david_jencks@yahoo.com>
Date: 01/27/2011 11:46AM
Subject: Re: AS/400 config JPA and Database Pools

Hi DFrahm,
Can you be more explicit about the rollback problems? &nbsp;That might point towards the
cause.
in my experience when a non-jta-datasource is needed and missing, nothing works so it's really
obvious there is a problem. &nbsp;If many things work you might not need the non-jta-datasource
but I would add it anyway. &nbsp;Once you have everything working properly you can experiment
with removing it and see if new problems show up. &nbsp; It is most likely to be needed
for DDL (e.g. initial table creation) and key value/sequence generation.
You should definitely use the db2 specific adapters. &nbsp;We have an ISeries specific
db2 adapter now but I doubt it is included in your was ce version (I think it is in the latest
version if you can upgrade). &nbsp;You can get it at
http://repo2.maven.org/maven2/org/tranql/tranql-connector-db2ISeries-xa/1.0/tranql-connector-db2ISeries-xa-1.0.rar
You wont be able to deploy this directly from the admin console, but what you can do is use
the admin console to generate a plan for one of the included db2 adapters, copy it to a file,
and deploy the adapter + plan using the command line or the admin console.
You should set up the jta datasource using xa-transaction and transaction-caching (the plan
should look like this:
<xa-transaction>&nbsp;&nbsp;<transaction-caching/></xa-transaction>)
&nbsp;If you leave out the transaction-caching element you will eventually get very strange
errors where 2 transactions try to use the same connection or a commit/rollback is tried on
a closed connection.
The non-jta datasource should be set up with no-transaction support.
Hope this helps!david jencks
On Jan 27, 2011, at 5:07 AM, DFrahm@teamhuber.com wrote:
I'm using JPA with an AS/400 (DB2/i) in an EJB/EAR application.

We're having trouble with rollbacks, which also has me wondering what else might work better
if I knew how to configure this correctly.

Does anyone have any best practices for this setup?&nbsp; Do I need both a JTA and non-JTA
datasource defined for JPA? (I've read posts where that was needed for Derby.)

Also, when I create the server Database Pools, what values should I use?&nbsp; Specifically,
I've been using Database Type "Other", but does using that reduce my functionality?&nbsp;
Should I be using one of the "DB2" values, even though its on the i? And what about Transaction
Type?

We're running WASCE 2.1.1.3.&nbsp; Thanks!

David Frahm
Huber & Associates
Office: 573-634-5000, Mobile: 573-298-1040






Mime
View raw message