Reputation: 139
I am new to Spring boot and i am trying to lookup my own connection factory instead of using the default 'ConnectionFactory' which Spring boot provides and also trying to lookup the already defined queue without using dynamicqueues.
How can i do that? Should i add jndi.properties file and add it there so i can lookup?
Can someone suggest?
Upvotes: 1
Views: 4199
Reputation: 3913
The Spring Integration configuration by default is looking for a Spring Bean called ‘connectionFactory’.
Spring Boot by default, creates the JMS connection factory using the name ‘jmsConnectionFactory’.
@Bean
public ConnectionFactory jmsConnectionFactory() {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost");
return connectionFactory;
}
Upvotes: 1