View Javadoc

1   /*
2    * $Id: ActiveMQXAJmsConnector.java 10787 2008-02-12 18:51:50Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.transport.jms.activemq;
11  
12  import org.mule.util.ClassUtils;
13  
14  import javax.jms.ConnectionFactory;
15  
16  public class ActiveMQXAJmsConnector extends ActiveMQJmsConnector
17  {
18      public static final String ACTIVEMQ_XA_CONNECTION_FACTORY_CLASS = "org.apache.activemq.ActiveMQXAConnectionFactory";
19  
20      protected ConnectionFactory getDefaultConnectionFactory()
21      {
22          try
23          {
24              ConnectionFactory connectionFactory = (ConnectionFactory)
25                      ClassUtils.instanciateClass(ACTIVEMQ_XA_CONNECTION_FACTORY_CLASS, new Object[]{getBrokerURL()});
26              applyVendorSpecificConnectionFactoryProperties(connectionFactory);
27              return connectionFactory;
28          }
29          catch (Exception e)
30          {
31              logger.warn(e);
32              return null;
33          }
34      }
35  }