EJB container behavior differences from V4 to V5
 Technote (troubleshooting)
 
Problem(Abstract)
What are the differences in behavior of the Enterprise JavaBeans™ (EJB™) container from releases of WebSphere® Application Server Version 4 to releases of Version 5?
 
Cause
The following is a typical flow in a container-managed persistence (CMP) entity bean application:

 
Resolving the problem
The EJB 1.1 specification did not require that data changed in an entity bean be flushed before a finder method runs against the entity bean. Therefore, in WebSphere Application Server V4 and V5, when EJB 1.1 entity beans are used, entity bean data is not persisted to the database until the transaction is committed.

The EJB 2.0 specification, section 10.5.3 Container's view, however, states the following:

The Container is responsible for ensuring that updates to the states of all entity beans in the same transaction context as the ejbFind<METHOD> method are visible in the results of the ejbFind<METHOD> method. Before invoking the ejbFind<METHOD>(...) method,  the container must therefore first synchronize the state of any entity bean instances that are participating in the same transaction context as is used to execute the ejbFind<METHOD>(...) by invoking the ejbStore() method on those entity bean instances.

Therefore, in WebSphere Application Server V5, when EJB 2.0 entity beans are used, the pre-find flush mechanism is used, and entity bean data is persisted to the database just before a finder method is run.

 
 
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): Windows
Software version: 5.0
Software edition:
Reference #: 1164081
IBM Group: Software Group
Modified date: Mar 24, 2004