use of org.springframework.jms.core.JmsTemplate in project opennms by OpenNMS.
the class JmsNorthbounder method afterPropertiesSet.
/* (non-Javadoc)
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
@Override
public void afterPropertiesSet() throws Exception {
BeanUtils.assertAutowiring(this);
LOG.debug("creating new JmsTemplate with connection to {}", m_jmsDestination.getJmsDestination());
m_template = new JmsTemplate(m_jmsNorthbounderConnectionFactory);
if (m_jmsDestination.getDestinationType().equals(DestinationType.TOPIC)) {
m_template.setPubSubDomain(true);
}
setNaglesDelay(m_config.getNaglesDelay());
setMaxBatchSize(m_config.getBatchSize());
setMaxPreservedAlarms(m_config.getQueueSize());
}
use of org.springframework.jms.core.JmsTemplate in project opennms by OpenNMS.
the class JmsNorthBounderTest method startBroker.
/**
* Start broker.
*
* @throws InterruptedException the interrupted exception
*/
@Before
public void startBroker() throws InterruptedException {
MockLogAppender.setupLogging();
// this spawns an embedded broker
m_template = new JmsTemplate(m_jmsNorthbounderConnectionFactory);
m_template.setReceiveTimeout(100L);
}
use of org.springframework.jms.core.JmsTemplate in project opennms by OpenNMS.
the class AppConfig method jmsTemplate.
@Bean(name = "JmsTemplate")
public JmsTemplate jmsTemplate() {
JmsTemplate jmsTemplate = new JmsTemplate(connectionFactory());
jmsTemplate.setDeliveryPersistent(false);
jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
jmsTemplate.setExplicitQosEnabled(true);
jmsTemplate.setTimeToLive(120000);
return jmsTemplate;
}
use of org.springframework.jms.core.JmsTemplate in project av-service by dvoraka.
the class JmsServerConfig method fileServerJmsTemplate.
@Bean
public JmsTemplate fileServerJmsTemplate(ConnectionFactory serverConnectionFactory, MessageConverter fileServerMessageConverter) {
JmsTemplate template = new JmsTemplate(serverConnectionFactory);
template.setReceiveTimeout(receiveTimeout);
template.setMessageConverter(fileServerMessageConverter);
return template;
}
use of org.springframework.jms.core.JmsTemplate in project av-service by dvoraka.
the class JmsBridgeOutputConfig method outJmsTemplate.
@Bean
public JmsTemplate outJmsTemplate(ConnectionFactory outConnectionFactory, MessageConverter outMessageConverter) {
JmsTemplate template = new JmsTemplate(outConnectionFactory);
template.setReceiveTimeout(receiveTimeout);
template.setMessageConverter(outMessageConverter);
return template;
}
Aggregations