A AbstractPlatformTransactionManager implementation for a single NMS
ConnectionFactory. Binds a Connection/Session pair from the specified ConnecctionFactory to the thread, potentially allowing for one thread-bound Session per ConnectionFactory.
For a list of all members of this type, see NmsTransactionManager 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.
The use of CachingConnectionFactoryas a target for this transaction manager is strongly recommended. CachingConnectionFactory uses a single NMS Connection for all NMS access in order to avoid the overhead of repeated Connection creation, as well as maintaining a cache of Sessions. Each transaction will then share the same NMS Connection, while still using its own individual NMS Session.
The use of a raw target ConnectionFactory would not only be inefficient because of the lack of resource reuse. It might also lead to strange effects when your NMS provider doesn't accept
Session.commit(), with the latter supposed to commit all the messages that have been sent through the producer handle and received through the consumer handle. As a safe general solution, always pass in a CachingConnectionFactory into this transaction manager's ConnectionFactory property.
Transaction synchronization is turned off by default, as this manager might be used alongside an IDbProvider based Spring transaction manager such as the AdoPlatformTransactionManager, which has stronger needs for synchronization.
Assembly: Spring.Messaging.Nms (in Spring.Messaging.Nms.dll)