This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bean Deleted Exception" Watch "Bean Deleted Exception" New topic

Bean Deleted Exception


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 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

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . 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.

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

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.
wood burning stoves
subject: Bean Deleted Exception
Similar Threads
My SCEA Part 1Study Notes
long post IBM.158
Page not refreshing dynamic content.
Page is refreshing continously on IE
EJBs in helper classes - can't figure out how to do it