A ConnectionFactory adapter that returns the same Connection from all CreateConnection() calls, and ignores calls to Connection.Close(). According to the JMS Connection model, this is perfectly thread-safe. The shared Connection can be automatically recovered in case of an Exception.
For a list of all members of this type, see SingleConnectionFactory Members .
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
You can either pass in a specific Connection directly or let this factory lazily create a Connection via a given target ConnectionFactory.
Useful for testing and in applications when you want to keep using the same Connection for multiple EmsTemplate calls, without having a pooling ConnectionFactory underneath. This may span any number of transactions, even concurrently executing transactions.
Note that Spring's message listener containers support the use of a shared Connection within each listener container instance. Using SingleConnectionFactory with a MessageListenerContainer only really makes sense for sharing a single Connection across multiple listener containers.
Assembly: Spring.Messaging.Ems (in Spring.Messaging.Ems.dll)