Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a question about service locator  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
while I were stydying the service locator pattern, I encountered the following methd :

what this method do ?
when we want to use the service locator pattern , we write some thing like:
BeanHome = (BeanHome).ServiceLocator.getInstance( ).getHome("..", BeanHome.class);
and there is also method called :
protected String getId(EJBObject) throws ...
also, what this method do ?
(I am novice at patterns, ok).
thanks.
 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Please refer the following URL. http://javaoneonline.mentorware.net/mw/subsystems/2000/system/docs/J2EEBestPractices_webinar.pdf

This will give u a clear idea about Service Locators.

Regards,
Saj
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Service Locator pattern basically used improving the application performance by minimising the number for JNDI lookup calls. From a servlet if you are calling n number of EJB's in the same EJB container, you have to do the n-number of JNDI lookups. To avoid that we are providing a wrapper(as Service Locator) to lookup up the jndi.

Regards,
M.S.Raman
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
actually I know the service locator pattern, but I don't understand the the getService( ) method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!