You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2010/04/22 00:04:28 UTC
svn commit: r936536 - in
/geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main:
java/org/apache/geronimo/yoko/ORBConfigAdapter.java resources/
resources/OSGI-INF/ resources/OSGI-INF/blueprint/
resources/OSGI-INF/blueprint/providers.xml
Author: djencks
Date: Wed Apr 21 22:04:27 2010
New Revision: 936536
URL: http://svn.apache.org/viewvc?rev=936536&view=rev
Log:
GERONIMO-5092 set priority on the classes geronimo wants to use to make sure they are picked. This eliminates need for hardcoded properties when starting the orb.
Added:
geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/
geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/
geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/
geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml (with props)
Modified:
geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/java/org/apache/geronimo/yoko/ORBConfigAdapter.java
Modified: geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/java/org/apache/geronimo/yoko/ORBConfigAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/java/org/apache/geronimo/yoko/ORBConfigAdapter.java?rev=936536&r1=936535&r2=936536&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/java/org/apache/geronimo/yoko/ORBConfigAdapter.java (original)
+++ geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/java/org/apache/geronimo/yoko/ORBConfigAdapter.java Wed Apr 21 22:04:27 2010
@@ -16,7 +16,6 @@
*/
package org.apache.geronimo.yoko;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -24,14 +23,6 @@ import java.util.List;
import java.util.Properties;
import javax.rmi.CORBA.UtilDelegate;
-import org.apache.geronimo.corba.util.UtilDelegateImpl;
-import org.apache.geronimo.gbean.annotation.GBean;
-import org.apache.geronimo.gbean.annotation.ParamSpecial;
-import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.osgi.framework.Bundle;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.apache.geronimo.corba.CORBABean;
import org.apache.geronimo.corba.CSSBean;
import org.apache.geronimo.corba.NameService;
@@ -41,13 +32,20 @@ import org.apache.geronimo.corba.securit
import org.apache.geronimo.corba.security.config.tss.TSSConfig;
import org.apache.geronimo.corba.security.config.tss.TSSSSLTransportConfig;
import org.apache.geronimo.corba.security.config.tss.TSSTransportMechConfig;
-import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.corba.util.UtilDelegateImpl;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
import org.apache.yoko.orb.CosNaming.tnaming.TransientNameService;
import org.apache.yoko.orb.CosNaming.tnaming.TransientServiceException;
import org.apache.yoko.orb.OB.ZERO_PORT_POLICY_ID;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Policy;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -71,26 +69,26 @@ public class ORBConfigAdapter implements
*/
public ORBConfigAdapter(@ParamSpecial(type = SpecialAttributeType.bundle) Bundle bundle) throws Exception {
// define the default ORB for ORB.init();
- System.setProperty("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
- System.setProperty("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
+// System.setProperty("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
+// System.setProperty("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
// redirect the RMI implementation to use the Yoko ORB.
- System.setProperty("javax.rmi.CORBA.PortableRemoteObjectClass", "org.apache.yoko.rmi.impl.PortableRemoteObjectImpl");
- System.setProperty("javax.rmi.CORBA.StubClass", "org.apache.yoko.rmi.impl.StubImpl");
+// System.setProperty("javax.rmi.CORBA.PortableRemoteObjectClass", "org.apache.yoko.rmi.impl.PortableRemoteObjectImpl");
+// System.setProperty("javax.rmi.CORBA.StubClass", "org.apache.yoko.rmi.impl.StubImpl");
// this hooks the util class and allows us to override certain functions
- System.setProperty("javax.rmi.CORBA.UtilClass", "org.apache.geronimo.corba.util.UtilDelegateImpl");
+// System.setProperty("javax.rmi.CORBA.UtilClass", "org.apache.geronimo.corba.util.UtilDelegateImpl");
// this tells the openejb UtilDelegateImpl which implementation to delegate non-overridden
// operations to.
// System.setProperty("org.apache.geronimo.corba.UtilDelegateClass", "org.apache.yoko.rmi.impl.UtilImpl");
// this allows us to hook RMI stub invocation/serialization events.
- UtilDelegateImpl.setDelegateClass(bundle.loadClass("org.apache.yoko.rmi.impl.UtilImpl").asSubclass(UtilDelegate.class));
- System.setProperty("org.apache.yoko.rmi.RMIStubInitializerClass", "org.apache.geronimo.yoko.RMIStubHandlerFactory");
+// UtilDelegateImpl.setDelegateClass(bundle.loadClass("org.apache.yoko.rmi.impl.UtilImpl").asSubclass(UtilDelegate.class));
+// System.setProperty("org.apache.yoko.rmi.RMIStubInitializerClass", "org.apache.geronimo.yoko.RMIStubHandlerFactory");
// ok, now we have a potential classloading problem because of where our util delegates are located.
// by forcing these classes to load now using our class loader, we can ensure things are properly initialized
- Class clazz = bundle.loadClass("javax.rmi.PortableRemoteObject");
- Method m = clazz.getMethod("narrow", Object.class, Class.class);
- m.invoke(null, new Object(), Object.class);
+// Class clazz = bundle.loadClass("javax.rmi.PortableRemoteObject");
+// Method m = clazz.getMethod("narrow", Object.class, Class.class);
+// m.invoke(null, new Object(), Object.class);
log.debug("Started Yoko ORBConfigAdapter");
Added: geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml?rev=936536&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml (added)
+++ geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml Wed Apr 21 22:04:27 2010
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+
+ blueprint configuration for corba providers
+ -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <reference id="register" interface="org.apache.yoko.osgi.locator.Register" component-name="yokoRegistryBean"/>
+
+ <bean class="org.apache.yoko.osgi.locator.ServiceBean"
+ activation="eager"
+ init-method="start"
+ destroy-method="stop">
+ <argument>
+ <value>javax.rmi.CORBA.UtilClass</value>
+ </argument>
+ <argument>
+ <value>org.apache.geronimo.corba.util.UtilDelegateImpl</value>
+ </argument>
+ <argument>
+ <ref component-id="blueprintBundle"/>
+ </argument>
+ <argument>
+ <ref component-id="register"/>
+ </argument>
+ <argument>
+ <value>1</value>
+ </argument>
+ </bean>
+ <bean class="org.apache.yoko.osgi.locator.ServiceBean"
+ activation="eager"
+ init-method="start"
+ destroy-method="stop">
+ <argument>
+ <value>org.apache.yoko.rmi.RMIStubInitializerClass</value>
+ </argument>
+ <argument>
+ <value>org.apache.geronimo.yoko.RMIStubHandlerFactory</value>
+ </argument>
+ <argument>
+ <ref component-id="blueprintBundle"/>
+ </argument>
+ <argument>
+ <ref component-id="register"/>
+ </argument>
+ <argument>
+ <value>1</value>
+ </argument>
+ </bean>
+
+</blueprint>
\ No newline at end of file
Propchange: geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/plugins/corba/geronimo-yoko/src/main/resources/OSGI-INF/blueprint/providers.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml