openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r453072 - in /incubator/openejb/trunk/openejb2/modules: openejb-core/src/main/java/org/apache/openejb/corba/ openejb-core/src/test/java/org/apache/openejb/corba/ openejb-yoko/src/test/java/org/apache/openejb/corba/security/config/tss/
Date Thu, 05 Oct 2006 00:27:38 GMT
Author: djencks
Date: Wed Oct  4 17:27:34 2006
New Revision: 453072

URL: http://svn.apache.org/viewvc?view=rev&rev=453072
Log:
OPENEJB-266 tweak the GBeans so they are a little more conventional and work

Added:
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
  (with props)
Modified:
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameServiceGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-yoko/src/test/java/org/apache/openejb/corba/security/config/tss/TSSConfigEditorTest.java

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABean.java?view=diff&rev=453072&r1=453071&r2=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABean.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABean.java
Wed Oct  4 17:27:34 2006
@@ -16,29 +16,25 @@
  */
 package org.apache.openejb.corba;
 
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+
+import javax.ejb.spi.HandleDelegate;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.apache.geronimo.security.SecurityService;
-import org.omg.CORBA.ORB;
-import org.omg.PortableServer.POA;
-import org.omg.PortableServer.POAHelper;
 import org.apache.openejb.corba.security.config.ConfigAdapter;
-import org.apache.openejb.corba.security.config.ConfigException;
+import org.apache.openejb.corba.security.config.ssl.SSLConfig;
 import org.apache.openejb.corba.security.config.tss.TSSConfig;
 import org.apache.openejb.corba.security.config.tss.TSSSSLTransportConfig;
 import org.apache.openejb.corba.security.config.tss.TSSTransportMechConfig;
-import org.apache.openejb.corba.security.config.ssl.SSLConfig;
 import org.apache.openejb.corba.util.Util;
-
-import javax.ejb.spi.HandleDelegate;
-import java.net.InetSocketAddress;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Properties;
+import org.omg.CORBA.ORB;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAHelper;
 
 
 /**
@@ -91,26 +87,20 @@
      *               The initial listener port to use.
      * @param classLoader
      *               The ClassLoader used for ORB context class loading.
-     * @param securityService
-     *               The security service.  Not used directly, but this is
-     *               here to order dependency reasons.
      * @param nameService
      *               The initial name service the created ORB will use
      *               for object resolution.
      * @param ssl    The SSL configuration, including the KeystoreManager.
      *
-     * @exception ClassNotFoundException
-     * @exception IllegalAccessException
-     * @exception InstantiationException
      */
-    public CORBABean(AbstractName abstractName, ConfigAdapter configAdapter, String host,
int listenerPort, ClassLoader classLoader, SecurityService securityService, NameService nameService,
SSLConfig ssl) throws ClassNotFoundException, IllegalAccessException, InstantiationException
{
+    public CORBABean(AbstractName abstractName, ConfigAdapter configAdapter, String host,
int listenerPort, ClassLoader classLoader, NameService nameService, SSLConfig ssl) {
         this.abstractName = abstractName;
         this.classLoader = classLoader;
         this.configAdapter = configAdapter;
         sslConfig = ssl;
         this.nameService = nameService;
+        this.host = host;
         this.listenerPort = listenerPort;
-        //security service included to force start order.
     }
 
     /**

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java?view=diff&rev=453072&r1=453071&r2=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java
Wed Oct  4 17:27:34 2006
@@ -16,19 +16,19 @@
  */
 package org.apache.openejb.corba;
 
+import java.net.InetSocketAddress;
+
+import javax.ejb.spi.HandleDelegate;
+
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.security.SecurityService;
-import org.omg.CORBA.ORB;
-import org.omg.PortableServer.POA;
 import org.apache.openejb.corba.security.config.ConfigAdapter;
-import org.apache.openejb.corba.security.config.tss.TSSConfig;
 import org.apache.openejb.corba.security.config.ssl.SSLConfig;
-
-import javax.ejb.spi.HandleDelegate;
-import java.net.InetSocketAddress;
+import org.apache.openejb.corba.security.config.tss.TSSConfig;
+import org.omg.CORBA.ORB;
+import org.omg.PortableServer.POA;
 
 /**
  * @version $Revision$ $Date$
@@ -41,11 +41,9 @@
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(CORBABeanGBean.class,
"OpenEJB ORB Adapter", CORBABean.class, NameFactory.CORBA_SERVICE);
 
         infoBuilder.addAttribute("abstractName", AbstractName.class, false);
-        infoBuilder.addReference("configAdapter", ConfigAdapter.class, NameFactory.ORB_CONFIG);
         infoBuilder.addAttribute("host", String.class, true);
         infoBuilder.addAttribute("port", int.class, true);
         infoBuilder.addAttribute("tssConfig", TSSConfig.class, true);
-        infoBuilder.addReference("nameService", NameService.class, NameFactory.CORBA_NAME_SERVICE);
 
         infoBuilder.addAttribute("listenAddress", InetSocketAddress.class, false);
         infoBuilder.addAttribute("ORB", ORB.class, false);
@@ -54,10 +52,12 @@
         infoBuilder.addAttribute("handleDelegate", HandleDelegate.class, false);
 
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
-        infoBuilder.addReference("SecurityService", SecurityService.class, NameFactory.GERONIMO_SERVICE);
+
+        infoBuilder.addReference("ConfigAdapter", ConfigAdapter.class, NameFactory.ORB_CONFIG);
         infoBuilder.addReference("SSLConfig", SSLConfig.class, NameFactory.CORBA_SSL);
+        infoBuilder.addReference("NameService", NameService.class, NameFactory.CORBA_NAME_SERVICE);
 
-        infoBuilder.setConstructor(new String[]{"abstractName", "configAdapter", "host",
"port", "classLoader", "SecurityService", "nameService", "SSLConfig"});
+        infoBuilder.setConstructor(new String[]{"abstractName", "ConfigAdapter", "host",
"port", "classLoader", "NameService", "SSLConfig"});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBean.java?view=diff&rev=453072&r1=453071&r2=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBean.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBean.java
Wed Oct  4 17:27:34 2006
@@ -16,28 +16,26 @@
  */
 package org.apache.openejb.corba;
 
+import java.net.URI;
+
+import javax.transaction.TransactionManager;
+
 import edu.emory.mathcs.backport.java.util.concurrent.Executor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.omg.CORBA.ORB;
-import org.omg.CORBA.UserException;
-import org.omg.CosNaming.NameComponent;
-import org.omg.CosNaming.NamingContextExt;
-import org.omg.CosNaming.NamingContextExtHelper;
 import org.apache.openejb.corba.security.config.ConfigAdapter;
 import org.apache.openejb.corba.security.config.css.CSSConfig;
 import org.apache.openejb.corba.security.config.ssl.SSLConfig;
 import org.apache.openejb.corba.security.config.tss.TSSConfig;
 import org.apache.openejb.corba.transaction.ClientTransactionPolicyConfig;
 import org.apache.openejb.corba.transaction.nodistributedtransactions.NoDTxClientTransactionPolicyConfig;
-
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Properties;
-import javax.transaction.TransactionManager;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.UserException;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContextExt;
+import org.omg.CosNaming.NamingContextExtHelper;
 
 
 /**
@@ -74,7 +72,7 @@
         this.cssConfig = null;
     }
 
-    public CSSBean(AbstractName abstractName, ConfigAdapter configAdapter, TransactionManager
transactionManager, SSLConfig ssl, ClassLoader classLoader) throws ClassNotFoundException,
IllegalAccessException, InstantiationException {
+    public CSSBean(ConfigAdapter configAdapter, TransactionManager transactionManager, SSLConfig
ssl, AbstractName abstractName, ClassLoader classLoader) throws ClassNotFoundException, IllegalAccessException,
InstantiationException {
         this.abstractName = abstractName;
         this.classLoader = classLoader;
         this.transactionManager = transactionManager;

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java?view=diff&rev=453072&r1=453071&r2=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java
Wed Oct  4 17:27:34 2006
@@ -18,6 +18,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.openejb.corba.security.config.ConfigAdapter;
 import org.apache.openejb.corba.security.config.css.CSSConfig;
@@ -40,7 +41,6 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(CSSBeanGBean.class,
CSSBean.class, NameFactory.CORBA_CSS);
 
-        infoFactory.addReference("configAdapter", ConfigAdapter.class, NameFactory.ORB_CONFIG);
         infoFactory.addAttribute("description", String.class, true);
         infoFactory.addAttribute("cssConfig", CSSConfig.class, true);
         infoFactory.addAttribute("ORB", ORB.class, false);
@@ -48,9 +48,11 @@
 
         infoFactory.addReference("TransactionManager", TransactionManager.class, NameFactory.TRANSACTION_MANAGER);
         infoFactory.addReference("SSLConfig", SSLConfig.class, NameFactory.CORBA_SSL);
+        infoFactory.addReference("ConfigAdapter", ConfigAdapter.class, NameFactory.ORB_CONFIG);
+        infoFactory.addAttribute("abstractName", AbstractName.class, false);
         infoFactory.addAttribute("classLoader", ClassLoader.class, false);
 
-        infoFactory.setConstructor(new String[]{"configAdapter", "TransactionManager", "SSLConfig",
"classLoader"});
+        infoFactory.setConstructor(new String[]{"ConfigAdapter", "TransactionManager", "SSLConfig",
"abstractName", "classLoader"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameServiceGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameServiceGBean.java?view=diff&rev=453072&r1=453071&r2=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameServiceGBean.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameServiceGBean.java
Wed Oct  4 17:27:34 2006
@@ -36,12 +36,12 @@
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(NameServiceGBean.class,
"CORBA Naming Service", NameService.class, NameFactory.CORBA_NAME_SERVICE);
 
         infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
-        infoFactory.addReference("configAdapter", ConfigAdapter.class, NameFactory.ORB_CONFIG);
+        infoFactory.addReference("ConfigAdapter", ConfigAdapter.class, NameFactory.ORB_CONFIG);
         infoFactory.addAttribute("host", String.class, true);
         infoFactory.addAttribute("port", int.class, true);
         infoFactory.addAttribute("address", InetSocketAddress.class, false);
         infoFactory.addAttribute("local", boolean.class, true);
-        infoFactory.setConstructor(new String[]{"ServerInfo", "configAdapter", "host", "port"});
+        infoFactory.setConstructor(new String[]{"ServerInfo", "ConfigAdapter", "host", "port"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Added: incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java?view=auto&rev=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
(added)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
Wed Oct  4 17:27:34 2006
@@ -0,0 +1,48 @@
+/*
+* 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.
+*/
+
+
+package org.apache.openejb.corba;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ * Make sure various GBeanInfos have correct constructor info
+ * @version $Rev:$ $Date:$
+ */
+public class GBeanInfosTest extends TestCase {
+
+    public void testCSSBeanGBean() throws Exception {
+        new CSSBeanGBean();
+    }
+
+    public void testCORBABeanGBean() throws Exception {
+        new CORBABeanGBean();
+    }
+
+    public void testTSSBeanGBean() throws Exception {
+        new TSSBeanGBean();
+    }
+
+    public void testNameServiceGBean() throws Exception {
+        new NameServiceGBean();
+    }
+
+}

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/openejb/trunk/openejb2/modules/openejb-yoko/src/test/java/org/apache/openejb/corba/security/config/tss/TSSConfigEditorTest.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-yoko/src/test/java/org/apache/openejb/corba/security/config/tss/TSSConfigEditorTest.java?view=diff&rev=453072&r1=453071&r2=453072
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-yoko/src/test/java/org/apache/openejb/corba/security/config/tss/TSSConfigEditorTest.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-yoko/src/test/java/org/apache/openejb/corba/security/config/tss/TSSConfigEditorTest.java
Wed Oct  4 17:27:34 2006
@@ -77,7 +77,7 @@
         Naming naming = new Jsr77Naming();
         AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"),
"gbean", NameFactory.CORBA_SERVICE) ;
         ConfigAdapter configAdapter = new org.apache.openejb.yoko.ORBConfigAdapter();
-        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader,
null, null, null);
+        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader,
null, null);
         XmlObject xmlObject = getXmlObject(TEST_XML4);
         TSSConfigEditor editor = new TSSConfigEditor();
         Object o = editor.getValue(xmlObject, null, classLoader);



Mime
View raw message