• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

service locator pattern

 
Raj Joe
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am caching ejb local objects (stateless session beans)in the service locator in the class level static hashmap variable.

Will there be any impact of this caching in clustered environment?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess if you're using only local references, no remote, you weren't getting any benefit from load balancing across the cluster in the first place. Is that right? If so, caching them should do no harm. We used to cache remote (before local existed) and had trouble recovering from stale instances - say the remote server had been stopped and restarted since you got the reference. You might want to try the EJB forum (top of the list!) to get the real EJB experts involved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic