PQ68981: MULTIPLE INITIALCONTEXT() CREATED WITH DIFFERENT PROVIDER URLS ALL USE THE SAME JNDI CACHE.

APAR status
Closed as fixed if next.

Error description
Assume that application APPL1 is deployed on system X and APPL2
is deployed on system Y. A java client creates a new
initialcontext with provider URL set to iiop://X:900 and
performs a lookup of APPL1. The lookup succeeds as expected
because APPL1 is deployed on system X. Next the client does
a lookup for APPL2 which fails because APPL2 is not
deployed on system X. That same java client subsequently sets
the provider URL to iiop://Y:900 and creates another
initialcontext. It performs a Lookup of APPL1 using the second
initialcontext which succeeds even though APPL1 is not deployed
on system Y. It finally performs a lookup of APPL2 which fails
even though APPL2 is deployed on system Y. The unexpected lookup
behaviors using the second initialcontext are the result of both
initialcontexts using the same JNDI cache. The client's second
initialcontext should have started with a new cache because the
provider URLs don't match.
Local fix
Specify a unique value for the property
com.ibm.websphere.naming.jndicache.cachename on each new
initialContext(). The Assembling J2EE Applications book
(SA22-7836-5) describes this property in chapter 4 in the
section titled "Java Naming and Directory Interface".
Problem summary
****************************************************************
* USERS AFFECTED: All users of WebSphere Application Server    *
*                 V4.0.1 for z/OS and OS/390                   *
****************************************************************
* PROBLEM DESCRIPTION: When multiple InitialContext naming     *
*                      objects are obtained with distinctly    *
*                      different host:port values, they all    *
*                      access the same JNDI Cache object.      *
*                      This behaviour can result in a          *
*                      successful or failing lookup where      *
*                      the opposite result is expected.        *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
When an InitialContext object is created by the naming support
it is associated with a JNDI Cache, if jndi caching is enabled.
That cache should be distinct based on the host:port setting
derived from the provider URL setting. Currently, the same cache
object is being returned for every InitialContext object
regardless of the provider URL value. This results in unexpected
lookup behaviour.

Depending on how the client is coded, the client may see a
successful lookup where it expects a NameNotFoundException or it
may see a NameNotFoundException raised where it expects a
successful lookup.

The JNDI Cache object associated with a particular
InitialContext object should be a unique instance keyed by the
provider URL setting.
Problem conclusion Temporary fix Comments
This APAR is being closed FIN with concurrence from the
submitting customer. A solution to this problem will be
delivered in a WebSphere Application Server for z/OS
and OS/390 release within the next 18 month.

The issues reported by this APAR have been resolved in the
GA support provided in WebSphere V5.0 Application Server
for z/OS.
APAR information
APAR number PQ68981
Reported component name WASKBASE
Reported component ID 5655A9801
Reported release 401
Status CLOSED FIN
PE NoPE
HIPER NoHIPER
Submitted date 2002-12-09
Closed date 2003-03-11
Last modified date 2004-01-05

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros

Fix information

Applicable component levels
R401 PSN    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server for z/OS
Operating system(s):
Software version: 401
Software edition:
Reference #: PQ68981
IBM Group: Software Group
Modified date: Jan 5, 2004