[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Bug in transactional delivery in an MDB
clebert.suconic@jboss.com
do-not-reply at jboss.com
Mon Apr 23 11:45:42 EDT 2007
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#4039902
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039902
More information about the jboss-dev-forums
mailing list