5 Replies Latest reply on Dec 27, 2004 5:02 PM by danielbr

    WebSphere 5.0.2 with JBossMQ 3.2.6 for Distributed Transacti

    marcfleury

      I am trying to use JBoss as a "Generic JMS Provider" for distributed transactions under WebSphere Application Server (WAS) v.5.0.2, following the general guidelines in an IBM tutorial detailing how to configure WAS 5.0 with SonicMQ (http://www-106.ibm.com/developerworks/websphere/library/tutorials/0309_chen/chen_reg.html).

      I have a transactional session bean method that creates an entity bean and places a message in a queue. The session bean uses an XA datasource with the entity bean and obtains a JBoss XAConnectionFactory for the JMS Queue (queue/Q1). My transaction fails with the following message in the WAS console:

      [12/21/04 15:34:15:880 EST] 56767404 JTAXAResource W WTRN0083_UNEXPECTED_XA_ERROR_ON_ROLLBACK XAER_RMERR
      ERROR [2004-12-21 15:34:15,973] (ClusteringAction.java:305) - javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
       org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: minor code: 0 completed: No


      But the root cause of the problem can be seen here (also from the WAS log):

      nested throwable: org.jboss.mq.SpyJMSException: Cannot process a transaction; - nested throwable: (java.io.NotSerializableException: com.ibm.ejs.jts.jta.XID)
       at org.jboss.mq.Connection.send(Connection.java:1221)
       at org.jboss.mq.SpyXAResourceManager.prepare(SpyXAResourceManager.java:208)
       at org.jboss.mq.SpyXAResource.prepare(SpyXAResource.java:131)
      ...
      

      So for some reason JBoss tries to serialize the IBM provided transaction ID and fails. Any ideas how to make this work?

      Here's what happens inside the JBoss server log:

      2004-12-21 15:34:05,645 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=sa, password=--hidden--}
      2004-12-21 15:34:15,317 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
      2004-12-21 15:34:15,317 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
      2004-12-21 15:34:15,317 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
      2004-12-21 15:34:15,317 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
      2004-12-21 15:34:15,317 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Setting up the UILClientIL Connection
      2004-12-21 15:34:15,317 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] The UILClientIL Connection is set up
      2004-12-21 15:34:15,457 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
      java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.ibm.ejs.jts.jta.XID
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1303)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
       at org.jboss.mq.TransactionRequest.readExternal(TransactionRequest.java:64)
       at org.jboss.mq.il.uil2.msgs.TransactMsg.read(TransactMsg.java:56)
       at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:292)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.NotSerializableException: com.ibm.ejs.jts.jta.XID
      2004-12-21 15:34:15,457 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
      2004-12-21 15:34:15,457 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
      2004-12-21 15:36:35,639 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 150000
      


      Thanks,

      Daniel.