SingleConnectionFactory subclass that adds Session, MessageProducer, and MessageConsumer caching. This ConnectionFactory also switches the ReconnectOnException property to true by default, allowing for automatic recovery of the underlying Connection.
For a list of all members of this type, see CachingConnectionFactory 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.
NOTE: This ConnectionFactory requires explicit closing of all Sessions obtained from its shared Connection. This is the usual recommendation for native EMS access code anyway. However, with this ConnectionFactory, its use is mandatory in order to actually allow for Session reuse.
Note also that MessageConsumers obtained from a cached Session won't get closed until the Session will eventually be removed from the pool. This may lead to semantic side effects in some cases. For a durable subscriber, the logical
Session.Close()call will also close the subscription. Re-registering a durable consumer for the same subscription on the same Session handle is not supported; close and reobtain a cached Session first.
Assembly: Spring.Messaging.Ems (in Spring.Messaging.Ems.dll)