Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 44988 invoked from network); 23 Nov 2005 21:36:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Nov 2005 21:36:26 -0000 Received: (qmail 85246 invoked by uid 500); 23 Nov 2005 21:36:16 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 85161 invoked by uid 500); 23 Nov 2005 21:36:16 -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 85150 invoked by uid 99); 23 Nov 2005 21:36:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 13:36:15 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [198.178.39.150] (HELO hfcmsw01.esn.instinet.com) (198.178.39.150) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 13:37:44 -0800 Received: from hmtalz01.prod.instinet.com (unverified) by hfcmsw01.esn.instinet.com (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Wed, 23 Nov 2005 16:36:03 -0500 Received: from hfccldmmail001.isn.instinet.com (hfccldmmail001.isn.instinet.com [172.27.134.25]) by hmtalz01.prod.instinet.com (8.12.8/8.12.8) with ESMTP id jANLZjk8020747 for ; Wed, 23 Nov 2005 16:35:45 -0500 To: user@geronimo.apache.org Subject: Re: Enlisting XAResource objects MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.12 February 13, 2003 Message-ID: From: Guglielmo.Lichtner@instinet.com Date: Wed, 23 Nov 2005 13:36:54 -0800 X-MIMETrack: Serialize by Router on NYMAIL1/US/INSTINET (Release 6.5.4FP2|September 12, 2005) at 11/23/2005 04:36:56 PM, Serialize complete at 11/23/2005 04:36:56 PM Content-Type: multipart/alternative; boundary="=_alternative 0076921B882570C2_=" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 0076921B882570C2_= Content-Type: text/plain; charset="us-ascii" The XAResource in question is a XA-capable write-back cache. So the connection metaphor is not such a good fit - that's why I am asking the question. I would prefer to just grab a reference to the transaction manager gbean, which implements javax.transaction.TransactionManager and call getTransaction().enlistResource(..) If I go with this solution, how to get a reference to the the transaction manager gbean? Alternatively, I see the method watchResourceManagers here: http://svn.apache.org/repos/asf/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImplGBean.java How would I write a gbean which ends up in this collection? Come to think of it, this may be the way to go because I see that that will cause XAResource.recover() to be invoked first. David Jencks 11/23/2005 12:10 PM Please respond to user To: user@geronimo.apache.org cc: Subject: Re: Enlisting XAResource objects On Nov 23, 2005, at 11:54 AM, Guglielmo.Lichtner@instinet.com wrote: > > I have a home-grown resource manager (XAResource implementation) which > I would like enlist in a transaction. > I see two ways of doing this: > > 1) Write a JCA resource adapter, since the app server has to enlist > the xa resource for the connection. > > 2) Create a geronimo "configuration" which has a reference to the > transaction manager gbean, then grab > the javax.transaction.Transaction object from that and call the > enlist- method. > > Does anybody care to comment on 1 vs. 2 ? It's hard to judge without knowing more about what your RM actually does. If it has anything resembling connections that would be helped with a connection pool, I would strongly recommend writing a resource adapter. Its pretty easy, you can base it on tranql-connector code, etc etc and it will save you a lot of work trying to relate to the TM properly. If it really doesn't have anything like connections, then I don't think it makes sense to write a RA. In this case before I start giving advice I'd like to know more about how your application gets in touch with the RM and tells it to do something and how you envisage enlist/delist to work. thanks david jencks ***************************************************************** <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. ***************************************************************** --=_alternative 0076921B882570C2_= Content-Type: text/html; charset="us-ascii"
The XAResource in question is a XA-capable write-back cache. So the connection metaphor
is not such a good fit - that's why I am asking the question.

I would prefer to just grab a reference to the transaction manager gbean, which implements

javax.transaction.TransactionManager

and call

getTransaction().enlistResource(..)

If I go with this solution, how to get a reference to the the transaction manager gbean?

Alternatively, I see the method watchResourceManagers here:

http://svn.apache.org/repos/asf/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImplGBean.java

How would I write a gbean which ends up in this collection? Come to think of it, this may be the way to go
because I see that that will cause XAResource.recover() to be invoked first.



David Jencks <david_jencks@yahoo.com>

11/23/2005 12:10 PM
Please respond to user

       
        To:        user@geronimo.apache.org
        cc:        
        Subject:        Re: Enlisting XAResource objects




On Nov 23, 2005, at 11:54 AM, Guglielmo.Lichtner@instinet.com wrote:

>
> I have a home-grown resource manager (XAResource implementation) which
> I would like enlist in a transaction.
> I see two ways of doing this:
>
> 1) Write a JCA resource adapter, since the app server has to enlist
> the xa resource for the connection.
>
> 2) Create a geronimo "configuration" which has a reference to the
> transaction manager gbean, then grab
> the javax.transaction.Transaction object from that and call the
> enlist- method.
>
> Does anybody care to comment on 1 vs. 2 ?

It's hard to judge without knowing more about what your RM actually
does.  If it has anything resembling connections that would be helped
with a connection pool, I would strongly recommend writing a resource
adapter.  Its pretty easy, you can base it on tranql-connector code,
etc etc and it will save you a lot of work trying to relate to the TM
properly.  If it really doesn't have anything like connections, then I
don't think it makes sense to write a RA.  In this case before I start
giving advice I'd like to know more about how your application gets in
touch with the RM and tells it to do something and how you envisage
enlist/delist to work.

thanks
david jencks






*****************************************************************
<<>>

In compliance with applicable rules and regulations, Instinet
reviews and archives incoming and outgoing email communications,
copies of which may be produced at the request of regulators.
This message is intended only for the personal and confidential
use of the recipients named above. If the reader of this email
is not the intended recipient, you have received this email in
error and any review, dissemination, distribution or copying is
strictly prohibited. If you have received this email in error,
please notify the sender immediately by return email and
permanently delete the copy you received.

Instinet accepts no liability for any content contained in the
email, or any errors or omissions arising as a result of email
transmission. Any opinions contained in this email constitute
the sender's best judgment at this time and are subject to change
without notice. Instinet does not make recommendations of a
particular security and the information contained in this email
should not be considered as a recommendation, an offer or a
solicitation of an offer to buy and sell securities.

*****************************************************************
--=_alternative 0076921B882570C2_=--