PQ74155: IllegalStateException in ejbCreate() call in an EJB assocation | |||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description Create two cmp beans with many to many relation. Say Bean1 <-> Bean2. Once the relationship is added, an abstract method of getting Bean2 is added to Bean1, say it is getBean2(), which returns a collection. In the ejbCreate() method of Bean1, say it is getBean2(), which returns a collection. In ejbCreate() method of Bean1, call getBean2() method of Bean1, call getBean2(ejbCreate() and an IllegalStateException will throw. This does not comply with EJB 2.0 spec, the spec requires an empty collection be returned.Local fix The excpetion can be caught.Problem summary **************************************************************** * USERS AFFECTED: All WebSphere Application Server 5.0 users * * utilizing the EJB 2.0 specification. * **************************************************************** * PROBLEM DESCRIPTION: An IllegalStateException is thrown in * * the ejbCreate() call when trying to * * traverse the link in ejbCreate. * **************************************************************** * RECOMMENDATION: * **************************************************************** If Bean1 is related to Bean2 and an abstract method getBean2() is added to Bean1, a collection is returned. In the ejbCreate() method of Bean1, an IllegalStateException is thrown when getBean2() is called.Problem conclusion A link can be established before the source has the primary key. This is against the assumption in the current Persistence Manager Association Runtime that a user only navigates Container Managed Relationships ( CMR ) when there already is a primary key. (The specification requires that calling the getter method for a collection in ejbCreate should return an empty collection.) The LinkFactory.java, LinkSource.java and ConcreteBeanStatefulInstanceExtensionImpl.java files were modified to return an empty collection when there is no primary key for an EJB association.Temporary 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 #: PQ74155
IBM Group: Software Group
Modified date: Jul 28, 2003
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.