• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bean Deleted Exception

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic