Hi all,
I am using Session Facade. I have a Stateless Session Bean for each CMP. My question is every time I want to perform any database actions Session Bean gets the initial context and does a JNDI lookup for CMP beans. Is this correct? Is there any method to avoid getting initial context and JNDI lookup every time? Can I have local interfaces for CMP beans? I have read about Service Locator design pattern. Does this help in reducing the look up time? Please let me know
Thanks in advance
Prasanna
-
Session Facade (3 messages)
- Posted by: Prasanna K
- Posted on: February 19 2004 08:50 EST
Threaded Messages (3)
- Session Facade by stephen smithstone on February 19 2004 09:27 EST
- Session Facade by David Jones on February 19 2004 13:40 EST
- Session Facade by Prasanna K on February 26 2004 02:30 EST
- Session Facade by David Jones on February 19 2004 13:40 EST
-
Session Facade[ Go to top ]
- Posted by: stephen smithstone
- Posted on: February 19 2004 09:27 EST
- in response to Prasanna K
If your slsb and CMP beans are located in side the same jar/ear file then yes you can use locale interfaces
> Hi all,
> I am using Session Facade. I have a Stateless Session Bean for each CMP. My question is every time I want to perform any database actions Session Bean gets the initial context and does a JNDI lookup for CMP beans. Is this correct? Is there any method to avoid getting initial context and JNDI lookup every time? Can I have local interfaces for CMP beans? I have read about Service Locator design pattern. Does this help in reducing the look up time? Please let me know
>
> Thanks in advance
> Prasanna -
Session Facade[ Go to top ]
- Posted by: David Jones
- Posted on: February 19 2004 13:40 EST
- in response to stephen smithstone
Service Locator is a good pattern for caching home interfaces. Local interfaces only help with the performance of calling of EJB methods and not with the cost of a JNDI lookup. -
Session Facade[ Go to top ]
- Posted by: Prasanna K
- Posted on: February 26 2004 02:30 EST
- in response to David Jones
Does Service Locator pattern handle situations like Server restart? If you provide a Sample implementation of Service Locator pattern it will be great!!
Thanks
Prasanna