File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Is javax.naming.InitialContext ThreadSafe? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Is javax.naming.InitialContext ThreadSafe?" Watch "Is javax.naming.InitialContext ThreadSafe?" New topic

Is javax.naming.InitialContext ThreadSafe?

Debopam Poddar
Ranch Hand

Joined: Jun 21, 2005
Posts: 51

Currently I am use following code to lookup EJB3 sateless session beans for normal POJO class. (We are in JEE5 so we can not inject Stateless Session Beans in normal POJO class I have to use look up)

So is Context object is ThredSafe? should I create Context object for each call [as shown in this code snippet] or I can reuse the Context for all threads?
I agree. Here's the link:
subject: Is javax.naming.InitialContext ThreadSafe?
It's not a secret anymore!