Multi-threading

Not all objects and methods in JMS support concurrent access by multiple client threads. Destinations, connections, and connection factories support concurrent access whereas sessions, producers, and consumers don't support concurrent access.

One main reason for sessions not supporting concurrent access is that sessions may support transactions, and multiple threads sending and receiving messages over transacted sessions can over-complicate things. The same explanation holds true for consumers and producers since they are created by sessions. The provider always serializes message delivery to all the consumers associated with a session set up for asynchronous operation.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net