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 first published in March 2002

Dig deeper on SOA security tools

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close