-
Bug
-
Resolution: Duplicate
-
P3
-
9
-
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. SeeJDK-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 ;
}
}
) ;
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
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 ;
}
}
) ;
- relates to
-
JDK-8068682 Deprivilege/move java.corba to the ext class loader
- Closed
-
JDK-6497156 Java ORB exception IOP00110227:StubFactoryFactoryBCELImpl could not be loaded by the ORB ClassLoader
- Closed
- links to