From the course: Spring: Messaging with JMS
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Connection configuration using SingleConnectionFactory - Spring Tutorial
From the course: Spring: Messaging with JMS
Connection configuration using SingleConnectionFactory
- [Instructor] Now let's look at configuring Spring's JMS Connections using Spring's SingleConnectionFactory and talk briefly about the reasons for use and what this offers. So the Javadoc on Spring's SingleConnectionFactory says a JMS ConnectionFactory adapter that returns the same connection from all create connection calls and it ignores calls to the close Connection.close according to the JMS connection model. This is perfectly thread-safe in contrast to example JDBC connections. The shared connection can be automatically recovered in case of an exception. So this can be done by setting the ReconnectedOnException to true. This is useful when needing to connect to multiple different MOMs which means supplying multiple connection factories and in turn would require multiple JmsTemplates to be configured. SingleConnectionFactory in combination only really makes sense for sharing a single JMS connection across multiple JMS listeners. This is not useful when messaging load increases…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Connection configuration practices with application properties4m 41s
-
(Locked)
Connection configuration using SingleConnectionFactory6m 8s
-
(Locked)
Connection configuration using CachedConnectionFactory2m 24s
-
(Locked)
Transaction management with Spring JMS (transactions)4m 24s
-
(Locked)
Transaction management with dead letter queue7m 7s
-
(Locked)
-
-