Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to cache home objects?  RSS feed

 
Dez Max
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to avoid JNDI look up everytime i want to invoke my business methods. So i thought of caching home objects. Is it possible to do so?
how to do it?
regs
Fred
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, caching home objects is okay and is a great way to reduce the number of remote lookups that you do. Check out the "service locator" pattern if you want a generic way in which to apply this concept to other remotely available resources too (such as datasources, JMS queues, etc).
BTW, could you just take a quick look at the naming policy and edit your profile.
Also, only members with valid names will be eligible for the book giveaways.
Thanks
Simon
Bartender (moderator) of "J2EE and EJB" forum
[ December 13, 2002: Message edited by: Simon Brown ]
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fred,
Maybe this article could help.
You can also take a look at the EJBHomeFactory Patter in Floyd's book here
[ December 13, 2002: Message edited by: Bill Bailey ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!