geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: rev 47518 - in geronimo/trunk/modules/client-builder/src: java/org/apache/geronimo/client/builder schema test-resources/plans test/org/apache/geronimo/client/builder
Date Wed, 29 Sep 2004 23:34:13 GMT
Author: dain
Date: Wed Sep 29 16:34:12 2004
New Revision: 47518

Modified:
   geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
   geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd
   geronimo/trunk/modules/client-builder/src/test-resources/plans/plan1.xml
   geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml
   geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
Log:
Added explicit clientConfigId and clientParentId


Modified: geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
==============================================================================
--- geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Wed Sep 29 16:34:12 2004
@@ -83,7 +83,7 @@
     private final Repository repository;
     private final ConfigurationStore store;
 
-    private static final URI PARENT_ID = URI.create("org/apache/geronimo/Client");
+    private static final URI CLIENT_PARENT_ID = URI.create("org/apache/geronimo/Client");
     private final String clientDomainName = "geronimo.client";
     private final String clientServerName = "client";
     private final String clientApplicationName = "client-application";
@@ -222,6 +222,7 @@
             id = appClient.getId();
         }
         geronimoAppClient.setConfigId(id);
+        geronimoAppClient.setClientConfigId(id + "-client");
         return geronimoAppClient;
     }
 
@@ -314,11 +315,17 @@
                     }
                 };
 
-                URI configId = URI.create(geronimoAppClient.getConfigId());
+                URI configId = URI.create(geronimoAppClient.getClientConfigId());
+                URI parentId;
+                if (geronimoAppClient.isSetParentId()) {
+                    parentId = URI.create(geronimoAppClient.getParentId());
+                } else {
+                    parentId = CLIENT_PARENT_ID;
+                }
                 appClientDeploymentContext = new EARContext(jos,
                         configId,
                         ConfigurationModuleType.APP_CLIENT,
-                        PARENT_ID,
+                        parentId,
                         kernel,
                         clientDomainName,
                         clientServerName,

Modified: geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd
==============================================================================
--- geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd	(original)
+++ geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd	Wed Sep
29 16:34:12 2004
@@ -59,6 +59,8 @@
 
         <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/trunk/modules/client-builder/src/test-resources/plans/plan1.xml
==============================================================================
--- geronimo/trunk/modules/client-builder/src/test-resources/plans/plan1.xml	(original)
+++ geronimo/trunk/modules/client-builder/src/test-resources/plans/plan1.xml	Wed Sep 29 16:34:12
2004
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
+    clientConfigId="test-client"
     configId="client"
     parentId="org/apache/geronimo/DefaultDatabase">
     <resource-ref>

Modified: geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml
==============================================================================
--- geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml	(original)
+++ geronimo/trunk/modules/client-builder/src/test-resources/plans/plan2.xml	Wed Sep 29 16:34:12
2004
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
+    clientConfigId="test-client"
     configId="client"
     parentId="org/apache/geronimo/DefaultDatabase">
     <resource-ref>

Modified: geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
==============================================================================
--- geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
(original)
+++ geronimo/trunk/modules/client-builder/src/test/org/apache/geronimo/client/builder/PlanParsingTest.java
Wed Sep 29 16:34:12 2004
@@ -25,6 +25,7 @@
     public void testConstructPlan() throws Exception {
         GerApplicationClientDocument appClientDoc = GerApplicationClientDocument.Factory.newInstance();
         GerApplicationClientType appClient = appClientDoc.addNewApplicationClient();
+        appClient.setClientConfigId("clientConfigId");
         appClient.setConfigId("configId");
         appClient.setParentId("parentId");
         GerLocalRefType ref = appClient.addNewResourceRef();

Mime
View raw message