geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r377136 [1/3] - in /geronimo/branches/configid: modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/client-builder/src/schema/ modules/client-builder/src/test-resources/plans/ modules/client-builder/src/test/org/apac...
Date Sun, 12 Feb 2006 05:51:43 GMT
Author: djencks
Date: Sat Feb 11 21:51:39 2006
New Revision: 377136

URL: http://svn.apache.org/viewcvs?rev=377136&view=rev
Log:
new1 and new2 work.  No resolution implemented.

Removed:
    geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/TemporaryPlanAdapter.java
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war3/WEB-INF/jetty-web.xml
Modified:
    geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/branches/configid/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd
    geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan1.xml
    geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan2.xml
    geronimo/branches/configid/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
    geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
    geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java
    geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
    geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java
    geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
    geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StopCommand.java
    geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/UndeployCommand.java
    geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/NamingContext.java
    geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockNamingContext.java
    geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
    geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml
    geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml
    geronimo/branches/configid/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
    geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war5/WEB-INF/geronimo-jetty.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan1.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan1A.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan1B.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan1C.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan2.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan3.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan4-converted.xml
    geronimo/branches/configid/modules/jetty-builder/src/test-resources/plans/plan4.xml
    geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
    geronimo/branches/configid/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
    geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
    geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
    geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java
    geronimo/branches/configid/modules/service-builder/src/schema/geronimo-config-1.1.xsd
    geronimo/branches/configid/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/LongStartupMonitor.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/ProgressBarStartupMonitor.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/SilentStartupMonitor.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/StartupMonitor.java
    geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/branches/configid/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-web.xml
    geronimo/branches/configid/modules/tomcat-builder/src/test-resources/plans/plan1.xml
    geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
    geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/configid/modules/web-builder/src/test-resources/plans/tomcat-post.xml
    geronimo/branches/configid/modules/web-builder/src/test-resources/plans/tomcat-pre.xml
    geronimo/branches/configid/modules/web-builder/src/test-resources/plans/tomcat-pre2.xml
    geronimo/branches/configid/modules/web-builder/src/test-resources/plans/tomcat-pre3.xml
    geronimo/branches/configid/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
    geronimo/branches/configid/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java
    geronimo/branches/configid/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java
    geronimo/branches/configid/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/RepoConfigInstaller.java
    geronimo/branches/configid/plugins/geronimo-deployment-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/StartServer.java
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/plugin.jelly
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PlanProcessor.java

Modified: geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java Sat Feb 11 21:51:39 2006
@@ -27,10 +27,8 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
-import java.util.Arrays;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
@@ -46,9 +44,9 @@
 import org.apache.geronimo.deployment.Environment;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.util.NestedJarFile;
-import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.gbean.GBeanData;
@@ -93,8 +91,8 @@
  */
 public class AppClientModuleBuilder implements ModuleBuilder {
 
-    private final List defaultClientParentId;
-    private final List defaultServerParentId;
+    private final Environment defaultClientEnvironment;
+    private final Environment defaultServerEnvironment;
     private final ObjectName corbaGBeanObjectName;
     private final Kernel kernel;
     private final Repository repository;
@@ -109,8 +107,8 @@
     private final ServiceReferenceBuilder serviceReferenceBuilder;
     private static final String GERAPPCLIENT_NAMESPACE = GerApplicationClientDocument.type.getDocumentElementName().getNamespaceURI();
 
-    public AppClientModuleBuilder(URI[] defaultClientParentId,
-                                  URI[] defaultServerParentId,
+    public AppClientModuleBuilder(Environment defaultClientEnvironment,
+                                  Environment defaultServerEnvironment,
                                   ObjectName transactionContextManagerObjectName,
                                   ObjectName connectionTrackerObjectName,
                                   ObjectName corbaGBeanObjectName,
@@ -121,8 +119,8 @@
                                   ConfigurationStore store,
                                   Repository repository,
                                   Kernel kernel) throws DeploymentException {
-        this.defaultClientParentId = defaultClientParentId == null? Collections.EMPTY_LIST: Arrays.asList(defaultClientParentId);
-        this.defaultServerParentId = defaultServerParentId == null? Collections.EMPTY_LIST: Arrays.asList(defaultServerParentId);
+        this.defaultClientEnvironment = defaultClientEnvironment;
+        this.defaultServerEnvironment = defaultServerEnvironment;
         this.corbaGBeanObjectName = corbaGBeanObjectName;
         this.kernel = kernel;
         this.repository = repository;
@@ -175,28 +173,15 @@
         // parse vendor dd
         GerApplicationClientType gerAppClient = getGeronimoAppClient(plan, moduleFile, standAlone, targetPath, appClient, environment);
 
-        // get the ids from either the application plan or for a stand alone module from the specific deployer
-        URI configId = null;
-        try {
-            configId = new URI(gerAppClient.getConfigId());
-        } catch (URISyntaxException e) {
-            throw new DeploymentException("Invalid configId " + gerAppClient.getConfigId(), e);
-        }
 
-        List parentId = null;
-        if (gerAppClient.isSetParentId()) {
-            String parentIdString = gerAppClient.getParentId();
-            try {
-                parentId = new ArrayList();
-                parentId.add(new URI(parentIdString));
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Could not create parentId uri from " + parentIdString, e);
-            }
-        } else {
-            parentId = new ArrayList(defaultServerParentId);
-        }
+        EnvironmentType clientEnvironmentType = gerAppClient.getClientEnvironment();
+        Environment clientEnvironment = EnvironmentBuilder.buildEnvironment(clientEnvironmentType, defaultClientEnvironment);
+        EnvironmentType serverEnvironmentType = gerAppClient.getServerEnvironment();
+        Environment serverEnvironment = EnvironmentBuilder.buildEnvironment(serverEnvironmentType, defaultServerEnvironment);
+
 
-        return new AppClientModule(standAlone, configId, moduleFile, targetPath, appClient, gerAppClient, specDD);
+
+        return new AppClientModule(standAlone, serverEnvironment, clientEnvironment, moduleFile, targetPath, appClient, gerAppClient, specDD);
     }
 
     GerApplicationClientType getGeronimoAppClient(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, ApplicationClientType appClient, Environment environment) throws DeploymentException {
@@ -251,7 +236,8 @@
         }
 
         GerApplicationClientType geronimoAppClient = GerApplicationClientType.Factory.newInstance();
-        EnvironmentType environmentType = geronimoAppClient.addNewEnvironment();
+        EnvironmentType clientEnvironmentType = geronimoAppClient.addNewClientEnvironment();
+        EnvironmentType serverEnvironmentType = geronimoAppClient.addNewServerEnvironment();
         //TODO configid fill in environment with configids
         // set the parentId and configId
 //        if (standAlone) {
@@ -266,7 +252,6 @@
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module module) throws DeploymentException {
-        earContext.addParentId(defaultServerParentId);
         // extract the app client jar file into a standalone packed jar file and add the contents to the output
         JarFile moduleFile = module.getModuleFile();
         try {
@@ -344,11 +329,8 @@
                 // construct the app client deployment context... this is the same class used by the ear context
                 try {
 
-                    Artifact clientConfigId = URI.create(geronimoAppClient.getClientConfigId());
-                    List clientParentId = ServiceConfigBuilder.toArtifacts(geronimoAppClient.getClientParentId(), geronimoAppClient.getImportArray());
-                    clientParentId.addAll(defaultClientParentId);
                     appClientDeploymentContext = new EARContext(appClientDir,
-                            clientConfigId,
+                            appClientModule.getClientEnvironment(),
                             ConfigurationModuleType.CAR,
                             kernel,
                             clientApplicationName,
@@ -375,14 +357,6 @@
                     throw new DeploymentException("Unable to copy app client module jar into configuration: " + moduleFile.getName());
                 }
 
-                // add the includes
-                DependencyType[] includes = geronimoAppClient.getIncludeArray();
-                ServiceConfigBuilder.addIncludes(appClientDeploymentContext, includes, repository);
-
-                // add the dependencies
-                DependencyType[] dependencies = geronimoAppClient.getDependencyArray();
-                ServiceConfigBuilder.addDependencies(appClientDeploymentContext, dependencies, repository);
-
                 // add manifest class path entries to the app client context
                 addManifestClassPath(appClientDeploymentContext, appClientModule.getEarFile(), moduleFile, moduleBase);
 
@@ -626,8 +600,8 @@
 
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(AppClientModuleBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addAttribute("defaultClientParentId", URI[].class, true, true);
-        infoBuilder.addAttribute("defaultServerParentId", URI[].class, true, true);
+        infoBuilder.addAttribute("defaultClientEnvironment", Environment.class, true, true);
+        infoBuilder.addAttribute("defaultServerEnvironment", Environment.class, true, true);
         infoBuilder.addAttribute("transactionContextManagerObjectName", ObjectName.class, true);
         infoBuilder.addAttribute("connectionTrackerObjectName", ObjectName.class, true);
         infoBuilder.addAttribute("corbaGBeanObjectName", ObjectName.class, true);
@@ -642,8 +616,8 @@
 
         infoBuilder.addInterface(ModuleBuilder.class);
 
-        infoBuilder.setConstructor(new String[]{"defaultClientParentId",
-                                                "defaultServerParentId",
+        infoBuilder.setConstructor(new String[]{"defaultClientEnvironment",
+                                                "defaultServerEnvironment",
                                                 "transactionContextManagerObjectName",
                                                 "connectionTrackerObjectName",
                                                 "corbaGBeanObjectName",

Modified: geronimo/branches/configid/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd (original)
+++ geronimo/branches/configid/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd Sat Feb 11 21:51:39 2006
@@ -37,7 +37,8 @@
 
     <xs:complexType name="application-clientType">
         <xs:sequence>
-            <xs:element ref="sys:environment"/>
+            <xs:element ref="sys:client-environment"/>
+            <xs:element ref="sys:server-environment"/>
 
             <xs:element ref="naming:ejb-ref" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="naming:service-ref" minOccurs="0" maxOccurs="unbounded"/>
@@ -58,10 +59,6 @@
             <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
 
-        <xs:attribute name="configId" type="xs:string" use="required"/>
-        <xs:attribute name="parentId" type="xs:string" use="optional"/>
-        <xs:attribute name="clientConfigId" type="xs:string" use="required"/>
-        <xs:attribute name="clientParentId" type="xs:string" use="optional"/>
     </xs:complexType>
 
     <xs:complexType name="resourceType">

Modified: geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan1.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan1.xml?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan1.xml (original)
+++ geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan1.xml Sat Feb 11 21:51:39 2006
@@ -1,12 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.0"
-    clientConfigId="test-client"
+<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1">
+    <!-- clientConfigId="test-client"
     configId="client"
-    parentId="org/apache/geronimo/DefaultDatabase">
-    <resource-ref>
-        <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
-    </resource-ref>
+    parentId="org/apache/geronimo/DefaultDatabase">-->
+    <dep:client-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+        <dep:configId>
+            <dep:groupId>test</dep:groupId>
+            <dep:type>car</dep:type>
+            <dep:artifactId>testclient</dep:artifactId>
+            <dep:version>1</dep:version>
+        </dep:configId>
+    </dep:client-environment>
+    <dep:server-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+        <dep:configId>
+            <dep:groupId>test</dep:groupId>
+            <dep:type>car</dep:type>
+            <dep:artifactId>testserver</dep:artifactId>
+            <dep:version>1</dep:version>
+        </dep:configId>
+    </dep:server-environment>
+    <nam:resource-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1">
+        <nam:ref-name>jdbc/DB1</nam:ref-name>
+        <nam:target-name>DefaultDatabase</nam:target-name>
+    </nam:resource-ref>
     <realm-name>default</realm-name>
     <callback-handler>org.apache.geronimo.client.DefaultCallbackHandler</callback-handler>
 </application-client>

Modified: geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan2.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan2.xml?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan2.xml (original)
+++ geronimo/branches/configid/modules/client-builder/src/test-resources/plans/plan2.xml Sat Feb 11 21:51:39 2006
@@ -1,32 +1,47 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.0"
-    clientConfigId="test-client"
+<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1">
+   <!-- clientConfigId="test-client"
     configId="client"
-    parentId="org/apache/geronimo/DefaultDatabase">
-    <resource-ref>
-        <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
-    </resource-ref>
+    parentId="org/apache/geronimo/DefaultDatabase">-->
+    <dep:client-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+        <dep:configId>
+            <dep:groupId>test</dep:groupId>
+            <dep:type>car</dep:type>
+            <dep:artifactId>testclient</dep:artifactId>
+            <dep:version>1</dep:version>
+        </dep:configId>
+    </dep:client-environment>
+    <dep:server-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+        <dep:configId>
+            <dep:groupId>test</dep:groupId>
+            <dep:type>car</dep:type>
+            <dep:artifactId>testserver</dep:artifactId>
+            <dep:version>1</dep:version>
+        </dep:configId>
+    </dep:server-environment>
+    <nam:resource-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1">
+        <nam:ref-name>jdbc/DB1</nam:ref-name>
+        <nam:target-name>DefaultDatabase</nam:target-name>
+    </nam:resource-ref>
     <resource>
         <external-rar>tranql/rars/tranql-connector-1.0-SNAPSHOT</external-rar>
-        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
-            configId="org/apache/geronimo/DefaultDatabase"
-            parentId="org/apache/geronimo/Server">
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
+            <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dep:configId>
+                    <dep:groupId>test</dep:groupId>
+                    <dep:type>car</dep:type>
+                    <dep:artifactId>testclient</dep:artifactId>
+                    <dep:version>1</dep:version>
+                </dep:configId>
+                <dep:classloader>
+                    <dep:dependency>
+                        <dep:groupId>axion</dep:groupId>
+                        <dep:artifactId>axion</dep:artifactId>
+                        <dep:version>1</dep:version>
+                    </dep:dependency>
+                </dep:classloader>
 
-            <dependency>
-                <uri>axion/jars/axion-${axion_version}.jar</uri>
-            </dependency>
-            <dependency>
-                <uri>commons-collections/jars/commons-collections-${commons_collections_version}.jar</uri>
-            </dependency>
-
-            <dependency>
-                <uri>commons-primitives/jars/commons-primitives-${commons_primitives_version}.jar</uri>
-            </dependency>
-
-            <dependency>
-                <uri>regexp/jars/regexp-${regexp_version}.jar</uri>
-            </dependency>
+            </dep:environment>
 
             <resourceadapter>
                 <outbound-resourceadapter>

Modified: geronimo/branches/configid/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java (original)
+++ geronimo/branches/configid/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java Sat Feb 11 21:51:39 2006
@@ -7,6 +7,9 @@
 import org.apache.geronimo.xbeans.geronimo.client.GerApplicationClientDocument;
 import org.apache.geronimo.xbeans.geronimo.client.GerApplicationClientType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
+import org.apache.geronimo.deployment.Environment;
+import org.apache.geronimo.deployment.xbeans.EnvironmentType;
+import org.apache.geronimo.deployment.xbeans.ArtifactType;
 
 /**
  */
@@ -16,7 +19,7 @@
     File basedir = new File(System.getProperty("basedir", "."));
 
     protected void setUp() throws Exception {
-        builder = new AppClientModuleBuilder(null, null, null, null, null, null, null, null, null, null, null, null);
+        builder = new AppClientModuleBuilder(new Environment(), null, null, null, null, null, null, null, null, null, null, null);
     }
 
     public void testResourceRef() throws Exception {
@@ -29,9 +32,16 @@
     public void testConstructPlan() throws Exception {
         GerApplicationClientDocument appClientDoc = GerApplicationClientDocument.Factory.newInstance();
         GerApplicationClientType appClient = appClientDoc.addNewApplicationClient();
-        appClient.setClientConfigId("clientConfigId");
-        appClient.setConfigId("configId");
-        appClient.setParentId("parentId");
+        EnvironmentType clientEnvironmentType = appClient.addNewClientEnvironment();
+        ArtifactType clientId = clientEnvironmentType.addNewConfigId();
+        clientId.setGroupId("group");
+        clientId.setArtifactId("artifact");
+        EnvironmentType serverEnvironmentType = appClient.addNewServerEnvironment();
+        serverEnvironmentType.setConfigId(clientId);
+
+//        appClient.setClientConfigId("clientConfigId");
+//        appClient.setConfigId("configId");
+//        appClient.setParentId("parentId");
         GerResourceRefType ref = appClient.addNewResourceRef();
         ref.setRefName("ref");
         ref.setTargetName("target");

Modified: geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Sat Feb 11 21:51:39 2006
@@ -22,7 +22,6 @@
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.net.URI;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -30,7 +29,6 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -67,7 +65,6 @@
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.deployment.xbeans.ClassFilterType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.Environment;
@@ -126,13 +123,13 @@
     private final int defaultIdleTimeoutMinutes;
     private final boolean defaultXATransactionCaching;
     private final boolean defaultXAThreadCaching;
-    private final List defaultParentId;
+    private final Environment defaultEnvironment;
     private final Repository repository;
     private final Kernel kernel;
     private static QName CONNECTOR_QNAME = GerConnectorDocument.type.getDocumentElementName();
     static final String GERCONNECTOR_NAMESPACE = CONNECTOR_QNAME.getNamespaceURI();
 
-    public ConnectorModuleBuilder(Artifact[] defaultParentId,
+    public ConnectorModuleBuilder(Environment defaultEnvironment,
                                   int defaultMaxSize,
                                   int defaultMinSize,
                                   int defaultBlockingTimeoutMilliseconds,
@@ -142,7 +139,7 @@
                                   Repository repository,
                                   Kernel kernel) {
         assert repository != null;
-        this.defaultParentId = defaultParentId == null ? Collections.EMPTY_LIST : Arrays.asList(defaultParentId);
+        this.defaultEnvironment = defaultEnvironment;
 
         this.defaultMaxSize = defaultMaxSize;
         this.defaultMinSize = defaultMinSize;
@@ -236,10 +233,7 @@
         }
 
         EnvironmentType environmentType = gerConnector.getEnvironment();
-        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType);
-        if (!environment.isSuppressDefaultParentId()) {
-            environment.addImports(defaultParentId);
-        }
+        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
         return new ConnectorModule(standAlone, environment, moduleFile, targetPath, connector, gerConnector, specDD);
     }
 
@@ -867,7 +861,7 @@
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(ConnectorModuleBuilder.class, NameFactory.MODULE_BUILDER);
 
-        infoBuilder.addAttribute("defaultParentId", Artifact[].class, true, true);
+        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
         infoBuilder.addAttribute("defaultMaxSize", int.class, true, true);
         infoBuilder.addAttribute("defaultMinSize", int.class, true, true);
         infoBuilder.addAttribute("defaultBlockingTimeoutMilliseconds", int.class, true, true);
@@ -881,7 +875,7 @@
         infoBuilder.addInterface(ModuleBuilder.class);
         infoBuilder.addInterface(ResourceReferenceBuilder.class);
 
-        infoBuilder.setConstructor(new String[]{"defaultParentId",
+        infoBuilder.setConstructor(new String[]{"defaultEnvironment",
                                                 "defaultMaxSize",
                                                 "defaultMinSize",
                                                 "defaultBlockingTimeoutMilliseconds",

Modified: geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java (original)
+++ geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java Sat Feb 11 21:51:39 2006
@@ -32,7 +32,6 @@
 import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
 
 import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
-import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorType;
 import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
 import org.apache.geronimo.xbeans.geronimo.GerAdminobjectType;
@@ -250,7 +249,7 @@
 //        if(suppress == null) {
 //            getConnector().unsetSuppressDefaultParentId();
 //        } else {
-//            getConnector().setSuppressDefaultParentId(suppress.booleanValue());
+//            getConnector().setSuppressDefaultEnvironment(suppress.booleanValue());
 //        }
 //        pcs.firePropertyChange("suppressDefaultParentID", old, suppress);
 //    }

Modified: geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original)
+++ geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Sat Feb 11 21:51:39 2006
@@ -21,6 +21,7 @@
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
 import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -71,12 +72,11 @@
 import java.sql.Connection;
 import java.sql.Statement;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashMap;
-import java.util.Collection;
 import java.util.jar.JarFile;
 
 /**
@@ -90,17 +90,17 @@
     private int defaultMinSize = 0;
     private int defaultBlockingTimeoutMilliseconds = 5000;
     private int defaultidleTimeoutMinutes = 15;
-    private Artifact[] defaultParentId;
+    private Environment defaultEnvironment;
     private Repository repository = new Repository() {
 
-                public boolean hasURI(URI uri) {
-                    return false;
-                }
+        public boolean hasURI(URI uri) {
+            return false;
+        }
 
-                public URL getURL(URI uri) {
-                    return null;
-                }
-            };
+        public URL getURL(URI uri) {
+            return null;
+        }
+    };
 
     private EJBReferenceBuilder ejbReferenceBuilder = new EJBReferenceBuilder() {
 
@@ -131,27 +131,27 @@
 
     private ResourceReferenceBuilder resourceReferenceBuilder = new ResourceReferenceBuilder() {
 
-        public Reference createResourceRef(String containerId, Class iface)  {
+        public Reference createResourceRef(String containerId, Class iface) {
             return null;
         }
 
-        public Reference createAdminObjectRef(String containerId, Class iface)  {
+        public Reference createAdminObjectRef(String containerId, Class iface) {
             return null;
         }
 
-        public ObjectName locateResourceName(ObjectName query)  {
+        public ObjectName locateResourceName(ObjectName query) {
             return null;
         }
 
-        public GBeanData locateActivationSpecInfo(GBeanData resourceAdapterModuleData, String messageListenerInterface)  {
+        public GBeanData locateActivationSpecInfo(GBeanData resourceAdapterModuleData, String messageListenerInterface) {
             return null;
         }
 
-        public GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData)  {
+        public GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData) {
             return null;
         }
 
-        public GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName)  {
+        public GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName) {
             return null;
         }
 
@@ -160,11 +160,11 @@
         }
     };
     private ServiceReferenceBuilder serviceReferenceBuilder = new ServiceReferenceBuilder() {
-                                        //it could return a Service or a Reference, we don't care
-                                        public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) {
-                                            return null;
-                                        }
-                                    };
+        //it could return a Service or a Reference, we don't care
+        public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) {
+            return null;
+        }
+    };
     private ObjectName configurationManagerName;
 
 
@@ -185,7 +185,7 @@
             kernel.startGBean(configurationManagerName);
 
             rarFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear-noger.ear"));
-            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, null, connectionTrackerName, null, null, null, null, null, ejbReferenceBuilder, null, new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel), resourceReferenceBuilder, null, serviceReferenceBuilder, kernel);
+            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment, null, connectionTrackerName, null, null, null, null, null, ejbReferenceBuilder, null, new ConnectorModuleBuilder(defaultEnvironment, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel), resourceReferenceBuilder, null, serviceReferenceBuilder, kernel);
             File tempDir = null;
             try {
                 tempDir = DeploymentUtil.createTempDir();
@@ -312,7 +312,7 @@
         String resourceAdapterName = "testRA";
         //N.B. short version of getComponentName
         ObjectName connectionTrackerName = NameFactory.getComponentName(null, null, null, null, "ConnectionTracker", ConnectionTrackingCoordinatorGBean.GBEAN_INFO.getJ2eeType(), j2eeContext);
-                //new ObjectName("test:J2EEServer=bar,J2EEModule=org/apache/geronimo/j2ee/deployment/test,service=ConnectionTracker");
+        //new ObjectName("test:J2EEServer=bar,J2EEModule=org/apache/geronimo/j2ee/deployment/test,service=ConnectionTracker");
 
         Kernel kernel = KernelFactory.newInstance().createKernel("foo");
         try {
@@ -327,7 +327,7 @@
             kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
             kernel.startGBean(configurationManagerName);
 
-            ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel);
+            ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultEnvironment, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel);
             File rarFile = action.getRARFile();
 
             ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
@@ -355,8 +355,8 @@
                         null,
                         null,
                         null, new RefContext(ejbReferenceBuilder,
-                                moduleBuilder,
-                                serviceReferenceBuilder, kernel));
+                        moduleBuilder,
+                        serviceReferenceBuilder, kernel));
 
                 action.install(moduleBuilder, earContext, module);
                 earContext.getClassLoader(null);
@@ -395,9 +395,10 @@
             kernel.startGBean(configurationManagerName);
             ConfigurationManager configurationManager = (ConfigurationManager) kernel.getProxyManager().createProxy(configurationManagerName, ConfigurationManager.class);
 
-            configurationManager.load(defaultParentId[0]);
-            configurationManager.loadGBeans(defaultParentId[0]);
-            configurationManager.start(defaultParentId[0]);
+            Artifact parentID = (Artifact) defaultEnvironment.getImports().iterator().next();
+            configurationManager.load(parentID);
+            configurationManager.loadGBeans(parentID);
+            configurationManager.start(parentID);
 
             ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeContext.getJ2eeDomainName() + ":name=ServerInfo");
             GBeanData serverInfoGBean = new GBeanData(serverInfoObjectName, BasicServerInfo.GBEAN_INFO);
@@ -417,7 +418,7 @@
             config.setAttribute("baseURL", unpackedDir.toURL());
             kernel.loadGBean(config, cl);
             kernel.startGBean(configName);
-            kernel.invoke(configName, "loadGBeans", new Object[] {null}, new String[] {ManageableAttributeStore.class.getName()});
+            kernel.invoke(configName, "loadGBeans", new Object[]{null}, new String[]{ManageableAttributeStore.class.getName()});
             kernel.invoke(configName, "startRecursiveGBeans");
             Set gb = kernel.listGBeans(JMXUtil.getObjectName("test:*"));
             for (Iterator iterator = gb.iterator(); iterator.hasNext();) {
@@ -474,7 +475,6 @@
                 assertEquals(10, attributes3.size());
             }
 
-
             // FirstTestOutboundConnectionFactory
             ObjectName firstConnectionManagerFactory = NameFactory.getComponentName(null, null, null, null, null, "FirstTestOutboundConnectionFactory", NameFactory.JCA_CONNECTION_MANAGER, j2eeContext);
             assertRunning(kernel, firstConnectionManagerFactory);
@@ -560,7 +560,8 @@
 
     protected void setUp() throws Exception {
         configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
-        defaultParentId = new Artifact[] {Artifact.create("org/apache/geronimo/Server")};
+        defaultEnvironment = new Environment();
+        defaultEnvironment.getImports().add(Artifact.create("org/apache/geronimo/Server"));
     }
 
     private abstract class InstallAction {
@@ -597,8 +598,7 @@
         }
 
         public ObjectName loadConfiguration(Artifact configId) throws NoSuchConfigException, IOException, InvalidConfigException {
-            ObjectName configurationObjectName = null;
-                configurationObjectName = Configuration.getConfigurationObjectName(configId);
+            ObjectName configurationObjectName = Configuration.getConfigurationObjectName(configId);
             GBeanData configData = new GBeanData(configurationObjectName, Configuration.GBEAN_INFO);
             configData.setAttribute("id", configId);
             Map nameKeys = new HashMap();
@@ -641,7 +641,7 @@
             GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(MockConfigStore.class, NameFactory.CONFIGURATION_STORE);
             infoBuilder.addInterface(ConfigurationStore.class);
             infoBuilder.addAttribute("kernel", Kernel.class, false);
-            infoBuilder.setConstructor(new String[] {"kernel"});
+            infoBuilder.setConstructor(new String[]{"kernel"});
             GBEAN_INFO = infoBuilder.getBeanInfo();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java (original)
+++ geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java Sat Feb 11 21:51:39 2006
@@ -113,8 +113,8 @@
             childIDs[j] = (String)objectNames.get(j+1);
         }
 
-        TargetModuleIDImpl moduleID = new TargetModuleIDImpl(target, parentName.toString(), childIDs);
-        if(isWebApp(kernel, parentName.toString())) {
+        TargetModuleIDImpl moduleID = new TargetModuleIDImpl(target, parentName, childIDs);
+        if(isWebApp(kernel, parentName)) {
             moduleID.setType(ModuleType.WAR);
         }
         if(moduleID.getChildTargetModuleID() != null) {

Modified: geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java (original)
+++ geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java Sat Feb 11 21:51:39 2006
@@ -22,6 +22,7 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
@@ -74,7 +75,7 @@
                 for (int i = 0; i < modules.length; i++) {
                     TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];
 
-                    URI configID = URI.create(module.getModuleID());
+                    Artifact configID = Artifact.create(module.getModuleID());
                     ObjectName configName = Configuration.getConfigurationObjectName(configID);
                     try {
                         kernel.stopGBean(configName);
@@ -108,7 +109,7 @@
 
                     List list = configurationManager.loadRecursive(configID);
                     for (int j = 0; j < list.size(); j++) {
-                        URI name = (URI) list.get(j);
+                        Artifact name = (Artifact) list.get(j);
                         configurationManager.loadGBeans(name);
                         configurationManager.start(name);
                         updateStatus("Started " + name);

Modified: geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java (original)
+++ geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java Sat Feb 11 21:51:39 2006
@@ -17,24 +17,19 @@
 
 package org.apache.geronimo.deployment.plugin.local;
 
-import java.net.URI;
-import java.util.List;
-import java.util.Set;
-import java.util.ArrayList;
-import java.util.Iterator;
-import javax.enterprise.deploy.shared.CommandType;
-import javax.enterprise.deploy.shared.ModuleType;
-import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
-
-import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.shared.ModuleType;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import java.util.List;
 
 /**
  *
@@ -59,7 +54,7 @@
                     TargetModuleID module = modules[i];
 
                     // Check to see whether the module is already started
-                    URI moduleID = URI.create(module.getModuleID());
+                    Artifact moduleID = Artifact.create(module.getModuleID());
                     try {
                         if(kernel.getGBeanState(Configuration.getConfigurationObjectName(moduleID)) == State.RUNNING_INDEX) {
                             updateStatus("Module "+moduleID+" is already running");
@@ -74,7 +69,7 @@
                     // Load and start the module
                     List list = configurationManager.loadRecursive(moduleID);
                     for (int j = 0; j < list.size(); j++) {
-                        URI name = (URI) list.get(j);
+                        Artifact name = (Artifact) list.get(j);
                         configurationManager.loadGBeans(name);
                         configurationManager.start(name);
                         String configName = name.toString();

Modified: geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StopCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StopCommand.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StopCommand.java (original)
+++ geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StopCommand.java Sat Feb 11 21:51:39 2006
@@ -17,21 +17,14 @@
 
 package org.apache.geronimo.deployment.plugin.local;
 
-import java.net.URI;
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.enterprise.deploy.shared.CommandType;
-import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.management.ObjectName;
-
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
-import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.spi.TargetModuleID;
 
 /**
  * @version $Rev$ $Date$
@@ -52,7 +45,7 @@
             try {
                 for (int i = 0; i < modules.length; i++) {
                     TargetModuleID module = modules[i];
-                    URI moduleID = URI.create(module.getModuleID());
+                    Artifact moduleID = Artifact.create(module.getModuleID());
                     try {
                         configurationManager.stop(moduleID);
                     } catch (InvalidConfigException e) {

Modified: geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/UndeployCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/UndeployCommand.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/UndeployCommand.java (original)
+++ geronimo/branches/configid/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/UndeployCommand.java Sat Feb 11 21:51:39 2006
@@ -16,22 +16,21 @@
  */
 package org.apache.geronimo.deployment.plugin.local;
 
-import java.net.URI;
-
-import javax.enterprise.deploy.shared.CommandType;
-import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.management.ObjectName;
-
 import org.apache.geronimo.deployment.plugin.TargetImpl;
 import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
-import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
-import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.InternalKernelException;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.management.ObjectName;
+import java.net.URI;
 
 /**
  * @version $Rev$ $Date$
@@ -54,7 +53,7 @@
                 for (int i = 0; i < modules.length; i++) {
                     TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];
 
-                    URI moduleID = URI.create(module.getModuleID());
+                    Artifact moduleID = Artifact.create(module.getModuleID());
                     try {
                         try {
                             configurationManager.stop(moduleID);

Modified: geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java (original)
+++ geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java Sat Feb 11 21:51:39 2006
@@ -46,7 +46,7 @@
     private final Set nonOverrideableClasses = new HashSet();
 
     private boolean inverseClassloading;
-    private boolean suppressDefaultParentId;
+    private boolean suppressDefaultEnvironment;
 
     public Environment() {
     }
@@ -158,11 +158,11 @@
         this.inverseClassloading = inverseClassloading;
     }
 
-    public boolean isSuppressDefaultParentId() {
-        return suppressDefaultParentId;
+    public boolean isSuppressDefaultEnvironment() {
+        return suppressDefaultEnvironment;
     }
 
-    public void setSuppressDefaultParentId(boolean suppressDefaultParentId) {
-        this.suppressDefaultParentId = suppressDefaultParentId;
+    public void setSuppressDefaultEnvironment(boolean suppressDefaultEnvironment) {
+        this.suppressDefaultEnvironment = suppressDefaultEnvironment;
     }
 }

Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java Sat Feb 11 21:51:39 2006
@@ -33,15 +33,22 @@
  * @version $Rev$ $Date$
  */
 public class AppClientModule extends Module {
+    private final Environment clientEnvironment;
     private JarFile earFile;
     private Collection resourceModules;
 
-    public AppClientModule(boolean standAlone, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) throws DeploymentException {
-        super(standAlone, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+
+    public AppClientModule(boolean standAlone, Environment serverEnvironment, Environment clientEnvironment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) throws DeploymentException {
+        super(standAlone, serverEnvironment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+        this.clientEnvironment = clientEnvironment;
     }
 
     public ConfigurationModuleType getType() {
         return ConfigurationModuleType.CAR;
+    }
+
+    public Environment getClientEnvironment() {
+        return clientEnvironment;
     }
 
     public JarFile getEarFile() {

Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Sat Feb 11 21:51:39 2006
@@ -30,7 +30,6 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.jar.JarFile;
@@ -91,7 +90,7 @@
     private final ResourceReferenceBuilder resourceReferenceBuilder;
     private final ServiceReferenceBuilder serviceReferenceBuilder;
 
-    private final List defaultParentId;
+    private final Environment defaultEnvironment;
     private final ObjectName transactionContextManagerObjectName;
     private final ObjectName connectionTrackerObjectName;
     private final ObjectName transactionalTimerObjectName;
@@ -100,10 +99,10 @@
     private static final String DEFAULT_GROUPID = "defaultGroupId";
 
 
-    public EARConfigBuilder(Artifact[] defaultParentId, ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName nonTransactionalTimerObjectName, ObjectName corbaGBeanObjectName, Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder, ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder resourceReferenceBuilder, ModuleBuilder appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder, Kernel kernel) {
+    public EARConfigBuilder(Environment defaultEnvironment, ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName nonTransactionalTimerObjectName, ObjectName corbaGBeanObjectName, Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder, ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder resourceReferenceBuilder, ModuleBuilder appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder, Kernel kernel) {
         this.kernel = kernel;
         this.repository = repository;
-        this.defaultParentId = defaultParentId == null ? Collections.EMPTY_LIST : Arrays.asList(defaultParentId);
+        this.defaultEnvironment = defaultEnvironment;
 
         this.ejbConfigBuilder = ejbConfigBuilder;
         this.ejbReferenceBuilder = ejbReferenceBuilder;
@@ -210,10 +209,7 @@
         }
 
         EnvironmentType environmentType = gerApplication.getEnvironment();
-        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType);
-        if (!environment.isSuppressDefaultParentId()) {
-            environment.addImports(defaultParentId);
-        }
+        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
         // get the modules either the application plan or for a stand alone module from the specific deployer
         // todo change module so you can extract the real module path back out.. then we can eliminate
         // the moduleLocations and have addModules return the modules
@@ -694,7 +690,7 @@
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigBuilder.class, NameFactory.CONFIG_BUILDER);
-        infoFactory.addAttribute("defaultParentId", Artifact[].class, true, true);
+        infoFactory.addAttribute("defaultEnvironment", Environment.class, true, true);
         infoFactory.addAttribute("transactionContextManagerObjectName", ObjectName.class, true);
         infoFactory.addAttribute("connectionTrackerObjectName", ObjectName.class, true);
         infoFactory.addAttribute("transactionalTimerObjectName", ObjectName.class, true);
@@ -715,7 +711,7 @@
         infoFactory.addInterface(ConfigurationBuilder.class);
 
         infoFactory.setConstructor(new String[]{
-            "defaultParentId",
+            "defaultEnvironment",
             "transactionContextManagerObjectName",
             "connectionTrackerObjectName",
             "transactionalTimerObjectName",

Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java Sat Feb 11 21:51:39 2006
@@ -16,14 +16,6 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import java.io.File;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.List;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.Environment;
@@ -33,6 +25,12 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/NamingContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/NamingContext.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/NamingContext.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/NamingContext.java Sat Feb 11 21:51:39 2006
@@ -16,14 +16,13 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import java.util.Set;
-import java.net.URI;
-
-import javax.management.ObjectName;
-
-import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.management.ObjectName;
+import java.util.Set;
 
 /**
  * @version $Rev$ $Date$
@@ -40,6 +39,6 @@
 
     GBeanData getGBeanInstance(ObjectName name) throws GBeanNotFoundException;
 
-    URI getConfigID();
+    Artifact getConfigID();
 
 }

Modified: geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java Sat Feb 11 21:51:39 2006
@@ -23,6 +23,7 @@
 import junit.framework.TestSuite;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -79,12 +80,13 @@
     private static final ObjectName connectionTrackerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ConnectionTracker");
     private static final ObjectName transactionalTimerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ThreadPooledTimer,name=TransactionalThreaPooledTimer");
     private static final ObjectName nonTransactionalTimerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ThreadPooledTimer,name=NonTransactionalThreaPooledTimer");
-    private Artifact[] defaultParentId;
+    private Environment defaultParentId;
     private static String contextRoot = "test";
     private static final Map portMap = null;
 
     protected void setUp() throws Exception {
-        defaultParentId = new Artifact[] {new Artifact("geronimo", "test", "1", "car", true)};
+        defaultParentId = new Environment();
+        defaultParentId.getImports().add(new Artifact("geronimo", "test", "1", "car", true));
     }
 
     public static Test suite() throws Exception {

Modified: geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockNamingContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockNamingContext.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockNamingContext.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockNamingContext.java Sat Feb 11 21:51:39 2006
@@ -24,6 +24,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.deployment.GBeanDataRegistry;
 
 /**
@@ -58,7 +59,7 @@
         return gbeans.getGBeanInstance(name);
     }
 
-    public URI getConfigID() {
-        return URI.create("MockNamingContextID");
+    public Artifact getConfigID() {
+        return new Artifact("groupId", "MockNamingContextID", "1", "car", true);
     }
 }

Modified: geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java Sat Feb 11 21:51:39 2006
@@ -66,11 +66,11 @@
         GERONIMO_SCHEMA_CONVERSIONS.put("default-principal", new NamespaceElementConverter(GERONIMO_SECURITY_NAMESPACE));
 
         GERONIMO_SCHEMA_CONVERSIONS.put("gbean", new GBeanElementConverter());
-        GERONIMO_SCHEMA_CONVERSIONS.put("import", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
-        GERONIMO_SCHEMA_CONVERSIONS.put("hidden-classes", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
-        GERONIMO_SCHEMA_CONVERSIONS.put("non-overridable-classes", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
-        GERONIMO_SCHEMA_CONVERSIONS.put("dependency", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
-        GERONIMO_SCHEMA_CONVERSIONS.put("include", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
+        GERONIMO_SCHEMA_CONVERSIONS.put("environment", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
+//        GERONIMO_SCHEMA_CONVERSIONS.put("hidden-classes", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
+//        GERONIMO_SCHEMA_CONVERSIONS.put("non-overridable-classes", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
+//        GERONIMO_SCHEMA_CONVERSIONS.put("dependency", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
+//        GERONIMO_SCHEMA_CONVERSIONS.put("include", new NamespaceElementConverter(GERONIMO_SERVICE_NAMESPACE));
     }
 
     private SchemaConversionUtils() {
@@ -425,7 +425,7 @@
         } finally {
             cursor.dispose();
         }
-        throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "/n" + xmlObject);
+        throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "\n" + xmlObject);
     }
 
 

Modified: geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml Sat Feb 11 21:51:39 2006
@@ -1,9 +1,14 @@
 <?xml version="1.0"?>
 
-<openejb-jar configId="org/openejb/Itests" parentId="org/apache/geronimo/DefaultDatabase" xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
-    <dep:dependency>
-        <dep:uri>junit/jars/junit-3.8.jar</dep:uri>
-    </dep:dependency>
+<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+    <dep:environment>
+        <dep:configId>
+            <dep:groupId>test</dep:groupId>
+            <dep:type>car</dep:type>
+            <dep:artifactId>testclient</dep:artifactId>
+            <dep:version>1</dep:version>
+        </dep:configId>
+    </dep:environment>
     <nam:cmp-connection-factory>
         <nam:application>null</nam:application>
         <nam:module>org/apache/geronimo/DefaultDatabase</nam:module>

Modified: geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml Sat Feb 11 21:51:39 2006
@@ -1,13 +1,16 @@
 <?xml version="1.0"?>
 
 <openejb-jar
-    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
-    configId="org/openejb/Itests"
-    parentId="org/apache/geronimo/DefaultDatabase">
+    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
 
-    <dependency>
-        <uri>junit/jars/junit-3.8.jar</uri>
-    </dependency>
+    <environment>
+        <configId>
+            <groupId>test</groupId>
+            <type>car</type>
+            <artifactId>testclient</artifactId>
+            <version>1</version>
+        </configId>
+    </environment>
 
     <cmp-connection-factory>
         <application>null</application>

Modified: geronimo/branches/configid/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java Sat Feb 11 21:51:39 2006
@@ -371,8 +371,9 @@
         XmlCursor cursor = xmlObject.newCursor();
         try {
             SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
-            //        System.out.println(xmlObject.toString());
+                    System.out.println(xmlObject.toString());
             XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+            System.out.println(expected.toString());
             List problems = new ArrayList();
             boolean ok = compareXmlObjects(xmlObject, expected, problems);
             assertTrue("Differences: " + problems, ok);
@@ -389,7 +390,7 @@
 //        URL expectedOutputXml = classLoader.getResource("geronimo/ejb-naming-post.xml");
         XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
         //this is not a usable type, we'll see what happens though
-        xmlObject = SchemaConversionUtils.getNestedObjectAsType(xmlObject, new QName("http://www.openejb.org/xml/ns/openejb-jar-2.0", "openejb-jar"), EjbJarType.type);
+        xmlObject = SchemaConversionUtils.getNestedObjectAsType(xmlObject, new QName("http://www.openejb.org/xml/ns/openejb-jar-2.1", "openejb-jar"), EjbJarType.type);
 //	        System.out.println(xmlObject.toString());
     }
 

Modified: geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Sat Feb 11 21:51:39 2006
@@ -21,10 +21,12 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.xbeans.ClassFilterType;
-import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
+import org.apache.geronimo.deployment.xbeans.EnvironmentType;
+import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.Environment;
 import org.apache.geronimo.gbean.GBeanData;
@@ -46,6 +48,7 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
 import org.apache.geronimo.schema.SchemaConversionUtils;
@@ -134,7 +137,7 @@
  */
 public class JettyModuleBuilder extends AbstractWebModuleBuilder {
     private final static Log log = LogFactory.getLog(JettyModuleBuilder.class);
-    private final List defaultParentId;
+    private final Environment defaultEnvironment;
     private final ObjectName jettyContainerObjectName;
     private final Collection defaultServlets;
     private final Collection defaultFilters;
@@ -149,9 +152,9 @@
 
     private final Repository repository;
     private final Kernel kernel;
-    private static final String JETTY_NAMESPACE = JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI();//GerConnectorDocument.type.getDocumentElementName().getNamespaceURI();
+    private static final String JETTY_NAMESPACE = JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI();
 
-    public JettyModuleBuilder(URI[] defaultParentId,
+    public JettyModuleBuilder(Environment defaultEnvironment,
                               Integer defaultSessionTimeoutSeconds,
                               boolean defaultContextPriorityClassloader,
                               List defaultWelcomeFiles,
@@ -163,8 +166,7 @@
                               WebServiceBuilder webServiceBuilder,
                               Repository repository,
                               Kernel kernel) throws GBeanNotFoundException {
-        this.defaultParentId = defaultParentId == null ? Collections.EMPTY_LIST : Arrays.asList(defaultParentId);
-
+        this.defaultEnvironment = defaultEnvironment;
         this.defaultSessionTimeoutSeconds = (defaultSessionTimeoutSeconds == null) ? new Integer(30 * 60) : defaultSessionTimeoutSeconds;
         this.defaultContextPriorityClassloader = defaultContextPriorityClassloader;
         this.jettyContainerObjectName = jettyContainerObjectName;
@@ -239,6 +241,9 @@
             }
         }
 
+        EnvironmentType environmentType = jettyWebApp.getEnvironment();
+        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+
         Map servletNameToPathMap = buildServletNameToPathMap(webApp, contextRoot);
 
         //look for a webservices dd
@@ -250,19 +255,7 @@
             //no descriptor
         }
 
-        // get the ids from either the application plan or for a stand alone module from the specific deployer
-        URI configId = null;
-        try {
-            configId = new URI(jettyWebApp.getConfigId());
-        } catch (URISyntaxException e) {
-            throw new DeploymentException("Invalid configId " + jettyWebApp.getConfigId(), e);
-        }
-
-        List parentId = ServiceConfigBuilder.toArtifacts(jettyWebApp.getParentId(), jettyWebApp.getImportArray());
-        if (parentId.isEmpty()) {
-            parentId = new ArrayList(defaultParentId);
-        }
-        WebModule module = new WebModule(standAlone, configId, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, portMap, JETTY_NAMESPACE);
+        WebModule module = new WebModule(standAlone, environment, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, portMap, JETTY_NAMESPACE);
         return module;
     }
 
@@ -364,7 +357,19 @@
         JettyWebAppType jettyWebApp = JettyWebAppType.Factory.newInstance();
 
         // set the parentId, configId and context root
-        jettyWebApp.setConfigId(contextRoot);
+//        Environment environment = new Environment();
+//        EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
+//        Artifact artifact = environment.getConfigId();
+//        artifact.setArtifactId(contextRoot);
+        //TODO broken, perhaps need a reverse env. builder
+//        jettyWebApp.setEnvironment(environment);
+        EnvironmentType environmentType = jettyWebApp.addNewEnvironment();
+        ArtifactType artifact = environmentType.addNewConfigId();
+        //TODO this version is incomplete.
+        artifact.setGroupId("unknown");
+        artifact.setArtifactId(contextRoot);
+        artifact.setVersion("1");
+        artifact.setType("car");
         jettyWebApp.setContextRoot(contextRoot);
         jettyWebApp.setContextPriorityClassloader(defaultContextPriorityClassloader);
         return jettyWebApp;
@@ -373,7 +378,6 @@
     public void installModule(JarFile earFile, EARContext earContext, Module module) throws DeploymentException {
         JettyWebAppType jettyWebApp = (JettyWebAppType) module.getVendorDD();
 
-        earContext.addParentId(defaultParentId);
         try {
             URI baseDir = URI.create(module.getTargetPath() + "/");
 
@@ -395,24 +399,12 @@
             // and the url class loader will not pick up a manifest from an unpacked dir
             earContext.addManifestClassPath(warFile, URI.create(module.getTargetPath()));
 
-            // add the dependencies declared in the geronimo-web.xml file
-            DependencyType[] dependencies = jettyWebApp.getDependencyArray();
-            ServiceConfigBuilder.addDependencies(earContext, dependencies, repository);
         } catch (IOException e) {
             throw new DeploymentException("Problem deploying war", e);
         } catch (URISyntaxException e) {
             throw new DeploymentException("Could not construct URI for location of war entry", e);
         }
 
-        if (jettyWebApp.isSetInverseClassloading()) {
-            earContext.setInverseClassloading(jettyWebApp.getInverseClassloading());
-        }
-
-        ClassFilterType[] filters = jettyWebApp.getHiddenClassesArray();
-        ServiceConfigBuilder.addHiddenClasses(earContext, filters);
-
-        filters = jettyWebApp.getNonOverridableClassesArray();
-        ServiceConfigBuilder.addNonOverridableClasses(earContext, filters);
     }
 
     public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
@@ -1400,7 +1392,7 @@
 
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JettyModuleBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addAttribute("defaultParentId", URI[].class, true, true);
+        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
         infoBuilder.addAttribute("defaultSessionTimeoutSeconds", Integer.class, true, true);
         infoBuilder.addAttribute("defaultContextPriorityClassloader", boolean.class, true, true);
         infoBuilder.addAttribute("defaultWelcomeFiles", List.class, true, true);
@@ -1415,7 +1407,7 @@
         infoBuilder.addInterface(ModuleBuilder.class);
 
         infoBuilder.setConstructor(new String[]{
-            "defaultParentId",
+            "defaultEnvironment",
             "defaultSessionTimeoutSeconds",
             "defaultContextPriorityClassloader",
             "defaultWelcomeFiles",

Modified: geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml Sat Feb 11 21:51:39 2006
@@ -17,9 +17,17 @@
 -->
 
 <jetty:web-app
-    xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
-    configId="org/apache/geronimo/jetty/Test"
-    >
+    xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
+    <environment>
+        <configId>
+            <groupId>foo</groupId>
+            <type>car</type>
+            <artifactId>bar</artifactId>
+            <version>1</version>
+        </configId>
+        <classLoader></classLoader>
+    </environment>
+
     <jetty:context-root>/test</jetty:context-root>
     <jetty:context-priority-classloader>false</jetty:context-priority-classloader>
     <!--

Modified: geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml?rev=377136&r1=377135&r2=377136&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml Sat Feb 11 21:51:39 2006
@@ -17,10 +17,18 @@
 -->
 
 <web-app
-    xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
-    xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
-    configId="org/apache/geronimo/test">
-
+    xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+    xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1">
+    <environment>
+        <configId>
+            <groupId>foo</groupId>
+            <type>car</type>
+            <artifactId>bar</artifactId>
+            <version>1</version>
+        </configId>
+        <classLoader></classLoader>
+    </environment>
+                                                              
     <context-root>/test</context-root>
     <context-priority-classloader>false</context-priority-classloader>
     <login-domain-name>demo-properties-realm</login-domain-name>



Mime
View raw message