Fix (APAR): PK53266 Status: Fix Release: 6.1.0.9,6.1.0.11 Operating System: AIX,HP-UX,i5/OS,Linux,Linux pSeries,Linux zSeries,OS/400,Solaris,Windows Supersedes Fixes: CMVC Defect: PK53266 Byte size of APAR: 30309 Date: 2007-10-04 Abstract: Using CMP 2.x Inheritance and the "Deferred Create" option, incorrect results can occur when retrieving a CMP bean within the bean's inheritance hierarchy. Description/symptom of problem: PK53266 resolves the following problem: ERROR DESCRIPTION: User has the following inheritance hierarchy: Entity Bean Bean2 "extends" Entity Bean Bean1, where "extends" in this case means the two ejbs (Bean2 and Bean1) are CMP 2.x Entity Bean where Bean2 is defined to inherit from Bean1. With this setup, the user is also using the "Deferred Create" (property com.ibm.ws.pm.deferredcreate=true)setting which means a newly created Entity Bean will not be inserted into the Database until the transaction in which it was created is committed. In one single transaction, the user creates a Bean2 instance with a Primary Key of X. On the ejb home for Bean1, the user then does a findByPrimaryKey using Primary Key X. This finder should return a Bean1 instance, however, a javax.ejb.ObjectNotFoundException results. LOCAL FIX: n/a PROBLEM SUMMARY USERS AFFECTED: Users of IBM WebSphere Application Server versions 6.0.2 and 6.1 using Container Managed Persistence (CMP) 2.x Inheritance. PROBLEM DESCRIPTION: Using CMP 2.x Inheritance and the "Deferred Create" option, incorrect results can occur when retrieving a CMP bean within the bean's inheritance hierarchy. RECOMMENDATION: None For this issue, the "Deferred Create" property is vital to understanding, and hitting, the issue. When deferred create is used, a newly created CMP Entity Bean will not be inserted into the Database until the transaction in which it was created is committed. When this option is used in conjuction with CMP 2.x Inheritance, when a CMP 2.x (child) bean is created, that child bean instance and its inherhierachy hierarchy (parent(s)) isn't created in the Database until transaction commit time. The instance only resides in memory. With this knowledge, the root problem can be explained, as follows: On a newly created child bean, when a user calls a findByPrimaryKey on the home object of a parent to the child bean instance, the parent should be returned by the nature of inheritance. However, an oversight in some Application Server code wasn't allowing the parent instance to be returned. If a user called a findByPrimaryKey on the child bean instance, the child bean could be found and returned correctly. In otherwords, incorrect results are returned when requesting a bean higher up in the child bean's inheritance hierarchy. This problem is not hit when deferred create isn't used. PROBLEM CONCLUSION: With this fix, when the user requests a bean from anywhere within the inheritance hierachy of a newly created CMP bean, the correct instance will be returned. The fix for this APAR is currently targeted for inclusion in fixpacks 6.0.2.25 and 6.1.0.15. Please refer to the recommended updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980 Directions to apply fix: NOTE: Choose the: 1) Release the fix applies to 2) The Editions that apply 3) Delete the Editions & Methods that do not apply and this Note Fix applies to Editions: Release 6.0 _X_ Application Server (Express or BASE) _X_ Network Deployment (ND) Install Fix to: Method: __ Application Server Nodes __ Deployment Manager Nodes _X_ Both NOTE: The user must: * Have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * Logged in with the same authority level when unpacking a fix, fix pack or refresh pack. * Be at V6.0.2.2 or newer of the Update Installer. This can be checked by reviewing the level of the Update Installer in file /updateinstaller/version.txt. The Update Installer can be downloaded from the following link: http://www.ibm.com/support/docview.wss?rs=180&uid=swg21205991 For detailed instructions to Extract the Update Installer see the following Technote: http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21205400 1) Copy 6.1.0.9-WS-WAS-IFPK53266.pak file directly to the maintenance directory 2) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that maintenance is being applied to. 3) Launch Update Installer 4) Enter the installation location of the WebSphere product you want to update. 5) Select the "Install maintenance package" operation. 6) Enter the file name of the maintenance package to install (6.1.0.9-WS-WAS-IFPK53266.pak file which was copied in the maintenance directory). 7) Install the maintenance package. 8) Restart WebSphere Directions to remove fix: NOTE: * The user must have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * FIXES MUST BE REMOVED IN THE ORDER THEY WERE APPLIED * DO NOT REMOVE A FIX UNLESS ALL FIXES APPLIED AFTER IT HAVE FIRST BEEN REMOVED * YOU MAY REAPPLY ANY REMOVED FIX Example: If your system has fix1, fix2, and fix3 applied in that order and fix2 is to be removed, fix3 must be removed first, fix2 removed, and fix3 re-applied. 1) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that uninstall is being run against. 2) Start Update Installer 3) Enter the installation location of the WebSphere product you want to remove the fix. 4) Select "Uninstall maintenance package" operation. 5) Enter the file name of the maintenance package to uninstall (6.1.0.9-WS-WAS-IFPK53266.pak). 6) UnInstall maintenance package. 7) Restart WebSphere Directions to re-apply fix: 1) Shutdown WebSphere. 2) Follow the Fix instructions to apply the fix. 3) Restart WebSphere. Additional Information: