Q

Which of the following objects are safe to cache and are thread safe?

We're using JMS to send out e-mail alerts. Can you tell me which of the following objects are safe to cache and...

are thread safe... Context QueueConnectionFactory Queue Connection QueueSender

All of them are thread-safe, except QueueSender. In summary, only the following JMS classes (and their subclasses) are thread-safe:

- ConnectionFactory
- Connection
- Destination

These are explicitly *not* thread safe:

- Session
- MessageProducer
- MessageConsumer


This was last published in March 2002

Dig Deeper on SOA security tools

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close