See if the following page would do any help.

[1]. http://geronimo.apache.org/schemas-2.1/docs/geronimo-connector-1.2.xsd.html#h213116836


Jeff 

On Thu, Mar 10, 2011 at 11:51 PM, <dfrahm@teamhuber.com> wrote:
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?  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.  If many things work you might not need the non-jta-datasource but I would add it anyway.  Once you have everything working properly you can experiment with removing it and see if new problems show up.   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.  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).  You can get it at


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>
  <transaction-caching/>
</xa-transaction>
)  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?  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?  Specifically, I've been using Database Type "Other", but does using that reduce my functionality?  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.  Thanks!

David Frahm
Huber & Associates

Office: 573-634-5000, Mobile: 573-298-1040