Example usage for org.springframework.jms.core JmsTemplate setConnectionFactory

List of usage examples for org.springframework.jms.core JmsTemplate setConnectionFactory

Introduction

In this page you can find the example usage for org.springframework.jms.core JmsTemplate setConnectionFactory.

Prototype

public void setConnectionFactory(@Nullable ConnectionFactory connectionFactory) 

Source Link

Document

Set the ConnectionFactory to use for obtaining JMS Connection Connections .

Usage

From source file:com.alliander.osgp.adapter.protocol.oslp.application.config.MessagingConfig.java

@Bean
public JmsTemplate signingServerRequestsJmsTemplate() {
    final JmsTemplate jmsTemplate = new JmsTemplate();
    jmsTemplate.setDefaultDestination(this.signingServerRequestsQueue());
    // Enable the use of deliveryMode, priority, and timeToLive
    jmsTemplate.setExplicitQosEnabled(Boolean.parseBoolean(this.environment
            .getRequiredProperty(PROPERTY_NAME_JMS_SIGNING_SERVER_REQUESTS_EXPLICIT_QOS_ENABLED)));
    jmsTemplate.setTimeToLive(Long.parseLong(
            this.environment.getRequiredProperty(PROPERTY_NAME_JMS_SIGNING_SERVER_REQUESTS_TIME_TO_LIVE)));
    jmsTemplate.setDeliveryPersistent(Boolean.parseBoolean(this.environment
            .getRequiredProperty(PROPERTY_NAME_JMS_SIGNING_SERVER_REQUESTS_DELIVERY_PERSISTENT)));
    jmsTemplate.setConnectionFactory(this.pooledConnectionFactory());
    jmsTemplate.setReceiveTimeout(Long.parseLong(
            this.environment.getRequiredProperty(PROPERTY_NAME_JMS_SIGNING_SERVER_REQUESTS_RECEIVE_TIMEOUT)));
    return jmsTemplate;
}