Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 70045 invoked from network); 27 May 2005 17:11:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 May 2005 17:11:40 -0000 Received: (qmail 54034 invoked by uid 500); 27 May 2005 17:11:26 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 54000 invoked by uid 500); 27 May 2005 17:11:26 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 53579 invoked by uid 99); 27 May 2005 17:11:26 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO mgd.gluecode.com) (64.14.202.141) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 27 May 2005 10:11:19 -0700 Received: from [216.64.251.159] ([216.64.251.159]) (authenticated bits=0) by mgd.gluecode.com (8.12.10/8.12.10) with ESMTP id j4RHAdCW023541 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 27 May 2005 10:10:40 -0700 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <20050527112710.97399.qmail@web25108.mail.ukl.yahoo.com> References: <20050527112710.97399.qmail@web25108.mail.ukl.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: David Jencks Subject: Re: Integration of Geronimo modules (Tx / JCA) in Spring Date: Fri, 27 May 2005 10:11:06 -0700 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I'm not entirely sure what you are asking. Neither tranql nor anyone =20= else has any magic xa elixir to wrap a non-xa database and make it have =20= xa semantics. However, you can deploy local-transaction only resource =20= adapters in geronimo and have them participate in JTA transactions. =20 Geronimo won't complain, but you wont get xa semantics if you have more =20= than one transaction participant. The standard tranql connector wraps =20= a Driver implementation into a local-transaction only resource adapter. =20= If you have a database that really implements XADataSource, you can =20= easily extend the tranql connector to a xa-transaction resource =20 adapter. The easiest way to do this is probably to copy the =20 derby-connector and modify it. Hope this helps david jencks On May 27, 2005, at 4:27 AM, Thierry Templier wrote: > Thanks a lot David! Your answer helps me a lot... > I'm working on the application to use TM and connector > modules without the entire Geronimo server. > I'm using Tranql to configure datasource. I see that > tranql connector doesn't support XA transactions > according to the ra.xml file... Is it possible to > create a datasource that supports XA transactions with > Tranql basing a non XA JDBC driver? > Thanks for your help. > Thierry > >> NPE -- see my explanation in my first reply, and ask >> more specific >> questions if what I wrote is incomprehensible :-) >> >> TM initialization -- you should use the up to date >> code :-) >> >> Hmm. looking at this a bit I see we are using the >> geronimo kernel >> automatic collection management to register the >> resource managers with >> the tm. What kind of environment are you targeting? >> Is this a static >> environment intended to run a single application, >> and restarted >> whenever anything changes, or is it an environment >> in which jca >> adapters/resource managers will be deployed and >> undeployed dynamically >> while the container is running? With the current >> implementation you >> will need to figure out a way to implement >> ReferenceCollection so you >> can add all the jca adapters to it... or if you >> aren't interested in >> recovery just implement an empty >> ReferenceCollection. >> >> ReferenceCollection resourceManagers =3D ??//don't >> know what you want to >> do here >> TransactionLog transactionLog =3D new >> UnrecoverableLog(); >> ExtendedTransactionManager transactionManager =3D new >> >> TransactionManagerImpl(60, transactionLog, >> resourceManagers); >> >> TransactionContextManager transactionContextManager >> =3D new >> TransactionContextManager(transactionManager, >> transactionManager); >> >> If you are in spring, I'd think you could use spring >> wiring to assemble >> this -- we use gbeans to assemble it in geronimo. >> >> Hope this helps >> david jencks >> >> >>> Thierry >>> >>>> I think that would be a good idea. We don't >> really >>>> have a generic xa >>>> wrapper because you really want to expose the >>>> XADatasource properties >>>> as ManagedConnectionFactory properties. This is >>>> really easy to do, >>>> however: see the derby xa wrapper in geronimo. >>>> Since there aren't all >>>> that many xa drivers, wrapping all of them may >> not >>>> be an infinitely >>>> large task. We do have a generic Driver wrapper, >>>> and the j2ca >>>> framework deals just fine with local transaction >>>> adapters. (you don't >>>> get xa semantics, but you don't get exceptions >>>> either). >>>> >>>> Remember also that the pooling code itself is >> inside >>>> the >>>> ConnectionManager implementation, thus in the >>>> geronimo connector >>>> module. >>>> >>>> A couple other comments that might be a bit >> advanced >>>> for now... >>>> >>>> One other hidden tidbit you might be interested >> in >>>> is, Jeremy figured >>>> out how to make last-resource one phase commit >>>> optimization actually >>>> work with correct semantics if the last resource >> is >>>> a database and it >>>> is used for the transaction log. There's an >>>> untested implementation of >>>> this in o.a.g.connector.outbound.transactionlog. >> I >>>> think it could be >>>> useful when you want to use jms and a non-xa >>>> database. >>>> >>>> Also, the "bridge" stuff for container managed >>>> security is probably a >>>> bad idea and should be replaced by just putting >> more >>>> login modules into >>>> your original login configuration. >>>> >>>> thanks! >>>> david jencks >>>> >>>>> >>>>>> Here's part of the cvs connection string: >>>>>> >> cvs.tranql.codehaus.org:/home/projects/tranql/scm >>>>>> >>>>>> Generally each driver really should have a >> driver >>>> specific class to >>>>>> indicate which sql exceptions it throws mean >> that >>>> a connection is >>>>>> dead and should be discarded. However, no one >>>> has actually written >>>>>> one of these yet :-) >>>>>> >>>>> >>>> >>>> >>> >>> >>> >>> Take a look at my blog: >>> http://templth.blogspot.com/ >>> >>> >>> =09 >>> >>> =09 >>> =09 >>> >> > = _______________________________________________________________________ >> >>> ______ >>> D=E9couvrez le nouveau Yahoo! Mail : 1 Go d'espace >> de stockage pour vos >>> mails, photos et vid=E9os ! >>> Cr=E9ez votre Yahoo! Mail sur >> http://fr.mail.yahoo.com >>> >> >> > > > Take a look at my blog: > http://templth.blogspot.com/ > > > =09 > > =09 > =09 > = _______________________________________________________________________=20= > ______ > D=E9couvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour = vos =20 > mails, photos et vid=E9os ! > Cr=E9ez votre Yahoo! Mail sur http://fr.mail.yahoo.com >