users@genericjmsra.java.net

Re: [Fwd: Re: Outbound communications via genericra]

From: Binod <Binod.Pg_at_Sun.COM>
Date: Wed, 18 Jan 2006 13:10:19 +0530

Hi Max,

Would you please send your domain.xml and sun-ejb-jar.xml?

- Binod.

> Hi Binod
>
> I used the SJSAS8.1 mdb-simpleEJB sample, modified as -
>
> WMQ standalone client ==[jms msg1]==> GenericJMSRA
> ==> mdb-simpleEJB (modified to send back anther jms msg to WMQ)
> ==[jms msg2]==> WMQ
>
> which runs fine with [jms msg2] deposited to WMQ.
>
> Then I changed the mdb-simpleEJB's <sun-ejb-jar.xml> as follows from
> BMT to CMT -
>
> <ejb-jar>
> <enterprise-beans>
> <message-driven>
> <display-name>SimpleMessageEJB</display-name>
> <ejb-name>SimpleMessageEJB</ejb-name>
> <ejb-class>samples.ejb.mdb.simple.ejb.SimpleMessageBean</ejb-class>
> <messaging-type>javax.jms.MessageListener</messaging-type>
> <!--<transaction-type>Bean</transaction-type>-->
> <transaction-type>Container</transaction-type>
> <message-destination-type>javax.jms.Queue</message-destination-type>
> </message-driven>
> </enterprise-beans>
> </ejb-jar>
>
> and then redeployed mdb-simpleEJB, re-tried the test and got the
> following error in appserver server.log. Can you advise how I can
> enable XA transaction from WMQ6 JMS client to GenericJMSRA, MDB and
> back to WMQ6 ?
>
> Thanks.
>
> [#|2006-01-18T14:10:21.534+0800|FINEST|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Managed
> Connection = Physical Session ->
> com.ibm.mq.jms.MQQueueSession_at_1e35a2fPhysical Connection
> com.ibm.mq.jms.MQXAQueueConnection_at_1cf56e9Super ->
> com.sun.genericra.outbound.ManagedConnection_at_14ce181
> XAResourceProxyisSameRM returns : true|#]
>
> [#|2006-01-18T14:10:21.534+0800|FINEST|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|[ManagedConnection]
> Transaction Started|#]
>
> [#|2006-01-18T14:10:21.534+0800|FINEST|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Managed
> Connection = Physical Session ->
> com.ibm.mq.jms.MQQueueSession_at_1e35a2fPhysical Connection
> com.ibm.mq.jms.MQXAQueueConnection_at_1cf56e9Super ->
> com.sun.genericra.outbound.ManagedConnection_at_14ce181
> XAResourceProxynullStarting tx...TMJOIN|#]
>
> [#|2006-01-18T14:16:40.098+0800|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.core.transaction|_ThreadID=33;|JTS5041:
> The resource manager is doing work outside a global transaction
> javax.transaction.xa.XAException: XA operation failed, see errorCode
> at com.ibm.mq.MQXAResource.start(MQXAResource.java:451)
> at
> com.sun.genericra.outbound.XAResourceProxy.start(XAResourceProxy.java:225)
> at
> com.sun.jts.jta.TransactionState.startAssociation(TransactionState.java:265)
> .......
> ......
> [#|2006-01-18T14:16:40.098+0800|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.resource.resourceadapter|_ThreadID=33;|RAR5029:Unexpected
> exception while registering component
> javax.transaction.SystemException
> at
> com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:193)
> at
> com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:397)
> at
> com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:312)
> at
> com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:114)
> at
> com.sun.enterprise.resource.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:112)
> at
> com.sun.enterprise.resource.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:71)
> at
> com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:268)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:147)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:122)
> at
> com.sun.genericra.outbound.ConnectionFactory.createConnection(ConnectionFactory.java:69)
> at
> com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(ConnectionFactory.java:101)
> at samples.ejb.mdb.simple.ejb.SimpleMessageBean.onMessage(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
> at
> com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
> at
> com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:956)
> at
> com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:42)
> at
> com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:130)
> at $Proxy40.onMessage(Unknown Source)
> at
> com.sun.genericra.inbound.DeliveryHelper.deliverMessage(DeliveryHelper.java:186)
> at
> com.sun.genericra.inbound.DeliveryHelper.deliver(DeliveryHelper.java:133)
> at
> com.sun.genericra.inbound.DeliveryHelper.deliver(DeliveryHelper.java:123)
> at
> com.sun.genericra.inbound.EndpointConsumer.consumeMessage(EndpointConsumer.java:193)
> at
> com.sun.genericra.inbound.MessageListener.onMessage(MessageListener.java:56)
> at com.ibm.mq.jms.MQSession.run(MQSession.java:1671)
> at com.sun.genericra.inbound.WorkImpl.run(WorkImpl.java:49)
> at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
> at
> com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
> |#]
>
> [#|2006-01-18T14:16:40.098+0800|WARNING|sun-appserver-pe8.1_02|javax.enterprise.resource.resourceadapter|_ThreadID=33;|poolmgr.err_enlisting_res_in_getconn|#]
>
> [#|2006-01-18T14:16:40.098+0800|WARNING|sun-appserver-pe8.1_02|javax.enterprise.resource.resourceadapter|_ThreadID=33;|RAR5117
> : Failed to obtain/create connection. Reason :
> javax.transaction.SystemException|#]
>
> [#|2006-01-18T14:16:40.098+0800|INFO|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Error
> in allocating a connection. Cause: javax.transaction.SystemException
> javax.resource.spi.ResourceAllocationException: Error in allocating a
> connection. Cause: javax.transaction.SystemException
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:283)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:147)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:122)
> at
> com.sun.genericra.outbound.ConnectionFactory.createConnection(ConnectionFactory.java:69)
> at
> com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(ConnectionFactory.java:101)
> at samples.ejb.mdb.simple.ejb.SimpleMessageBean.onMessage(Unknown
> Source)
> .....
> Caused by: com.sun.enterprise.resource.PoolingException:
> javax.transaction.SystemException
> at
> com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:186)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:268)
> ... 26 more
> |#]
>
> [#|2006-01-18T14:16:40.098+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=33;|
> Exception occurred: javax.jms.JMSException: Error in allocating a
> connection. Cause: javax.transaction.SystemException|#]
>
> [#|2006-01-18T14:16:40.098+0800|FINEST|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Simple
> XAResourceProxynullEnding tx...TMSUCCESS|#]
>
> [#|2006-01-18T14:16:40.098+0800|FINEST|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Simple
> XAResourceProxynullCOmmitting tx...|#]
>
> [#|2006-01-18T14:16:40.148+0800|FINE|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Binod.OUT:
> released endpoint : |#]
>
> [#|2006-01-18T14:16:40.148+0800|FINER|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=33;|Freed
> the resource now|#]
>
> [#|2006-01-18T14:30:10.704+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=34;|
> In SimpleMessageBean.remove()|#]
>
> [#|2006-01-18T14:30:10.704+0800|FINEST|sun-appserver-pe8.1_02|com.sun.genericjmsra|_ThreadID=34;|[ManagedConnection]
> MC::cleanup - tx in progress ? true|#]
>
>
> Binod wrote:
>
>> Glad that you are all set!
>>
>>> Hi Binod
>>>
>>> I've been able to sort out that the problem was due to the " "
>>> quotes I specified in APPCAPTH as it's appended to the CLASSPATH in
>>> appclient.bat, the extra " " seem to make the reference to
>>> genericra.jar invalid. Removing the " " quote for APPCPATH env
>>> variable, followed by added the path to com.ibm.mqjms.jar enabled me
>>> to set message from appclient to WMQ successfully.
>>>
>>> Thanks
>>> Max
>>