PQ74155: IllegalStateException in ejbCreate() call in an EJB assocation

 A fix is available

5.0.2: WebSphere Application Server Version 5.0 Fix Pack 2 (Version 5.0.2)



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 information
APAR number PQ74155
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 2003-05-14
Closed date 2003-07-28
Last modified date 2003-07-28

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
PM          

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


Document Information


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