PQ95420: WITH LIFETIME IN CACHE AND WHEN THE EXPIRY TRIGGERRED, THE EJB FINDER DOESN'T RETURN THE CORRECT RESULTS FOR 1-N CMR EJB

 Fixes are available

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 HP-UX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Solaris
5.1.1.6: WebSphere Application Server Version 5.1.1 Cumulative Fix 6
5.1.1.7: WebSphere Application Server Version 5.1.1 Cumulative Fix 7
5.1.1.4: WebSphere Application Server Version 5.1.1 Cumulative Fix 4
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Linux



APAR status
Closed as program error.

Error description
Scenario:
Two CMP entity beans CWMClass and CWMAttribute, both set up with
lifetime in cache (data cache) enabled.
+ CWMClass has a 1-Many CMR relationship to CWMAttribute
+ Create a new CWMAttribute with name "Foobar" and commit it.
The rows get created in our database and the primary key of the
new object is set to 2672e4d8:ff25fc3615:-7ffd.
The CMR relationship is established and the owning CWMClass
(whose name is "Document")primary key 200e2875:fee79f9e1a:-7fe8
+ The transaction for that create is closed, and later a new
transaction is opened in which:
  -  execute a
  CWMClassLocalHome.findByPrimaryKey("200e2875:fee79f9e1a:-7fe8"
  ) to get our CWMClass entity bean back again
  - call CWMClass.getOwnedAttributes to get the collection of
  CWMAttributes in the 1-Many CMR relationship from CWMClass
+ At this point we find that the returned collection of
  CWMAttribute instances does not include the Foobar attribute
  added in the previous transaction.
.
If switch off lifetime in cache on these entity beans the
problem does not occur.
Local fix Problem summary
****************************************************************
* USERS AFFECTED: Users of the EJB Finder for 1-N CMR EJB      *
*                 with  lifetime in cache and when expiry is   *
*                 triggered.                                   *
****************************************************************
* PROBLEM DESCRIPTION: Have two CMP entity beans CWMClass      *
*                      and CWMAttribute, both set up with      *
*                      lifetime in cache (data cache) enabled. *
*                      + CWMClass has a 1-Many CMR             *
*                      relationship to CWMAttribute.           *
*                      + Create a new CWMAttribute with name   *
*                      "Foobar" and commit it.                 *
*                      + The transaction for that create is    *
*                      closed, and later a new                 *
*                      transaction is opened in which          *
*                      CWMClassLocalHome.findByPrimaryKey()    *
*                      is executed.                            *
*                      + Call CWMClass.getOwnedAttributes to   *
*                      get the collection of                   *
*                      CWMAttributes in the 1-Many CMR         *
*                      relationship from CWMClass              *
*                      + The returned collection of            *
*                      CWMAttribute instances does not         *
*                      include the Foobar attribute added in   *
*                      the previous transaction.               *
*                      When switching off lifetime in cache    *
*                      on these entity beans the               *
*                      problem does not occur.                 *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
The EJB Finder doesn't return the correct results for 1-N CMR
EJB with lifetime in cache and when expiry is triggered
Problem conclusion
When the cache lifetime expiry triggers some instances of A
calling a finder method to retrieve all related instances of B
returns an unexpected empty results set.
Restarting Application Server fixes the problem so it appears
the cache is not being refreshed properly after expiry.
The solution is to remove all the associations for all the
rolenames for that bean.

The fix for this APAR is currently targeted for inclusion in
fixpack 5.0.2.9 and 5.1.1.3. Please refer to the
Recommended Updates page for delivery dates:

http://www-1.ibm.com/support/docview.wss?rs=180&
context=SSEQTP&uid=swg27004980
Temporary fix Comments
APAR information
APAR number PQ95420
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00W
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2004-10-07
Closed date 2004-11-22
Last modified date 2004-11-22

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros

Publications Referenced

Fix information

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00P PSY    UP
R00S PSY    UP
R00W PSY    UP
R103 PSY    UP
R10A PSY    UP
R10H PSY    UP
R10I PSY    UP
R10P PSY    UP
R10S PSY    UP
R10W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ95420
IBM Group: Software Group
Modified date: Nov 22, 2004