dev@genericjmsra.java.net

Re: [Fwd: Re: XAException while connecting Generic JMS RA 2.0 with Oracle AQ]

From: Ramesh Parthasarathy <Ramesh.Parthasarathy_at_Sun.COM>
Date: Wed, 20 Aug 2008 08:13:58 +0000

Hi Sri,
        You mean, it works after setting the RMPolicy, correct !

For the resource recovery to work, i guess you might have to do the
following, please try this and let me know


You might need special permissions set on the transaction tables.
I have not tried this myself, and not an Oracle expert either, you might
want to check this with a DBA.

As user SYS, run the following commands on your Oracle server:

grant select on pending_trans$ to public;
grant select on dba_2pc_pending to public;
grant select on dba_pending_transactions to public;
grant execute on dbms_system to <user>;

User would be the user id that is used in the connection pool for
connecting to AQ.

On the other hand if you do not want automatic transaction recovery in
the application , you could simply turn it off in the transaction service.

BTW: If your transactions go through without any issues, there should
not be any PENDING XA resources left to recover, i see 2 XAs in your
case for recovery

Thanks
-Ramesh


On 08/20/08 07:36, Sri Sri wrote:
> Hi Ramesh,
>
> Also attached is the domain.xml
>
> Cheers and Thanks
> Sri
>
>
> On 8/20/08, *Sri Sri* <mesri09_at_gmail.com <mailto:mesri09_at_gmail.com>> wrote:
>
> Hi,
>
> Thanks a lot. The flow seems to work. It is publishing to the
> DeadLetter Queue. I am facing one more issue while recovering XA
> transactions on server startup. I have attached the server.log and
> the MDB code which I am working on.
> Recover exception
>
> [#|2008-08-20T12:33:21.715+0530|WARNING|sun-appserver-ee8.1_02|javax.enterprise.system.core.transaction|_ThreadID=11;|JTS5028
> : XAException occured during recovery of XAResource objects.
> javax.transaction.xa.XAException
> at
> oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:613)
> at oracle.jms.AQjmsXAResource.recover(AQjmsXAResource.java:318)
> at
> com.sun.genericra.outbound.XAResourceProxy.recover(XAResourceProxy.java:188)
> at
> com.sun.jts.CosTransactions.RecoveryManager.proceedWithXARecovery(RecoveryManager.java:880)
> at
> com.sun.jts.CosTransactions.RecoveryManager.recover(RecoveryManager.java:431)
> at
> com.sun.jts.CosTransactions.ResyncThread.run(RecoveryManager.java:1556)
>
>
> Any more info please let me know
>
> Thanks again
>
>
>
> On 8/19/08, *Ramesh Parthasarathy* <Ramesh.Parthasarathy_at_sun.com
> <mailto:Ramesh.Parthasarathy_at_sun.com>> wrote:
>
>
>
> -------- Original Message --------
> Subject: Re: XAException while connecting Generic JMS RA 2.0
> with Oracle AQ
> Date: Tue, 19 Aug 2008 12:19:38 +0000
> From: Ramesh Parthasarathy <Ramesh.Parthasarathy_at_Sun.COM>
> Reply-To: users_at_genericjmsra.dev.java.net
> <mailto:users_at_genericjmsra.dev.java.net>
> To: dev_at_genericjmsra.dev.java.net
> <mailto:dev_at_genericjmsra.dev.java.net>
> CC: users_at_genericjmsra.dev.java.net
> <mailto:users_at_genericjmsra.dev.java.net>
> References:
> <6e63bb0c0808182341u7081d265r2161cda55773c326_at_mail.gmail.com
> <mailto:6e63bb0c0808182341u7081d265r2161cda55773c326_at_mail.gmail.com>>
>
> Hi,
> Would it be possible to share your code and the domain.xml.
> Have you configured the rm policy when you created the ra config ?
> "RMPolicy=OnePerPhysicalConnection"
>
> Thanks
> -Ramesh
>
>
> On 08/19/08 06:41, Sri Sri wrote:
>
> Hi,
>
> Following is my scenario:-
>
> I have configured Generic JMS RA 2.0 with Oracle AQ (on 10G
> Database) as the JMS provider. I have a container managed
> MDB with "Required" transaction consuming from queue
> OutboundQueue and from within the MDB looks up Queue
> DeadLetterQueue and publishes to DeadLetterQueue. When it is
> publishing to Queue DeadLetterQueue, I am getting the
> following exception and the message is getting rolled back
> to Queue OutboundQueue. There are 2 Connector pools for both
> the queues (I have tried using a single pool also as both
> the queues are on the same schema in the database)
>
> [#|2008-08-19T11:27:21.632+0530|WARNING|sun-appserver-ee8.1_02|javax.enterprise.system.core.transaction|_ThreadID=14;|JTS5041
> : The resource manager is doing work outside a global
> transaction
> oracle.jdbc.xa.OracleXAException
> at
> oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1223)
> at
> oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:318)
> at
> oracle.jms.AQjmsXAResource.start(AQjmsXAResource.java:440)
> at
> com.sun.genericra.outbound.XAResourceProxy.start(XAResourceProxy.java:244)
> at
> com.sun.enterprise.resource.XAResourceWrapper.start(XAResourceWrapper.java:98)
> at
> com.sun.jts.jta.TransactionState.startAssociation(TransactionState.java:265)
> at
> com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:181)
> at
> com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:397)
> at
> com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:317)
> at
> com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:114)
> at
> com.sun.enterprise.resource.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:117)
>
> I have attached the server.log, the screenshots of
> configuration on SUN Application server 8.1_02. Has anyone
> faced a similar problem, please help me solve the above issue.
>
> Any more information required, please let me know.
>
> Cheers
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe_at_genericjmsra.dev.java.net
> <mailto:dev-unsubscribe_at_genericjmsra.dev.java.net>
> For additional commands, e-mail:
> dev-help_at_genericjmsra.dev.java.net
> <mailto:dev-help_at_genericjmsra.dev.java.net>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_genericjmsra.dev.java.net
> <mailto:users-unsubscribe_at_genericjmsra.dev.java.net>
> For additional commands, e-mail:
> users-help_at_genericjmsra.dev.java.net
> <mailto:users-help_at_genericjmsra.dev.java.net>
>
>
>
>