01: /*
02: * $Id: ActiveMQXAJmsConnector.java 10787 2008-02-12 18:51:50Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
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: public static final String ACTIVEMQ_XA_CONNECTION_FACTORY_CLASS = "org.apache.activemq.ActiveMQXAConnectionFactory";
18:
19: protected ConnectionFactory getDefaultConnectionFactory() {
20: try {
21: ConnectionFactory connectionFactory = (ConnectionFactory) ClassUtils
22: .instanciateClass(
23: ACTIVEMQ_XA_CONNECTION_FACTORY_CLASS,
24: new Object[] { getBrokerURL() });
25: applyVendorSpecificConnectionFactoryProperties(connectionFactory);
26: return connectionFactory;
27: } catch (Exception e) {
28: logger.warn(e);
29: return null;
30: }
31: }
32: }
|