I'm just starting to learn how to use EJBs and ran into the following problem.
If I create a stateful session bean in a client and keep that client running overnight before accessing the stateful session bean. I receive the following error:
Could not activate; failed to restore state;
Obviously, JBoss has destroyed the object while the client still has a reference to the object. Is there a simple way to check in a client program if a home or remote interface still points to a valid bean?
// Get handle
Handle handle = yourBean.getHandle();
// Check handle