Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 83881 invoked from network); 11 Mar 2011 03:22:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Mar 2011 03:22:34 -0000 Received: (qmail 36129 invoked by uid 500); 11 Mar 2011 03:22:33 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 36103 invoked by uid 500); 11 Mar 2011 03:22:32 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 36096 invoked by uid 99); 11 Mar 2011 03:22:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2011 03:22:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chirunhua@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-iw0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2011 03:22:27 +0000 Received: by iwn33 with SMTP id 33so2658805iwn.13 for ; Thu, 10 Mar 2011 19:22:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=qxcn7yNdrQ3GlBGUxhczNiFAFbe0DcbkFCrQVVQnv5k=; b=ZX//7EmhvoTYm052sz1tXBhGkIaLpcOvAsVoprKcp0QrReirZc4tiDbRZAqR8RQQtc cnrwPvdzYIV/7DWvo0SEt8vf8URlCmc69fH2R4GlDAfARADC3jTuOY1Yl8owsXwlPaFy E2dAJA5x0Zw9nutqLlXIfImHt9Y02KqrUBNHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=VOudvw5x7JNRdtfLFw51vE2U97OB6KlXXlygRGLV8YdQuESiy0uHcNgKOrflNmtyyu oHEOl5BMia2ijvTgIZ1HwzaOcavaCTiVd/WHK0s5bh9092Cl8b9fwA92JbhTq4wTp/wS 1/ltqazMhBZrOXXYWxOlfe1fwwT/k/zeiGUe0= MIME-Version: 1.0 Received: by 10.42.133.130 with SMTP id h2mr4794936ict.463.1299813726850; Thu, 10 Mar 2011 19:22:06 -0800 (PST) Received: by 10.42.171.134 with HTTP; Thu, 10 Mar 2011 19:22:06 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Mar 2011 11:22:06 +0800 Message-ID: Subject: Re: AS/400 config JPA and Database Pools From: chi runhua To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e878076900e049e2c77d9 --90e6ba6e878076900e049e2c77d9 Content-Type: text/plain; charset=ISO-8859-1 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, 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 wrote: > ----- > > To: user@geronimo.apache.org > From: David Jencks > 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 > > > 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: > > > > > ) 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 > > > > > > --90e6ba6e878076900e049e2c77d9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable See if the following page would do any help.



Jeff=A0
<= br>
On Thu, Mar 10, 2011 at 11:51 PM, <dfrahm@teamhuber.com> wrote:
Thanks for your response.=A0 I kn= ow 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 da= tabase.=A0 The fields don't seem to match up for me.=A0 However, we wil= l try out the v2.1.1.5 DB2 iSeries adapter.

Where can I find documen= tation on database type values (XA, Local, None)?=A0 I didn't think I n= eeded distributed tx support, but even before your suggestion here I was ge= tting the impressions that things would work better if I used XA in Geronim= o.=A0 I'd really like to understand why though.

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

- David Fra= hm


<= font color=3D"#990099">-----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
Subje= ct: Re: AS/400 config JPA and Database Pools

Hi DFrahm,

Can you be more explicit about the rollback problems? =A0That might po= int towards the cause.

in my experience when a non= -jta-datasource is needed and missing, nothing works so it's really obv= ious there is a problem. =A0If many things work you might not need the non-= jta-datasource but I would add it anyway. =A0Once you have everything worki= ng properly you can experiment with removing it and see if new problems sho= w up. =A0 It is most likely to be needed for DDL (e.g. initial table creati= on) and key value/sequence generation.

You should definitely use the db2 specific adapters. = =A0We have an ISeries specific db2 adapter now but I doubt it is included i= n your was ce version (I think it is in the latest version if you can upgra= de). =A0You 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 f= or one of the included db2 adapters, copy it to a file, and deploy the adap= ter + plan using the command line or the admin console.

You should set up the jta datasource using xa-transacti= on and transaction-caching (the plan should look like this:

<= /div>
<xa-transaction>
=A0=A0<transaction-caching/&g= t;
</xa-transaction>
) =A0If you leave out the transactio= n-caching element you will eventually get very strange errors where 2 trans= actions try to use the same connection or a commit/rollback is tried on a c= losed connection.

The non-jta datasource should be set up with no-transac= tion support.

Hope this helps!
david jen= cks

On Jan 27, 2011, at 5:07 AM, DFrahm@teamhuber.com= wrote:

I'm using JPA with an AS/400 (D= B2/i) in an EJB/EAR application.

We're having trouble with rollb= acks, 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?=A0 Do I need both a= JTA and non-JTA datasource defined for JPA? (I've read posts where tha= t was needed for Derby.)

Also, when I create the server Database Poo= ls, what values should I use?=A0 Specifically, I've been using Database= Type "Other", but does using that reduce my functionality?=A0 Sh= ould 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.=A0 Thanks!

David Frahm
Huber & Associates

Office: 573-634-5000, Mob= ile: 573-298-1040



=




--90e6ba6e878076900e049e2c77d9--