-
Caching "new InitialContext" (3 messages)
- Posted by: Kapil Israni
- Posted on: March 16 2002 21:53 EST
Is is advisable to cache the "new IniialConext()" object and then using this one cached object for looking up Home Objects and DataSource Objects across the entire application.Threaded Messages (3)
- Caching "new InitialContext" by Darren Abbruzzese on March 18 2002 06:34 EST
- Caching "new InitialContext" by Ravi Madireddy on March 22 2002 17:31 EST
- Caching "new InitialContext" by Darren Abbruzzese on March 25 2002 10:59 EST
- Caching "new InitialContext" by Ravi Madireddy on March 22 2002 17:31 EST
-
Caching "new InitialContext"[ Go to top ]
- Posted by: Darren Abbruzzese
- Posted on: March 18 2002 06:34 EST
- in response to Kapil Israni
Yep, I do it and it works well. Getting a new InitialContext each time would be fairly expensive. -
Caching "new InitialContext"[ Go to top ]
- Posted by: Ravi Madireddy
- Posted on: March 22 2002 17:31 EST
- in response to Darren Abbruzzese
A followup question: How does it work in a clustered environment?
Thanks,
Ravi -
Caching "new InitialContext"[ Go to top ]
- Posted by: Darren Abbruzzese
- Posted on: March 25 2002 10:59 EST
- in response to Ravi Madireddy
Using a cached InitialContext within a clustered environment would rely on how your app server works. I have been using WebLogic and it allows you to specify the DNS name of your cluster when you create a Context, so if one machine goes down your Context will still be able to access the JNDI tree's from other servers.