PQ89520: HAVING SYSTEM PROPERTY WHICH CAN BE SET SO THAT THE EJBCREATE() WILL NOT DEFER THE CREATION OF THE BEAN UNTIL EJBPOSTCREATE()

 Fixes are available

5.1.1.1: WebSphere Application Server Express 5.1.1 Cumulative Fix 1
5.0.2.7: WebSphere Application Server Express 5.0.2 Cumulative Fix 7
5.0.2.12: WebSphere Application Server 5.0.2 Cumulative Fix 12
5.1.1.6: WebSphere Application Server Version 5.1.1 Cumulative Fix 6
5.0.2.13: WebSphere Application Server 5.0.2 Cumulative Fix 13
5.1.1.7: WebSphere Application Server Version 5.1.1 Cumulative Fix 7
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for AIX
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Solaris
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for HP-UX
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Windows
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Linux
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for AIX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Windows
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Solaris
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for HP-UX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Linux
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Windows
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Solaris
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for AIX
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Linux
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for HP-UX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for HP-UX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for AIX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Solaris
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Windows
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Linux
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for AIX
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for HP-UX
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Linux
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Windows
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Solaris
5.0.2.8: WebSphere Application Server V5.0.2 Cumulative Fix 8
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for HP-UX
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for AIX
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Solaris
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Windows
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Linux
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Windows
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Solaris
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for HP-UX
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Linux
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for AIX



APAR status
Closed as program error.

Error description
The APAR 
PQ65298 (Abstract: UPDATES TO CMP FIELDS MADE IN
EJBPOSTCREATE METHOD LOST AFTER A TRANSACTION COMMIT) WENT IN
WebSphere Application Server 4.0.6 and above. The APAR 
PQ65298
was put in place to allow "deferred creation" of the entity
bean after the ejbPostCreate was called. This was done to
increase performance and inline with the EJB Specification
guidelines.
.
Here is a quote from the specification (Section 9.4.2 ejbCreate,
ejbPostCreate):
  ...
  The container is responsible for creating the entity object's
  representation in the underlying database, extracting the
  primary key fields of the newly created entity object
  representation in the database, and for creating an entity
  EJBObject reference for the newly created entity object. The
  Container must establish the primary key before it invokes the
  ejbPostCreate(...) method. The container may create the
  representation of the entity in the database immediately after
  ejbCreate(...) returns, or it can defer it to a later time
  (for example to the time after the matching ejbPostCreate(...)
  has been called, or to the end of the transaction)."
  ...
.
Due to the limitation of EJB 1.0, customer had to create
related beans in the ejbPostCreate() and therefore the entity
insertion after ejbPostCreate() is preventing them from doing
so.
.
This APAR is opened to create a system property which can be set
so that the ejbCreate method will not defer creation of the bean
until the ejbPostCreate.
Local fix Problem summary
****************************************************************
* USERS AFFECTED: CMP1.1 Enterprise Java Bean (EJB)            *
*                 developers who rely on a record being        *
*                 created in the database when method          *
*                 ejbCreate exits.                             *
****************************************************************
* PROBLEM DESCRIPTION: An error message indicating:            *
*                      Integrity constraint or foreign key     *
*                      contraint violated. Parent key not      *
*                      found.                                  *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
By default, EJBContainer inserts a record in the database at
the end of ejbPostCreate. However, some EJB1.1 applications
which rely on a record being created in ejbCreate method and
then go on to create another record in ejbPostCreate, which
has a foreign  key dependency on the previous step, will get
'Integrity Contraints' violated message.
Problem conclusion
Although the Application Server is working as designed, it is
possible that legacy applications which rely on a certain
behaviour ofthe EJB container would need this fix to continue
working.
A JVM property "com.ibm.websphere.ejbcontainer.allowEarlyInsert"
when set to true allows creation of a record in ejbCreate.
Temporary fix
Gave customer cumulative 4.0.x fix to test.
Comments
APAR information
APAR number PQ89520
Reported component name WEBSPHERE AE NT
Reported component ID 5630A2201
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2004-05-28
Closed date 2004-07-01
Last modified date 2004-07-01

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
EJBCONTR          

SRLS

Fix information

Applicable component levels
R400 PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ89520
IBM Group: Software Group
Modified date: Jul 1, 2004