• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

When is it acceptable to cache remote references on the client(servlet)?  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When, if at all, is it acceptable to cache ejb remote references on the client(servlet engine)? I'm thinking mainly about stateless session beans because entity beans which are behind a facade would not have references exposed to the client anyway.
If the answer to this is long then a reference to the info would be great!
Thanks!
Jim
I guess the same question would apply to inter-entity bean references.
 
Bartender
Posts: 19816
93
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can pretty much always cache the Home interface. The only penalty is that if the EJB is hot-deployed, you won't be getting the updated EJB.
As for long-term holding on EJBs themselves, doing so deprives them of the benefits of caching and similar performance-enhancing mechanisms, so you should make sure that what you gain is going to me more than what you lose.
 
Jim Clayson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Ok I see what you're saying. But how does a remote ejb server know there is a home reference being cached in a remote servlet engine? i.e. How does it know a home refrence is still being referenced?
Is this an rmi thing?
Cheers
Jim
 
Tim Holloway
Bartender
Posts: 19816
93
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't. I'm talking about having the client do the caching. If you need hot updates to the cache, the client is going to hafe to be provided with a mechanism that lets it know that the cache is stale.
In the most common case, the "client" is the web app, and so you can put an extra admin page into the web app to set a flag. For a case where you're talking caching on a REMOTE client, the same general principle applies, but, naturally, there'd be more overhead.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!