Wednesday, August 27, 2008

Look at this, pretty little exception:

javax.ejb.EJBException: See nested exception; nested exception is: Mayhem#MayhemEJB.jar#StatefulTimerBean Mayhem#MayhemEJB.jar#StatefulTimerBean at at at at at at at

So, HomeDisabled, eh? I thought version 3.0 EJBs didn't have Homes? Well, I guess it's up to the container whether they do or not - it's really not my business, because I'm not using them.

So, what's the solution to this problem? Well, in this case, my bean SFSB was passivated, likely removed from the server when I "Cleaned the WebSphere Application Server in IRAD" and then, when I invoked it again, the bean was gone, nowhere to be found, as it was likely not just passivated, but completely removed from the container.

So, I guess when you invoke a Stateful Session Bean, you must be careful that it doesn't timeout, catch the EJB exception, and look it up again if it is expired or timed out. Does that sound right?

No comments: