There's a bug somewhere here, perhaps you could file a report. You will stress the jca machinery less if you get the connection after the tx has started and close the connection before the tx commits.
I think someone did get MQSeries to work, look in the messaging forum. david jencks On 2002.08.08 13:21:49 -0400 "Geer, Benjamin" wrote: > I'm trying to get IBM's MQSeries JMS provider to work with JBoss 3.0.1. > > I've changed jms-service.xml so that the QueueFactoryRef attribute > points to an MQSeries XAQueueConnectionFactory, which I've bound into > JBoss's JNDI namespace using the JMSAdmin tool supplied with MQSeries. > I can begin a transaction, send some messages to an MQSeries queue, and > commit the transaction. So far, so good. > > I'm running into two problems. > > Problem 1 > --------- > > Having committed a UserTransaction, if I then begin a new > UserTransaction in the same thread, using the same JMS objects > (QueueSession, etc.), MQSeries complains: > > com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072 > > According to the MQSeries documentation, this means: > > MQRC_SYNCPOINT_NOT_AVAILABLE > > [snip] > > This reason code can also occur...when an external unit-of-work > coordinator is being used. If that coordinator requires an explicit > call to start the unit of work, but the application has not issued > that call prior to the MQGET, MQPUT, or MQPUT1 call, reason code > MQRC_SYNCPOINT_NOT_AVAILABLE is returned. > > I'm wondering whether JBoss isn't enlisting the MQSeries XAResource in > the new transaction. Does anyone have any experience with this, or any > ideas about how I could find out exactly what's going wrong? > > Problem 2 > --------- > > In my jms-service.xml, the connection pool is configured to have a > maximum size of 50 connections. > > If I get a new QueueConnection for each transaction, and close the > QueueConnection after committing each transaction, I can begin and > commit multiple transactions, one after the other, in the same thread > (in an MBean service), like this: > > InitialContext ctx = new InitialContext(); > QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) > ctx.lookup("java:/JmsXA"); > Queue queue = (Queue)ctx.lookup("TEST.Q"); > > for (int count = 0; count < 100; ++count) > { > ut = (UserTransaction)ctx.lookup("UserTransaction"); > ut.begin(); > > QueueConnection queueConnection = > queueConnectionFactory.createQueueConnection(); > QueueSession queueSession = > queueConnection.createQueueSession(true, > Session.AUTO_ACKNOWLEDGE); > QueueSender queueSender = queueSession.createSender(queue); > > // Send some messages... > > ut.commit(); > queueConnection.close(); > } > > However, after the 50th such transaction, I get this error: > > 17:57:15,883 ERROR [JmsSessionFactoryImpl] could not create session > javax.resource.ResourceException: No ManagedConnections Available! > at > org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getCo > nnection(InternalManagedConnectionPool.java:122) > at > org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool. > getConnection(JBossManagedConnectionPool.java:482) > at > org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedCo > nnection(BaseConnectionManager2.java:467) > at > org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConn > ection(BaseConnectionManager2.java:532) > at > org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionMa > nagerProxy.allocateConnection(BaseConnectionManager2.java:812) > at > org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createQueueSession( > JmsSessionFactoryImpl.java:119) > > This looks as if it means that, even though I'm closing my > QueueConnection and making a new one each time, the QueueConnections > aren't being returned to the connection pool. > > Does it look as if I'm doing something wrong, or as if this might be a > bug in JBoss or MQSeries? > > Benjamin > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user