Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Are messages thread-safe?

Messages thread-safe
0
Posted

Are messages thread-safe?

0

Location: http://www.jguru.com/faq/view.jsp?EID=1120 Created: Nov 17, 1999 Modified: 1999-12-01 14:58:10.967 Author: Jerry Smith (http://www.jguru.com/guru/viewbio.jsp?EID=9) If the JMS specification required a thread-safe implementation for all objects, it would, in many situations, be a burden on programmers. The following objects support concurrent use: • Destination • ConnectionFactory • Connection Session, on the other hand, is a single-threaded context that handles message-passing operations. A session serves as a message factory and it processes messages in serial order. One reason for the single-thread design is that a session is responsible for transaction-related operations. Sessions are single-threaded contexts because a session is where the action is. In particular, a session is responsible for operations such as transaction handling and asynchronous message passing. Requiring client code that’s related to asynchronous message reception to support concurrent use would have

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123