Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Caching EJB Homes references

 
Rahul JG
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One problem with caching and reusing EJB homes involves handling stale cached homes.
If a client caches an EJB home and the container shuts down and then returns, the client´┐Żs
cached value is stale and will not work, resulting in a CORBA exception.
Is there any strategy wherein one could check whether the cached EJB Home reference is
stale?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is really dependent on your Application Server. Many Application Servers implement the Home stubs in such a way that they can survive server crashes, restarts, and hot redeployments. Furthermore, Home stubs are typically implemented in a cluster-aware fashion so that a Home stub is also not tied to a single node if you are running in a clustered environment.
Again this is highly dependent on your Application Server, check there first.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic