United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6893617 JDK 6 CNCtx always uses the default ORB and not take java.naming.corba.orb ORB value
JDK-6893617 : JDK 6 CNCtx always uses the default ORB and not take java.naming.corba.orb ORB value

Details
Type:
Bug
Submit Date:
2009-10-21
Status:
Resolved
Updated Date:
2012-08-14
Project Name:
JDK
Resolved Date:
2009-11-30
Component:
core-libs
OS:
solaris_10
Sub-Component:
javax.naming
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u14
Fixed Versions:
6u17-rev (b08)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
Problem
=======
In JDK 6u14->17, there is changes made to CNCtx where trying
to lookup a corbaname URL will always use a default SUN JDK ORB.
Now, the problem is that even though can can pass
into a specific ORB to use (which is possible to create
using env.put("java.naming.corba.orb", orb) previously,
now those code will not work.

Basically Glassfish's passing the EE ORB which
have failover and also Dynamic stub capability will now
not be used since an SE ORB is always used.

DETAILS
========
The CNCtx fix 6796140 in code 

330 private String initUsingCorbanameUrl(ORB orb, String url, Hashtable env)
331 throws NamingException {
...
333 if (orb == null)
334 orb = getDefaultOrb();
336 try {
...
342 orb = getDefaultOrb(); <==== ISSUE
343 setOrbAndRootContext(orb, corb...

is always using the default SE ORB despite one/user passing in
their own ORB to use. As such special ORB functionality is lost.
It is believed that line 342 should not be needed.

                                    

Comments
EVALUATION

This is a mistake.   The 5.0 and 6.0 versions of the previous fix are different: 6.0 is in error, it checks an incoming orb and only calls getDefaultOrb() if that was null.  To always call getDefaultOrb() a few lines later is a mistake.
                                     
2009-10-23
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/612e56cf284c
                                     
2012-08-14



Hardware and Software, Engineered to Work Together