/** * Factory method to create a new connection factory from the given * environment */ protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; }
/** * Factory method to create a new connection factory from the given * environment */ @Override protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; } }
/** * Factory method to create a new connection factory from the given * environment */ @Override protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; } }
/** * Factory method to create a new connection factory from the given * environment */ protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; }
/** * Factory method to create a new connection factory from the given * environment */ protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; }
/** * Factory method to create a new connection factory from the given * environment */ protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; }
/** * Factory method to create a new connection factory from the given * environment */ @Override protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; } }
/** * Factory method to create a new connection factory from the given * environment */ protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; }
/** * Factory method to create a new connection factory from the given * environment */ @Override protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException { ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXASslConnectionFactory() : new ActiveMQSslConnectionFactory(); Properties properties = new Properties(); properties.putAll(environment); answer.setProperties(properties); return answer; } }
public ConnectionFactory create(ActiveMQConnectionFactoryConfiguration configuration) throws ConnectionFactoryCreationException { ConnectionFactoryType type = configuration.getType(); switch (type) { case XA: ActiveMQXAConnectionFactory xaFactory = new ActiveMQXAConnectionFactory(getUri(configuration)); xaFactory.setProperties(configuration.getFactoryProperties()); return xaFactory; default: // default to local pooled ActiveMQConnectionFactory wrapped = new ActiveMQConnectionFactory(getUri(configuration)); wrapped.setProperties(configuration.getFactoryProperties()); return new PooledConnectionFactory(wrapped); } }
public ConnectionFactory create(ConnectionFactoryConfiguration configuration) throws Fabric3Exception { ConnectionFactoryType type = configuration.getType(); String clientId = configuration.getClientId(); switch (type) { case XA: ActiveMQXAConnectionFactory xaFactory = new ActiveMQXAConnectionFactory(getUri(configuration)); xaFactory.setProperties(configuration.getFactoryProperties()); xaFactory.setUserName(configuration.getUsername()); xaFactory.setPassword(configuration.getPassword()); if (clientId != null) { // since a client id is specified (possibly for a durable subscription), create a singleton connection so the connection id is unique setClientId(clientId, xaFactory); return new XaSingletonConnectionFactory(xaFactory, monitor); } return xaFactory; default: // default to local pooled ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(getUri(configuration)); factory.setProperties(configuration.getFactoryProperties()); factory.setUserName(configuration.getUsername()); factory.setPassword(configuration.getPassword()); if (clientId != null) { // since a client id is specified (possibly for a durable subscription), create a singleton connection so the connection id is unique setClientId(clientId, factory); return new SingletonConnectionFactory(factory, monitor); } return factory; } }