Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8035740

Clean up dynamicStubFactoryFactory handling in the JDK ORB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 9
    • 9
    • other-libs
    • None

      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 ;
                          }
                      }
                  ) ;

            msheppar Mark Sheppard
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: