public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL.toString()); }
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL); }
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL.toString()); }
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL.toString()); }
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL.toString()); }
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL.toString()); }
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL); }
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL); }
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL); }
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) { setUserName(userName); setPassword(password); setBrokerURL(brokerURL); }
public static Connection createConnection(Environment environment) throws JMSException { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); factory.setBrokerURL(environment.getProperty(ACTIVEMQ_BROKER_URL_ENV_VAR_NAME)); factory.setUserName(environment.getProperty(ACTIVEMQ_USERNAME_ENV_VAR_NAME)); factory.setPassword(environment.getProperty(ACTIVEMQ_PASSWORD_ENV_VAR_NAME)); return factory.createConnection(); }
@Bean ConnectionFactory pooledConnectionFactory() { ActiveMQConnectionFactory amqConnectionFactory = new ActiveMQConnectionFactory(resolveBrokerUrl()); if(!brokerUsername.isEmpty()) { amqConnectionFactory.setUserName(brokerUsername); } if(!brokerPassword.isEmpty()) { amqConnectionFactory.setPassword(brokerPassword); } PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory(); pooledConnectionFactory.setConnectionFactory(amqConnectionFactory); return pooledConnectionFactory; }
@Override protected ConnectionFactory createConnectionFactory() { ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(brokerURL); answer.setUserName(userName); answer.setPassword(password); configureRedelivery(answer); return answer; }
@Override public org.apache.camel.Component createActiveMQConnection(String broker, String user, String password) { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(broker); connectionFactory.setUserName(user); connectionFactory.setPassword(password); return JmsComponent.jmsComponent(connectionFactory); }
public static ActiveMQConnectionFactory getJmsFactory(final NotificationsConfiguration config) { final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory( config.getConnectionString()); if (config.any().containsKey(PW_KEY) && config.any().containsKey(UN_KEY)) { factory.setUserName(config.any().get(UN_KEY)); factory.setPassword(config.any().get(PW_KEY)); } return factory; }
@Override public org.apache.camel.Component createActiveMQConnection(String broker, String user, String password) { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(broker); connectionFactory.setUserName(user); connectionFactory.setPassword(password); return JmsComponent.jmsComponent(connectionFactory); } }
@Bean public CachingConnectionFactory cachingConnectionFactory() { ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(brokerUrl); activeMQConnectionFactory.setUserName(username); activeMQConnectionFactory.setPassword(password); CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(activeMQConnectionFactory); cachingConnectionFactory.setCacheConsumers(true); cachingConnectionFactory.setCacheProducers(true); cachingConnectionFactory.setSessionCacheSize(100); return cachingConnectionFactory; }
private static Connection buildJmsConnection(final Configuration config) throws JMSException { final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory( config.get(CONFIG_JMS_URL)); if (nonNull(config.get(CONFIG_JMS_USERNAME)) && nonNull(config.get(CONFIG_JMS_PASSWORD))) { factory.setUserName(config.get(CONFIG_JMS_USERNAME)); factory.setPassword(config.get(CONFIG_JMS_PASSWORD)); } return factory.createConnection(); } }
public void connect() throws JMSException { LOG.info("Connecting to broker {} on user {}", config.url(), config.username()); final ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(config.url()); connectionFactory.setUserName(config.username()); connectionFactory.setPassword(config.password()); connectionFactory.setTrustAllPackages(true); connection = connectionFactory.createConnection(); connection.start(); }
private org.apache.activemq.ActiveMQConnectionFactory getOpenWireConnectionFactory(String user, String password) { org.apache.activemq.ActiveMQConnectionFactory activeMQConnectionFactory = new org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:61616"); activeMQConnectionFactory.setUserName(user); activeMQConnectionFactory.setPassword(password); return activeMQConnectionFactory; }