JDK-6893617 : JDK 6 CNCtx always uses the default ORB and not take java.naming.corba.orb ORB value
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.naming
  • Affected Version: 6u14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2009-10-21
  • Updated: 2012-08-14
  • Resolved: 2009-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8
6u17-rev b08Fixed 7u6Fixed 8Fixed
Related Reports
Relates :  
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 http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/612e56cf284c
14-08-2012

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.
23-10-2009