geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r477163 - in /geronimo/server/branches/1.2: configs/openejb-corba-deployer/src/plan/ configs/openejb-deployer/src/plan/ modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/
Date Mon, 20 Nov 2006 12:31:18 GMT
Author: rickmcguire
Date: Mon Nov 20 04:31:15 2006
New Revision: 477163

URL: http://svn.apache.org/viewvc?view=rev&rev=477163
Log:
Merge CorbaRefBuilder changes back into 1.2 branch. 


Removed:
    geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/CorbaRefBuilder.java
Modified:
    geronimo/server/branches/1.2/configs/openejb-corba-deployer/src/plan/plan.xml
    geronimo/server/branches/1.2/configs/openejb-deployer/src/plan/plan.xml
    geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
    geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java

Modified: geronimo/server/branches/1.2/configs/openejb-corba-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/configs/openejb-corba-deployer/src/plan/plan.xml?view=diff&rev=477163&r1=477162&r2=477163
==============================================================================
--- geronimo/server/branches/1.2/configs/openejb-corba-deployer/src/plan/plan.xml (original)
+++ geronimo/server/branches/1.2/configs/openejb-corba-deployer/src/plan/plan.xml Mon Nov
20 04:31:15 2006
@@ -38,7 +38,7 @@
             </environment>
         </xml-attribute>
     </gbean>
-    
+
     <gbean name="OpenEjbClientCorbaRefBuilder" class="org.apache.openejb.deployment.OpenEjbCorbaRefBuilder">
         <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee</attribute>
         <xml-attribute name="defaultEnvironment">
@@ -54,12 +54,35 @@
         </xml-attribute>
     </gbean>
 
-    <gbean name="CorbaRefBuilder" class="org.apache.geronimo.naming.deployment.CorbaRefBuilder">
+    <gbean name="CorbaRefBuilder" class="org.apache.openejb.deployment.CorbaRefBuilder">
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.geronimo.configs</groupId>
+                        <artifactId>j2ee-corba-yoko</artifactId>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
         <reference name="CorbaGBeanNameSource">
             <name>EARBuilder</name>
         </reference>
     </gbean>
-    <gbean name="ClientCorbaRefBuilder" class="org.apache.geronimo.naming.deployment.CorbaRefBuilder">
+
+    <gbean name="ClientCorbaRefBuilder" class="org.apache.openejb.deployment.CorbaRefBuilder">
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.geronimo.configs</groupId>
+                        <artifactId>client-corba-yoko</artifactId>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
         <reference name="CorbaGBeanNameSource">
             <name>AppClientBuilder</name>
         </reference>

Modified: geronimo/server/branches/1.2/configs/openejb-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/configs/openejb-deployer/src/plan/plan.xml?view=diff&rev=477163&r1=477162&r2=477163
==============================================================================
--- geronimo/server/branches/1.2/configs/openejb-deployer/src/plan/plan.xml (original)
+++ geronimo/server/branches/1.2/configs/openejb-deployer/src/plan/plan.xml Mon Nov 20 04:31:15
2006
@@ -111,18 +111,6 @@
         <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee</attribute>
     </gbean>
 
-    <!--<gbean name="CorbaRefBuilder" class="org.apache.geronimo.naming.deployment.CorbaRefBuilder">-->
-        <!--<reference name="CorbaGBeanNameSource">-->
-            <!--<name>EarBuilder</name>-->
-        <!--</reference>-->
-    <!--</gbean>-->
-    <!--<gbean name="ClientCorbaRefBuilder" class="org.apache.geronimo.naming.deployment.CorbaRefBuilder">-->
-        <!--<reference name="CorbaGBeanNameSource">-->
-            <!--<name>AppClientBuilder</name>-->
-        <!--</reference>-->
-    <!--</gbean>-->
-
-
     <gbean name="WebServiceEJBLinkTemplate" class="org.apache.openejb.server.axis.WSContainerGBean"/>
 
 </module>

Modified: geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java?view=diff&rev=477163&r1=477162&r2=477163
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
Mon Nov 20 04:31:15 2006
@@ -36,8 +36,11 @@
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.repository.Dependency;
+import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.schema.NamespaceElementConverter;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerAbstractNamingEntryDocument;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.SchemaType;
 import org.apache.xmlbeans.XmlObject;
@@ -50,6 +53,7 @@
     protected static final String J2EE_NAMESPACE = "http://java.sun.com/xml/ns/j2ee";
     protected static final String JEE_NAMESPACE = "http://java.sun.com/xml/ns/javaee";
     protected static final NamespaceElementConverter J2EE_CONVERTER = new NamespaceElementConverter(J2EE_NAMESPACE);
+    protected static final NamespaceElementConverter NAMING_CONVERTER = new NamespaceElementConverter(GerAbstractNamingEntryDocument.type.getDocumentElementName().getNamespaceURI());
 
     private final Environment defaultEnvironment;
 
@@ -61,13 +65,38 @@
         this.defaultEnvironment = defaultEnvironment;
     }
 
-    public void buildEnvironment(XmlObject specDD, XmlObject plan, Environment environment)
{
+    public void buildEnvironment(XmlObject specDD, XmlObject plan, Environment environment)
throws DeploymentException {
         if (willMergeEnvironment(specDD, plan)) {
             EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
         }
     }
 
-    protected boolean willMergeEnvironment(XmlObject specDD, XmlObject plan) {
+    protected boolean willMergeEnvironment(XmlObject specDD, XmlObject plan) throws DeploymentException
{
+        return false;
+    }
+
+    protected boolean matchesDefaultEnvironment(Environment environment) {
+        for (Iterator iterator = defaultEnvironment.getDependencies().iterator(); iterator.hasNext();)
{
+            Dependency defaultDependency = (Dependency) iterator.next();
+            boolean matches = false;
+            for (Iterator iterator1 = environment.getDependencies().iterator(); iterator1.hasNext();)
{
+                Dependency actualDependency = (Dependency) iterator1.next();
+                if (matches(defaultDependency, actualDependency)) {
+                    matches = true;
+                    break;
+                }
+                if (!matches) {
+        return false;
+    }
+            }
+        }
+        return true;
+    }
+
+    private boolean matches(Dependency defaultDependency, Dependency actualDependency) {
+        if (defaultDependency.getArtifact().matches(actualDependency.getArtifact()) || actualDependency.getArtifact().matches(defaultDependency.getArtifact()))
{
+            return defaultDependency.getImportType() == actualDependency.getImportType()
|| actualDependency.getImportType() == ImportType.ALL;
+        }
         return false;
     }
 
@@ -93,7 +122,7 @@
         return QNameSet.forSets(null, Collections.EMPTY_SET, Collections.EMPTY_SET, qnames);
     }
 
-    protected XmlObject[] convert(XmlObject[] xmlObjects, NamespaceElementConverter converter,
SchemaType type) throws DeploymentException {
+    protected static XmlObject[] convert(XmlObject[] xmlObjects, NamespaceElementConverter
converter, SchemaType type) throws DeploymentException {
         //bizarre ArrayStoreException if xmlObjects is loaded by the wrong classloader
         XmlObject[] converted = new XmlObject[xmlObjects.length];
         for (int i = 0; i < xmlObjects.length; i++) {

Modified: geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?view=diff&rev=477163&r1=477162&r2=477163
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Mon Nov 20 04:31:15 2006
@@ -17,22 +17,16 @@
 
 package org.apache.geronimo.naming.deployment;
 
-import java.net.URI;
-import java.net.URL;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanLocatorType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
-import org.apache.geronimo.xbeans.j2ee.ResourceRefType;
 
 /**
  * @version $Rev:385232 $ $Date$



Mime
View raw message