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

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>
  <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