Just to add some information on this:
At JmsActivation the transactional attribute is taken in consideration. So.. even CF is a
XAConnectionFActory it wouldn't use the XA method if the transactional parameter is
false on a createSession request.
Relevant code:
| package org.jboss.resource.adapter.jms.inflow;
|
| public class JmsActivation implements ExceptionListener
| {
|
| ....
|
| protected TopicConnection setupTopicConnection(Context ctx, String
| user, String pass, String clientID) throws Exception
| {
| String topicFactoryRef = adapter.getTopicFactoryRef();
| log.debug("Attempting to lookup topic connection factory " +
| topicFactoryRef);
| TopicConnectionFactory tcf = (TopicConnectionFactory)
| Util.lookup(ctx, topicFactoryRef, TopicConnectionFactory.class);
| log.debug("Got topic connection factory " + tcf + " from "
+
| topicFactoryRef);
| log.debug("Attempting to create topic connection with user " +
| user);
| TopicConnection result;
| if (tcf instanceof XATopicConnectionFactory &&
| isDeliveryTransacted)
| {
| XATopicConnectionFactory xatcf = (XATopicConnectionFactory)
| tcf;
| if (user != null)
| result = xatcf.createXATopicConnection(user, pass);
| else
| result = xatcf.createXATopicConnection();
| }
| else
| {
| if (user != null)
| result = tcf.createTopicConnection(user, pass);
| else
| result = tcf.createTopicConnection();
| }
| if (clientID != null)
| result.setClientID(clientID);
| result.setExceptionListener(this);
| log.debug("Using topic connection " + result);
| return result;
| }
|
| ....
| }
|
This way a non transacted Session would be aways a plain Connection...
but not for us!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039902#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...