本文整理了Java中org.apache.activemq.ActiveMQConnectionFactory.setPassword()
方法的一些代码示例,展示了ActiveMQConnectionFactory.setPassword()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActiveMQConnectionFactory.setPassword()
方法的具体详情如下:
包路径:org.apache.activemq.ActiveMQConnectionFactory
类名称:ActiveMQConnectionFactory
方法名:setPassword
[英]Sets the JMS password used for connections created from this factory
[中]设置用于从此工厂创建的连接的JMS密码
代码示例来源:origin: apache/activemq
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL.toString());
}
代码示例来源:origin: apache/activemq
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL);
}
代码示例来源:origin: org.apache.activemq/activemq-client
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL.toString());
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL.toString());
}
代码示例来源:origin: pierre/meteo
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL.toString());
}
代码示例来源:origin: org.apache.activemq/activemq-all
public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL.toString());
}
代码示例来源:origin: org.apache.activemq/activemq-client
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL);
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL);
}
代码示例来源:origin: pierre/meteo
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL);
}
代码示例来源:origin: org.apache.activemq/activemq-all
public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
setUserName(userName);
setPassword(password);
setBrokerURL(brokerURL);
}
代码示例来源:origin: org.owasp.appsensor/appsensor-activemq-core
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();
}
代码示例来源:origin: io.fabric8/process-spring-boot-starter-activemq
@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;
}
代码示例来源:origin: com.github.hqstevenson.splunk/splunk.jms.activemq
@Override
protected ConnectionFactory createConnectionFactory() {
ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(brokerURL);
answer.setUserName(userName);
answer.setPassword(password);
configureRedelivery(answer);
return answer;
}
代码示例来源:origin: info.kwarc.sally4/sally4-activemq
@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);
}
代码示例来源:origin: trellis-ldp/trellis
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;
}
代码示例来源:origin: info.kwarc.sally4/sally4-docmanager
@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);
}
}
代码示例来源:origin: tumao2/hdw-dubbo
@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;
}
代码示例来源:origin: trellis-ldp/trellis
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();
}
}
代码示例来源:origin: com.cognifide.aet/communication
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();
}
代码示例来源:origin: apache/activemq-artemis
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;
}
内容来源于网络,如有侵权,请联系作者删除!