PQ95420: WITH LIFETIME IN CACHE AND WHEN THE EXPIRY TRIGGERRED, THE EJB FINDER DOESN'T RETURN THE CORRECT RESULTS FOR 1-N CMR EJB | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() 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 triggeredProblem 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=swg27004980Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros Publications Referenced
|
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
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.