本文整理汇总了Java中org.apache.activemq.jms.pool.PooledConnectionFactory类的典型用法代码示例。如果您正苦于以下问题:Java PooledConnectionFactory类的具体用法?Java PooledConnectionFactory怎么用?Java PooledConnectionFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PooledConnectionFactory类属于org.apache.activemq.jms.pool包,在下文中一共展示了PooledConnectionFactory类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createPooledConnectionFactory
import org.apache.activemq.jms.pool.PooledConnectionFactory; //导入依赖的package包/类
public static PooledConnectionFactory createPooledConnectionFactory() {
ConnectionFactory cf = createConnectionFactory(null, null);
PooledConnectionFactory pooled = new PooledConnectionFactory();
pooled.setConnectionFactory(cf);
pooled.setMaxConnections(8);
return pooled;
}
开发者ID:eXcellme,项目名称:eds,代码行数:8,代码来源:CamelJmsTestHelper.java
示例2: jmsConnectionFactory
import org.apache.activemq.jms.pool.PooledConnectionFactory; //导入依赖的package包/类
@Bean
ConnectionFactory jmsConnectionFactory() {
if (this.config.isPooled()) {
PooledConnectionFactory pool = new PooledConnectionFactory();
pool.setConnectionFactory(new ActiveMQConnectionFactory(this.config.getBrokerURL()));
return pool;
} else {
return new ActiveMQConnectionFactory(this.config.getBrokerURL());
}
}
开发者ID:techysoul,项目名称:java,代码行数:11,代码来源:TradesGenerator.java
示例3: init
import org.apache.activemq.jms.pool.PooledConnectionFactory; //导入依赖的package包/类
private void init() {
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();
activeMQConnectionFactory.setBrokerURL(brokerConfiguration.getBrokerURL());
activeMQConnectionFactory.setUserName(brokerConfiguration.getUsername());
activeMQConnectionFactory.setPassword(brokerConfiguration.getPassword());
pooledConnectionFactory = new PooledConnectionFactory();
pooledConnectionFactory.setConnectionFactory(activeMQConnectionFactory);
pooledConnectionFactory.setMaxConnections(brokerConfiguration.getMaxConnections());
pooledConnectionFactory.setMaximumActiveSessionPerConnection(brokerConfiguration.getMaximumActiveSessionPerConnection());
pooledConnectionFactory.initConnectionsPool();
}
开发者ID:garethahealy,项目名称:jboss-fuse-examples,代码行数:14,代码来源:PooledAmqConnectionFactoryResolver.java
示例4: jmsConnectionFactory
import org.apache.activemq.jms.pool.PooledConnectionFactory; //导入依赖的package包/类
@Bean
ConnectionFactory jmsConnectionFactory() {
PooledConnectionFactory pool = new PooledConnectionFactory();
pool.setConnectionFactory(new ActiveMQConnectionFactory("vm://localhost"));
return pool;
}
开发者ID:filipcynarski,项目名称:EMailSenderService,代码行数:7,代码来源:Application.java
注:本文中的org.apache.activemq.jms.pool.PooledConnectionFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论