Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

ServiceLocator in PetStore

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am browsing Pet Store 1.3.1 from Sun.
Any body can give me a reason why they use one service locator for web tier and the other for Business/EJB tier. The only difference I noticed is the web tier service locator "cache" the references.
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using Apache/Tomcat will your web container be in a different JVM than your EJB container? Perhaps they will even be on different machines.
 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rufus:
Let me summarize your explaination in my words. Let me know if I've got your point.
Web server could be in a differnt machine which makes JNDI lookups in the remote EJB container performancewise costly.
My question again will be, can I also use the cashing idea on the EJB tier? Remember even JNDI lookups in the same VM is time-consuming.
[ October 05, 2002: Message edited by: Edy Yu ]
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic