Migration of jacorb.properties
Environment
Red Hat JBoss Enterprise Application Platform 6.2.0
Issue
When I add IORInterceptorInitializer in my corba config I get
14:04:00,330 ERROR [org.jacorb.interceptors.ior_init] (MSC service thread 1-4) unexpected exception: org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName: IDL:omg.org/PortableInterceptor/ORBInitInfo/DuplicateName:1.0
at org.jacorb.orb.portableInterceptor.ORBInitInfoImpl.add_ior_interceptor(ORBInitInfoImpl.java:196) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.standardInterceptors.IORInterceptorInitializer.post_init(IORInterceptorInitializer.java:62) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.ORB.interceptorPostInit(ORB.java:1755) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.ORB.internalInit(ORB.java:1644) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.ORB.set_parameters(ORB.java:1606) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.omg.CORBA.ORB.init(ORB.java:62) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jboss.as.jacorb.service.CorbaORBService.start(CorbaORBService.java:124) [jboss-as-jacorb-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
14:04:00,355 WARN [jacorb.orb] (MSC service thread 1-4) org.jacorb.orb.standardInterceptors.IORInterceptorInitializer: ignoring error during ORBInitializer::pre_init. the ORBInitializer will be removed from the current configuration: org.omg.CORBA.INTERNAL: org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName: IDL:omg.org/PortableInterceptor/ORBInitInfo/DuplicateName:1.0
at org.jacorb.orb.standardInterceptors.IORInterceptorInitializer.post_init(IORInterceptorInitializer.java:68) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.ORB.interceptorPostInit(ORB.java:1755) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.ORB.internalInit(ORB.java:1644) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.orb.ORB.set_parameters(ORB.java:1606) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.omg.CORBA.ORB.init(ORB.java:62) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jboss.as.jacorb.service.CorbaORBService.start(CorbaORBService.java:124) [jboss-as-jacorb-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Does that mean that it is already implicitly declared and no need to include it as that was the case under EAP 5 ?
Resolution
Yes - looking at the source for EAP 6.2 (Root Cause below) IORInterceptorInitializer is used at initialisation.
Root Cause
JacORBSubsystemConstants.java:
... ...
102 // constants for common org.omg properties.
.. .. ..
108 public static final String ORB_INITIALIZER_PREFIX = "org.omg.PortableInterceptor.ORBInitializerClass.";
109
110 // JacORB implementation classes and standard interceptors.
111 public static final String JACORB_ORB_CLASS = "org.jacorb.orb.ORB";
112 public static final String JacORB_ORB_SINGLETON_CLASS = "org.jacorb.orb.ORBSingleton";
113 public static final String JACORB_STD_INITIALIZER_KEY = ORB_INITIALIZER_PREFIX + "standard_init";
114 public static final String JACORB_STD_INITIALIZER_VALUE = "org.jacorb.orb.standardInterceptors.IORInterceptorInitializer";
JacORBSubsystemAdd.java:
253 /**
254 * <p>
255 * Sets up the ORB initializers according to what has been configured in the subsystem.
256 * </p>
257 *
258 * @param props the subsystem configuration properties.
259 */
260 private void setupInitializers(Properties props) {
261 List<String> orbInitializers = new ArrayList<String>();
262
263 // check which groups of initializers are to be installed.
264 String installSecurity = (String) props.remove(JacORBSubsystemConstants.ORB_INIT_SECURITY);
265 if (installSecurity.equalsIgnoreCase(JacORBSubsystemConstants.CLIENT)) {
266 orbInitializers.addAll(Arrays.asList(ORBInitializer.SECURITY_CLIENT.getInitializerClasses()));
267 } else if (installSecurity.equalsIgnoreCase(JacORBSubsystemConstants.IDENTITY)
268 || installSecurity.equalsIgnoreCase("on")) {
269 orbInitializers.addAll(Arrays.asList(ORBInitializer.SECURITY_IDENTITY.getInitializerClasses()));
270 }
271
272 String installTransaction = (String) props.remove(JacORBSubsystemConstants.ORB_INIT_TRANSACTIONS);
273 if (installTransaction.equalsIgnoreCase("on")) {
274 orbInitializers.addAll(Arrays.asList(ORBInitializer.TRANSACTIONS.getInitializerClasses()));
275 } else if(installTransaction.equalsIgnoreCase("spec")) {
276 orbInitializers.addAll(Arrays.asList(ORBInitializer.SPEC_TRANSACTIONS.getInitializerClasses()));
277 }
278
279 // add the standard jacorb initializer plus all configured initializers.
280 props.setProperty(JacORBSubsystemConstants.JACORB_STD_INITIALIZER_KEY,
281 JacORBSubsystemConstants.JACORB_STD_INITIALIZER_VALUE);
282 for (String initializerClass : orbInitializers)
283 props.setProperty(JacORBSubsystemConstants.ORB_INITIALIZER_PREFIX + initializerClass, "");
284 }
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
