Re: Websphere and Local transactions ..

Madhav Inamti <[email protected]> Tue, 14 Jan 2003 05:39:15 -0800
Newsgroups gmane.comp.java.sun.connector
Message-ID <75C025AE395F374B81F6416B1D4BDEFBB0851B@mtv-corpmail.microfocus.com>
The EJB method has a RequiresNew transaction attribute.
Websphere is involving the ManagedConnection in a local transaction and
calls begin method of javax.resource.spi.LocalTransaction. After this when
the listeners of the Managed Connection are informed of the start of a local
tranasction, Websphere seems to be trying to enlist the ManagedConnection in
a local transaction gaian and is failing, rightly so.

What I don't understand is that why is it trying to enlist the
ManagedConnection in a local transaction the second time ?

Thanks,
Madhav

-----Original Message-----
From: Ramakrishna Srinivasa [mailto:[email protected]]
Sent: Monday, January 13, 2003 11:56 PM
To: [email protected]
Subject: Re: Websphere and Local transactions ..

I am not sure if I got the exact context of the message , but you can try
this:

1. Only if you provide LocalTransactionDemarcation for the Component level ,
inside your RA,  you need to explicitly send a begin and commit event. if
not , App Server autoatically does that when it sees the Scope as
<LocalTransaction> in your ra.xml file.

so what may be happening in your case is that even though you have not
provided LocalTransactionDemarcation for the component , you are still
trying to call start which is trying to interfere in the same Trans context
which has already started.

Anyway just check that the EJB Transaction setting as trans-required.It
should have been already..otherwise you will be getting a different error.

Ramki///

        -----Original Message-----
        From: Madhav Inamti [mailto:[email protected]]
        Sent: Tue 1/14/2003 12:26 AM
        To: [email protected]
        Cc:
        Subject: Websphere and Local transactions ..



        I am having trouble getting a resource adapter to work with IBM
Websphere 5.0 with Local Transactions.

        I having it working fine with J2EE Reference Impl. However with
Local Transactions, when I try to inform the

        ConnectionEventListener that a local transaction has started, it
seems to fail.



        From the trace it appears that Websphere's Connection Manager is
involving the ManagedConnection in a local transaction from the start, so
when I send a

        localTransactionStarted event, it seems to think there are multiple
resources  .. Is there some setting that makes it not register the MC in a
transaction ?



        I have the EJB invoking the Connector. Is this related to EJB
setting ?



        Has anybody encountered this ?



        Thanks in advance,



        Madhav



        WTRN0062E: An illegal attempt to use multiple resources that have
only one-phase capability has occurred within a global transaction.

        [1/13/03 13:04:24:828 GMT-08:00] 474cfc94 LocalTransact E J2CA0030E:
Method enlist caught java.lang.IllegalStateException

        while trying to enlist resources from datasource eis/AServer with
the Transaction Manager for the current transaction, and threw a Exception.

                    at
com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:546)

                    at
com.ibm.ejs.jts.jta.JTSXA.enlistResource(JTSXA.java:1061)

                    at
com.ibm.ejs.jts.jta.JTSXA.enlistOnePhase(JTSXA.java:1038)

                    at
com.ibm.ejs.j2c.LocalTransactionWrapper.enlist(LocalTransactionWrapper.java:
493)

                    at
com.ibm.ejs.j2c.ConnectionEventListener.localTransactionStarted(ConnectionEv
entListener.java:529)

                    at
com.m.connector.spi.CConnectionEventListener.sendEvent()

                    at com.m.connector.spi.CManagedConnection.sendEvent()

                    at com.m.connector.spi.TransactionImpl.begin()

                    at com.m.connector.spi.SpiLocalTransaction.begin()

                    at
com.ibm.ejs.j2c.LocalTransactionWrapper.start(LocalTransactionWrapper.java:7
92)

                    at
com.ibm.ejs.jts.jta.WSResourceImplBase.start(WSResourceImplBase.java:156)

                    at
com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:705)

                    at
com.ibm.ejs.jts.jta.JTSXA.enlistResource(JTSXA.java:1061)

                    at
com.ibm.ejs.jts.jta.JTSXA.enlistOnePhase(JTSXA.java:1038)

                    at
com.ibm.ejs.j2c.LocalTransactionWrapper.enlist(LocalTransactionWrapper.java:
493)

                    at
com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java:81
0)

                    at
com.ibm.ejs.j2c.ConnectionManager.involveMCInTran(ConnectionManager.java:622
)

                    at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:
379)

                    at
com.m.connector.cci.CConnectionFactory.getConnection()

N rzǧuéš [h+-
Ú²      fv)ܖ^{ay: Ê‡Í…Æ zÈ  M $D S   LZ+       azZlzw^b ..&jwb nu ܨ~^ ,j

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff CONNECTOR-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".