File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Bean Deleted Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bean Deleted Exception" Watch "Bean Deleted Exception" New topic
Author

Bean Deleted Exception

Preetham
Greenhorn

Joined: May 21, 2001
Posts: 7
Hi All,
My problem originates when an exception is generated after performing an SQL transaction. When i query the DB and pick up a value which can be null from the DB and perform some operation on the value, if the value returned is null...an exception is generated. This is done in the Bean, and the exception is caught in the Servlet. I throw an error page but after i come back to the home and perform any other operation from the home page or any other page a bean deleted exception is generated. I am using a stateful session bean where the functions are present and the servlets call these functions. I think the problem is because the link to the handle of this stateful bean is lost, why does that happen if an exception occurs and how can it be avoided.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"Preetham",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Steve Snodgrass
Greenhorn

Joined: Jun 12, 2001
Posts: 27
Throwing a Runtime exception from a Stateful Session EJB will delete that instance of the EJB per the Specification. In our application, we always explicitly check for NULL (using == or resultSet.wasNull() method depending on circumstance) before performing operations on Objects retreived from the Result Set.
 
 
subject: Bean Deleted Exception