Interpreting exceptions that include EJB container errors
 Forum/discussion group
 
Abstract
The EJB container provides the run-time services needed to deploy and manage EJB components, known as enterprise beans. It is a subcomponent within the application server process that handles requests for session beans, entity beans, and message-driven beans. The enterprise beans (inside EJB modules) installed in an application server do not communicate directly with the server; instead, an EJB container provides an interface between the enterprise beans and the server. Together, the container and the server provide the EJB run-time environment. The container provides many low-level services, including threading and transaction support.
 
 
Content
Virtually all application EJB method calls are routed through the EJB container. Therefore, EJB container code is frequently in the stack trace from application code exceptions. The container reports these exceptions, even when the cause is not in the EJB container.

Examples of exceptions that could be misinterpreted as EJB container problems:

BeanNotReentrantException
Caused by application client code, typically a servlet or Java™ ServerPages™ (JSP™), attempting to call the same stateful SessionBean from two different client threads.

Examples:
  • When the application stores the reference to the stateful session bean in a static variable.
  • The application uses a JSP variable to refer to the stateful SessionBean reference.
  • The application stores the stateful SessionBean reference in the Hypertext Transfer Protocol (HTTP) session object. Then it has the client browser issue a new request to the servlet or JSP before the previous request has completed.

CSITransactionRolledbackException/TransactionRolledbackException
This exception has several potential causes:
  • The application code may be throwing an exception that was not declared as part of the method signature for that EJB. In this case, the EJB container is required to roll back the transaction. Common causes of this situation are where the application code throws a NullPointerException, ArrayIndexOutOfBoundsException, or other Java™ runtimeexception, or where a bean-managed persistence (BMP) bean encounters a Java Database Connectivity (JDBC) error.
  • A transaction may be attempting to do additional work after being placed in a Marked Rollback, RollingBack, or RolledBack state. Transactions cannot continue to do work after they are set to one of these states.
  • A transaction may fail on commit due to "dangling work".
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > EJB Container
Operating system(s): z/OS
Software version: 6.1
Software edition:
Reference #: 7008490
IBM Group: Software Group
Modified date: Sep 14, 2006