URGENT: Bean has been deleted
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, May 22, 2001 08:28 AM

Hi,


I have deployed my stateful EJB auf WebLogic 5.1.
Normally the EJB runs very well.
But if I try to access the EJB after a long time (for instance
2 hours), following error message is shown:

java.rmi.NoSuchObjectException: Bean has been deleted

Any advice?
Thanks very much for any help.

Lijun

Re: URGENT: Bean has been deleted

Posted By:   Anonymous  
Posted On:   Thursday, June 28, 2001 02:42 PM

The web component which access the session bean have the EJBObject reference of the bean,
So get the handle by using the method:

Handle handle = EJBObject.getHandle();

which returns the handle reference.

Store this in the Session object of the web component you use and increase the session timeout interval of the session object by using the
session.setAttribute("handle",handle);
session.setMaxInactiveInterval(int interval)

When the client returns get the handle object from the session and then get reference of the EJBObject from the handle by using the method

handle = session.getAttribute("handle");
EJBObject = handle.getEJBObject();

and then you can access the bean again

Hope this helps


Pavan Raviprolu
About | Sitemap | Contact