This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
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.