The Qpid JCA examples default to using XATransaction for the 
org.apache.qpid.ra.QpidRAConnectionFactory. We're trying to use the JCA adapter 
under GlassFish 3.1.2.2 (we were able to deploy the JCA adapter - I'll share 
some notes shortly for issues that we encountered trying to deploy and 
configure the qpid-ra-0.18.rar JCA under GlassFish 3.1.2.2 - however I'm trying 
to understand several things about the Qpid JCA adapter:

1. Is the XATransaction mode the preferred mode to use the JCA adapter? In 
other words, does Qpid support the Local or No transaction mode? The example's 
glassfish-resources.xml has the LocalTransaction ConnectionFactory 
<connector-connection-pool/> configuration commented out and the example's 
README-EXAMPLE.txt states that the "local JMS transaction CF is currently 
deprecated" - this implies to me that the LocalTransaction (and I'd assume the 
NoTransaction) modes are not supported?

2. What are the typical use cases for using the XA transaction mode? I don't 
think we really need XA for my application but I just might need to become more 
knowledgeable about XA with JCA/JMS (as far as I know I thought transactions 
with JMS is really only to put the message on the queue (or take a message off 
the queue) -- each Java EE app server would provide proprietary features to do 
things like distributed transactions/propagated transactions/nested 
transactions)

When trying to use the XATransaction mode, we get the following errors (I can't 
provide the full stacktrace so hopefully this is enough). Our test application 
is putting a message onto a Qpid queue from within a JAX-WS web service 
(successfully), an MDB receives the message (successfully) and obtains another 
Connection to publish the message to a "reply" queue (fails seems to timeout 
getting a connection), another MDB is supposed to read the messages put on the 
"reply" queue (never gets here). Here is some of the errors that we see in the 
JMS client log when trying to use the XA transaction (this app works under the 
Local and No transaction modes):

ERROR ...[Dispatcher-0-Conn-3, BasicMessageConsumer:notifyMessage] - 
reNotification : Caught exception (dump follows) - ignoring...
java.lang.IllegalArgumentException: range exceeds max received command-id: [1, 
1]
  at org.apache.qpid.transport.Session.processed(Sessoin.java:459)
  at org.apache.qpid.transport.Session.processed(Sessoin.java:439)
  at 
org.apache.qpid.client.AMQSession_0_10.flushProcessed(AMQSesion_0_10.java:313)
  at 
org.apache.qpid.client.AMQSession_0_10.messageAcknowledgments(AMQSession_0_10.java:296)
...

ERROR ...[Dispatcher-0-Conn-3, BasicMessageConsumer:notifyMessage] - 
reNotification : Caught exception (dump follows) - ignoring...
java.lang.IllegalStateException: Invalid Session
  at 
org.apache.qpid.client.BasicMessageConsumer.checkPreConditions(BasicMessageConsumer.java:890)
...

INFO ...[IoReceiver - <host>, AMQConnection:exceptionReceived] - Not a 
hard-error connection not closing: org.apache.qpid.AMQException: ch-1 id=5 
ExecutionException(errorCode=ILLEGAL_STATE, commandId=12, classCode=6, 
commandCode=4, fieldIndex-0, description=illegal-state: Branch with xid (Xid: 
format=4871251; global-id=ETX, errorInfo={}) [error code 409: argument invalid]
WARN ... [IoReceiver - <host>, QpidExceptionHandler:handleFailure] - Failure in 
Qpid activation 
org.apache.qpid.ra.inflow.QpidActivationSpec(ra=org.apache.qpid.ra.QpidResourceAdapter@ab5491
 destination=<qpid dest> destinationType=javax.jms.Queue ack=Auto-acknowledge 
durable=false clientID=null user=null maxSession=15 connectionPerHandler=true)
javax.jms.Exception: Exception thrown against AMQConnection:
...

ERROR ... [Dispatcher-0-Conn-7, QpidRASessionFactoryImpl:allocationConnection] 
- Could not create session javax.resource.spi.ResourceAllocationException: 
Error in allocating a connection. Cause: 
org.apache.qpid.transport.SessionException: timed out waiting for session to 
become open (state=DETACHED)
  at 
com.sun.enterprise.connectors.ConectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
  ... (more com.sun lines)
  at 
org.apache.qpid.ra.QpidRASessionFactoryImpl.allocationConnection(QpidRASessionFactoryImpl.java:850)
  at 
org.apache.qpid.ra.QpidRASessionFactoryImpl.createSession(QpidRASessionFactoryImpl.java:483)
  ... (receive message MDB's onMessage)
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: 
org.apache.qpid.transport.SessoinException: timed out waiting for session to 
become open (state=DETACHED)
  at 
com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:221)
...
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: 
org.apache.qpid.transport.SessoinException: timed out waiting for session to 
become open (state=DETACHED)
  at 
com.sun.enterprise.resource.rm.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:173)
  at 
com.sun.enterprise.resource.rm.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:112)
...
Caused by: org.apache.qpid.transport.SessionException: timed out waiting for 
session to become open (state=DETACHED)
...

ERROR ... [IoReceiver - <host>, AMQConnection:doClose] - error:
org.apache.qpid.AMQException: close() timed out
...

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to