JDK-8035740 : Clean up dynamicStubFactoryFactory handling in the JDK ORB
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:rmi-iiop
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2014-02-25
  • Updated: 2016-01-18
  • Resolved: 2016-01-18
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 9
9Resolved
Related Reports
Relates :  
Relates :  
Description
ORB.setupPresentationManager() currently makes incorrect attempts to load non-existent classes in the JDK. It also references ORB variables that have never been supported or implemented in the JDK ORB (com.sun.CORBA.ORBDynamicStubFactoryFactoryClass)

It might be worth considering removal of this code. The PresentationManager.StubFactoryFactory will always be an instance of StubFactoryFactoryProxyImpl in the JDK ORB cases.

Unnecessary class loading attemps have cause confusion in the past. See JDK-6497156

Code in question : 

        PresentationManager.StubFactoryFactory dynamicStubFactoryFactory =
            (PresentationManager.StubFactoryFactory)AccessController.doPrivileged(
                new PrivilegedAction() {
                    public java.lang.Object run() {
                        PresentationManager.StubFactoryFactory sff =
                            PresentationDefaults.getProxyStubFactoryFactory() ;

                        String className = System.getProperty(
                            ORBConstants.DYNAMIC_STUB_FACTORY_FACTORY_CLASS,
                            "com.sun.corba.se.impl.presentation.rmi.bcel.StubFactoryFactoryBCELImpl" ) ;

                        try {
                            // First try the configured class name, if any
                            Class<?> cls = SharedSecrets.getJavaCorbaAccess().loadClass( className ) ;
                            sff = (PresentationManager.StubFactoryFactory)cls.newInstance() ;
                        } catch (Exception exc) {
                            // Use the default. Log the error as a warning.
                            staticWrapper.errorInSettingDynamicStubFactoryFactory(
                                exc, className ) ;
                        }

                        return sff ;
                    }
                }
            ) ;


Comments
PresentationManager description
01-04-2014