ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ / Websphere Transaction question

Post new topic  Reply to topic
 MQ / Websphere Transaction question « View previous topic :: View next topic » 
Author Message
prash
PostPosted: Thu Dec 11, 2003 10:03 pm    Post subject: MQ / Websphere Transaction question Reply with quote

Newbie

Joined: 26 Nov 2003
Posts: 6

Hi,

1. I'm using a message driven to receive messages from a queue and
based on the processing results,put a success or failure message into
another reply queue.
2. Both the queues are defined on the same queue manager.
3. The MQ server and websphere application server are installed on
different machines.
4. I'm using "WebSphere MQ JMS Provider" for connection factories and
Destinations
4. Connection factory is configured with "Transport Type=CLIENT" and
XA Enable flag is set to false.
6. The MDB is configured as "Container managed" with Transaction
Attribute "Required" for onMessage function.
5. However at runtime i get this exception :
[12/12/03 11:13:46:477 IST] 6e181a7f TransactionIm E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
[12/12/03 11:13:46:602 IST] 6e181a7f LocalTransact E J2CA0030E: Method enlist caught java.lang.IllegalStateException
at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:567)
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:507)
at com.ibm.ejs.j2c.ConnectionEventListener.localTransactionStarted(ConnectionEventListener.java:568)
at com.ibm.ejs.jms.JMSManagedSession.localTransactionStarted(JMSManagedSession.java:859)
at com.ibm.ejs.jms.JMSManagedSession.enlist(JMSManagedSession.java:815)
at com.ibm.ejs.jms.JMSMessageProducerHandle.enlist(JMSMessageProducerHandle.java:716)
at com.ibm.ejs.jms.JMSQueueSenderHandle.send(JMSQueueSenderHandle.java:175)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.sendNotificationMessage(NotificationSender.java:93)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.update(NotificationSender.java:51)
at java.util.Observable.notifyObservers(Observable.java:151)
at com.epsliberty.ext.adapter.cco.customer.ProcessMonitor.incrementFailedTxnCount(ProcessMonitor.java:85)
at com.epsliberty.ext.adapter.cco.customer.CustomerFeedMessageHandler.create(CustomerFeedMessageHandler.java:512)
at com.epsliberty.ext.adapter.cco.customer.CustomerFeedMDB.onMessage(CustomerFeedMDB.java:75)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:205)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:194)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:172)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1043)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:922)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:697)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:482)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
while trying to enlist resources from datasource JMS$CCOCFMQ$JMSManagedConnection@412326524 with the Transaction Manager for the current transaction, and threw a Exception.
[12/12/03 11:13:46:789 IST] 6e181a7f ConnectionEve E J2CA0074E: Unable to enlist connection from resource JMS$CCOCFMQ$JMSManagedConnection@412326524 with current transaction in method localTransactionStarted due to exception. Initiating destruction of connection. Exception is: javax.resource.ResourceException: enlist: caught Exception
at com.ibm.ejs.j2c.LocalTransactionWrapper.enlist(LocalTransactionWrapper.java:609)
at com.ibm.ejs.j2c.ConnectionEventListener.localTransactionStarted(ConnectionEventListener.java:568)
at com.ibm.ejs.jms.JMSManagedSession.localTransactionStarted(JMSManagedSession.java:859)
at com.ibm.ejs.jms.JMSManagedSession.enlist(JMSManagedSession.java:815)
at com.ibm.ejs.jms.JMSMessageProducerHandle.enlist(JMSMessageProducerHandle.java:716)
at com.ibm.ejs.jms.JMSQueueSenderHandle.send(JMSQueueSenderHandle.java:175)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.sendNotificationMessage(NotificationSender.java:93)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.update(NotificationSender.java:51)
at java.util.Observable.notifyObservers(Observable.java:151)
at com.epsliberty.ext.adapter.cco.customer.ProcessMonitor.incrementFailedTxnCount(ProcessMonitor.java:85)
at com.epsliberty.ext.adapter.cco.customer.CustomerFeedMessageHandler.create(CustomerFeedMessageHandler.java:512)
at com.epsliberty.ext.adapter.cco.customer.CustomerFeedMDB.onMessage(CustomerFeedMDB.java:75)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:205)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:194)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:172)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1043)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:922)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:697)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:482)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
---- Begin backtrace for Nested Throwables
java.lang.IllegalStateException
at com.ibm.ejs.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:567)
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:507)
at com.ibm.ejs.j2c.ConnectionEventListener.localTransactionStarted(ConnectionEventListener.java:568)
at com.ibm.ejs.jms.JMSManagedSession.localTransactionStarted(JMSManagedSession.java:859)
at com.ibm.ejs.jms.JMSManagedSession.enlist(JMSManagedSession.java:815)
at com.ibm.ejs.jms.JMSMessageProducerHandle.enlist(JMSMessageProducerHandle.java:716)
at com.ibm.ejs.jms.JMSQueueSenderHandle.send(JMSQueueSenderHandle.java:175)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.sendNotificationMessage(NotificationSender.java:93)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.update(NotificationSender.java:51)
at java.util.Observable.notifyObservers(Observable.java:151)
at com.epsliberty.ext.adapter.cco.customer.ProcessMonitor.incrementFailedTxnCount(ProcessMonitor.java:85)
at com.epsliberty.ext.adapter.cco.customer.CustomerFeedMessageHandler.create(CustomerFeedMessageHandler.java:512)
at com.epsliberty.ext.adapter.cco.customer.CustomerFeedMDB.onMessage(CustomerFeedMDB.java:75)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:205)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:194)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:172)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1043)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:922)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:697)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:482)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:449)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

[12/12/03 11:13:46:804 IST] 6e181a7f ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$CCOCFMQ$JMSManagedConnection@412326524. The exception which was received is null
[12/12/03 11:13:46:804 IST] 6e181a7f ConnectionEve A J2CA0092E: This is an English only message: Event source is com.ibm.ejs.jms.JMSManagedQueueSession@3a5a1a7c
physical session = com.ibm.mq.jms.MQQueueSession@3a4ada7c
session type = TRANSACTED_SESSION
acknowledge mode = DUPS_OK_ACKNOWLEDGE
enlisted = false
open session handles = []
managed session factory = com.ibm.ejs.jms.JMSManagedQueueSessionFactory@b931a7c.
[12/12/03 11:13:46:960 IST] 6e181a7f ServerSession W WMSG0031E: Exception processing JMS Message for MDB CustomerFeedMDB, JMSDestination jms/CCOInputMQ : java.lang.IllegalStateException: enlist: caught Exception
at com.ibm.ejs.j2c.ConnectionEventListener.localTransactionStarted(ConnectionEventListener.java:605)
at com.ibm.ejs.jms.JMSManagedSession.localTransactionStarted(JMSManagedSession.java:859)
at com.ibm.ejs.jms.JMSManagedSession.enlist(JMSManagedSession.java:815)
at com.ibm.ejs.jms.JMSMessageProducerHandle.enlist(JMSMessageProducerHandle.java:716)
at com.ibm.ejs.jms.JMSQueueSenderHandle.send(JMSQueueSenderHandle.java:175)
at com.epsliberty.ext.adapter.cco.customer.NotificationSender.sendNotificationMessage(NotificationSender.java:93)


6. Here "NotificationSender.sendNotificationMessage" is the method
which send success or failure message to another queue.
7. However if i run the MQServer and the websphere app server on
same box and choose "Transport Type=BINDING" in the
connection factory settings i do not get the above exception.

Can anyone help me understand whats happeing?Do i have to run the
mq server and the app server on the same machine, in order to get
the desired functionality.?Is there a workround for the installing mq
and websphere on separate machines and still get the functionality.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Dec 12, 2003 8:32 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I would have guessed that your step 4 should have the XA-enabled and that step 7's binding would have also failed. Have you tried marking the QCF as XA-enabled to see what it does?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ / Websphere Transaction question
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.