geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r123366 - in geronimo/trunk/modules: assembly/src/plan axis/src/test/org/apache/geronimo/axis axis/src/test/org/apache/geronimo/axis/preconditions client-builder client-builder/src/java/org/apache/geronimo/client/builder client-builder/src/schema connector-builder connector-builder/src/java/org/apache/geronimo/connector/deployment connector-builder/src/schema connector-builder/src/test/org/apache/geronimo/connector/deployment j2ee-builder j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment j2ee-builder/src/schema j2ee-builder/src/test-unpacked-ear/META-INF j2ee-schema/src/java/org/apache/geronimo/schema jetty-builder jetty-builder/src/java/org/apache/geronimo/jetty/deployment jetty-builder/src/schema jetty-builder/src/test/org/apache/geronimo/jetty/deployment service-builder/src/java/org/apache/geronimo/deployment/service service-builder/src/schema
Date Sun, 26 Dec 2004 20:20:15 GMT
Author: djencks
Date: Sun Dec 26 12:20:14 2004
New Revision: 123366

URL: http://svn.apache.org/viewcvs?view=rev&rev=123366
Log:
replace use of GBeanAdaptors with namespaced elements
Removed:
   geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientGBeanAdapter.java
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARGBeanAdapter.java
   geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/GerGBeanAdapter.java
   geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyGBeanAdapter.java
   geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanAdapter.java
   geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanDefault.java
   geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanHelper.java
   geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceGBeanAdapter.java
Modified:
   geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml
   geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
   geronimo/trunk/modules/client-builder/project.xml
   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/connector-builder/project.xml
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
   geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd
   geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
   geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
   geronimo/trunk/modules/j2ee-builder/project.xml
   geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
   geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd
   geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
   geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
   geronimo/trunk/modules/jetty-builder/project.xml
   geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
   geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd
   geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
   geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
   geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
   geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd
   geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd

Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml&r1=123365&p2=geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml	(original)
+++ geronimo/trunk/modules/assembly/src/plan/j2ee-deployer-plan.xml	Sun Dec 26 12:20:14 2004
@@ -170,6 +170,7 @@
         <attribute name="defaultWelcomeFiles">index.html,index.htm,index.jsp</attribute>
         <attribute name="jettyContainerObjectName">geronimo.server:type=WebContainer,container=Jetty</attribute>
         <attribute name="defaultServlets">geronimo.deployer:role=DefaultServlet,config=org/apache/geronimo/J2EEDeployer,*</attribute>
+        <reference name="Repository">*:role=Repository,*</reference>
     </gbean>
 
 <!--
@@ -223,6 +224,7 @@
     <gbean name="geronimo.deployer:role=ModuleBuilder,type=EJB,config=org/apache/geronimo/J2EEDeployer" class="org.openejb.deployment.OpenEJBModuleBuilder">
         <attribute name="defaultParentId">org/apache/geronimo/Server</attribute>
 <!--        <reference name="SkeletonGenerator">openejb.CORBA:type=SkeletonGenerator,vendor=OpenORB</reference>-->
+        <reference name="Repository">*:role=Repository,*</reference>
     </gbean>
 
     <gbean name="geronimo.deployer:role=ClientEJBReferenceBuilder,config=org/apache/geronimo/J2EEDeployer" class="org.openejb.deployment.RemoteEJBReferenceBuilder">
@@ -236,6 +238,7 @@
         <attribute name="defaultIdleTimeoutMinutes" type="int">15</attribute>
         <attribute name="defaultXATransactionCaching" type="boolean">true</attribute>
         <attribute name="defaultXAThreadCaching" type="boolean">false</attribute>
+        <reference name="Repository">*:role=Repository,*</reference>
     </gbean>
 
     <gbean name="geronimo.deployer:role=ModuleBuilder,type=AppClient,config=org/apache/geronimo/J2EEDeployer" class="org.apache.geronimo.client.builder.AppClientModuleBuilder">

Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml&r1=123365&p2=geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml	(original)
+++ geronimo/trunk/modules/assembly/src/plan/j2ee-runtime-deployer-plan.xml	Sun Dec 26 12:20:14 2004
@@ -95,6 +95,7 @@
         <attribute name="defaultWelcomeFiles">index.html,index.htm,index.jsp</attribute>
         <attribute name="jettyContainerObjectName">geronimo.server:type=WebContainer,container=Jetty</attribute>
         <attribute name="defaultServlets">geronimo.deployer:role=DefaultServlet,config=org/apache/geronimo/RuntimeDeployer,*</attribute>
+        <reference name="Repository">*:role=Repository,*</reference>
     </gbean>
 
     <gbean name="geronimo.deployer:role=DefaultServlet,config=org/apache/geronimo/RuntimeDeployer,name=StaticContent" class="org.apache.geronimo.jetty.JettyServletHolder">
@@ -125,6 +126,7 @@
     <gbean name="geronimo.deployer:role=ModuleBuilder,type=EJB,config=org/apache/geronimo/RuntimeDeployer" class="org.openejb.deployment.OpenEJBModuleBuilder">
         <attribute name="defaultParentId">org/apache/geronimo/Server</attribute>
 <!--        <reference name="SkeletonGenerator">openejb.CORBA:type=SkeletonGenerator,vendor=OpenORB</reference>-->
+        <reference name="Repository">*:role=Repository,*</reference>
     </gbean>
 
     <gbean name="geronimo.deployer:role=ClientEJBReferenceBuilder,config=org/apache/geronimo/RuntimeDeployer" class="org.openejb.deployment.RemoteEJBReferenceBuilder"/>
@@ -137,6 +139,7 @@
         <attribute name="defaultIdleTimeoutMinutes" type="int">15</attribute>
         <attribute name="defaultXATransactionCaching" type="boolean">true</attribute>
         <attribute name="defaultXAThreadCaching" type="boolean">false</attribute>
+        <reference name="Repository">*:role=Repository,*</reference>
     </gbean>
 
     <gbean name="geronimo.deployer:role=ModuleBuilder,type=AppClient,config=org/apache/geronimo/RuntimeDeployer" class="org.apache.geronimo.client.builder.AppClientModuleBuilder">

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java?view=diff&rev=123366&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java&r1=123365&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractWebServiceTest.java	Sun Dec 26 12:20:14 2004
@@ -127,7 +127,7 @@
 //        
 //        kernel.loadGBean(AxisGeronimoConstants.EAR_CONF_BUILDER_NAME,moduleBuilder);
 //        
-        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(defaultParentId, null, kernel);
+        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(defaultParentId, null, null, kernel);
         
        EARConfigBuilder earConfigBuilder =
                 new EARConfigBuilder(defaultParentId,

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java?view=diff&rev=123366&p1=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java&r1=123365&p2=geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java	(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java	Sun Dec 26 12:20:14 2004
@@ -72,7 +72,7 @@
         File jarFile = new File(outDir , "echo-jar/echo-ewsimpl.jar");
         
         URI defaultParentId = new URI("org/apache/geronimo/Server");
-        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(defaultParentId, null, kernel);
+        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(defaultParentId, null, null, kernel);
         
         
         EARConfigBuilder earConfigBuilder =

Modified: geronimo/trunk/modules/client-builder/project.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client-builder/project.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/client-builder/project.xml&r1=123365&p2=geronimo/trunk/modules/client-builder/project.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/client-builder/project.xml	(original)
+++ geronimo/trunk/modules/client-builder/project.xml	Sun Dec 26 12:20:14 2004
@@ -64,6 +64,12 @@
         <!-- Module Dependencies -->
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-client</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-common</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>
@@ -141,6 +147,9 @@
             <groupId>geronimo</groupId>
             <artifactId>geronimo-service-builder</artifactId>
             <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
         </dependency>
 
         <dependency>

Deleted: /geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientGBeanAdapter.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientGBeanAdapter.java?view=auto&rev=123365
==============================================================================

Modified: geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?view=diff&rev=123366&p1=geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java&r1=123365&p2=geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java&r2=123366
==============================================================================
--- 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	Sun Dec 26 12:20:14 2004
@@ -33,14 +33,18 @@
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
-import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.client.AppClientContainer;
+import org.apache.geronimo.client.StaticJndiContextPlugin;
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.service.GBeanHelper;
+import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 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.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.deployment.AppClientModule;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder;
@@ -60,8 +64,6 @@
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.xbeans.geronimo.client.GerApplicationClientDocument;
 import org.apache.geronimo.xbeans.geronimo.client.GerApplicationClientType;
-import org.apache.geronimo.xbeans.geronimo.client.GerDependencyType;
-import org.apache.geronimo.xbeans.geronimo.client.GerGbeanType;
 import org.apache.geronimo.xbeans.geronimo.client.GerResourceType;
 import org.apache.geronimo.xbeans.j2ee.ApplicationClientDocument;
 import org.apache.geronimo.xbeans.j2ee.ApplicationClientType;
@@ -198,6 +200,7 @@
             // if we got one extract the validate it otherwise create a default one
             if (gerAppClient != null) {
                 gerAppClient = (GerApplicationClientType) SchemaConversionUtils.convertToGeronimoNamingSchema(gerAppClient);
+                gerAppClient = (GerApplicationClientType) SchemaConversionUtils.convertToGeronimoServiceSchema(gerAppClient);
                 SchemaConversionUtils.validateDD(gerAppClient);
             } else {
                 String path;
@@ -296,20 +299,20 @@
 
         // create a gbean for the app client module and add it to the ear
         ReadOnlyContext componentContext;
-        GBeanMBean appClientModuleGBean = new GBeanMBean(J2EEAppClientModuleImpl.GBEAN_INFO, earClassLoader);
+        GBeanData appClientModuleGBeanData = new GBeanData(appClientModuleName, J2EEAppClientModuleImpl.GBEAN_INFO);
         try {
-            appClientModuleGBean.setReferencePatterns("J2EEServer", Collections.singleton(earContext.getServerObjectName()));
+            appClientModuleGBeanData.setReferencePatterns("J2EEServer", Collections.singleton(earContext.getServerObjectName()));
             if (!earContext.getJ2EEApplicationName().equals("null")) {
-                appClientModuleGBean.setReferencePatterns("J2EEApplication", Collections.singleton(earContext.getApplicationObjectName()));
+                appClientModuleGBeanData.setReferencePatterns("J2EEApplication", Collections.singleton(earContext.getApplicationObjectName()));
             }
-            appClientModuleGBean.setAttribute("deploymentDescriptor", null);
+            appClientModuleGBeanData.setAttribute("deploymentDescriptor", null);
 
             componentContext = buildComponentContext(earContext, appClientModule, appClient, geronimoAppClient, earClassLoader);
-            appClientModuleGBean.setAttribute("componentContext", componentContext);
+            appClientModuleGBeanData.setAttribute("componentContext", componentContext);
         } catch (Exception e) {
             throw new DeploymentException("Unable to initialize AppClientModule GBean", e);
         }
-        earContext.addGBean(appClientModuleName, appClientModuleGBean);
+        earContext.addGBean(appClientModuleGBeanData);
 
         // create another child configuration within the config store for the client application
         EARContext appClientDeploymentContext = null;
@@ -354,34 +357,12 @@
                 }
 
                 // add the includes
-                GerDependencyType[] includes = geronimoAppClient.getIncludeArray();
-                for (int i = 0; i < includes.length; i++) {
-                    GerDependencyType include = includes[i];
-                    URI uri = getDependencyURI(include);
-                    String name = uri.toString();
-                    int idx = name.lastIndexOf('/');
-                    if (idx != -1) {
-                        name = name.substring(idx + 1);
-                    }
-                    URI path;
-                    try {
-                        path = new URI(name);
-                    } catch (URISyntaxException e) {
-                        throw new DeploymentException("Unable to generate path for include: " + uri, e);
-                    }
-                    try {
-                        URL url = repository.getURL(uri);
-                        appClientDeploymentContext.addInclude(path, url);
-                    } catch (IOException e) {
-                        throw new DeploymentException("Unable to add include: " + uri, e);
-                    }
-                }
+                DependencyType[] includes = geronimoAppClient.getIncludeArray();
+                ServiceConfigBuilder.addIncludes(appClientDeploymentContext, includes, repository);
 
                 // add the dependencies
-                GerDependencyType[] dependencies = geronimoAppClient.getDependencyArray();
-                for (int i = 0; i < dependencies.length; i++) {
-                    appClientDeploymentContext.addDependency(getDependencyURI(dependencies[i]));
-                }
+                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);
@@ -391,10 +372,8 @@
 
                 // pop in all the gbeans declared in the geronimo app client file
                 if (geronimoAppClient != null) {
-                    GerGbeanType[] gbeans = geronimoAppClient.getGbeanArray();
-                    for (int i = 0; i < gbeans.length; i++) {
-                        GBeanHelper.addGbean(new AppClientGBeanAdapter(gbeans[i]), appClientClassLoader, appClientDeploymentContext);
-                    }
+                    GbeanType[] gbeans = geronimoAppClient.getGbeanArray();
+                    ServiceConfigBuilder.addGBeans(gbeans, appClientClassLoader, appClientDeploymentContext);
                     //deploy the resource adapters specified in the geronimo-application.xml
                     Collection resourceModules = new ArrayList();
                     try {
@@ -440,28 +419,28 @@
 
                 // add the app client static jndi provider
                 ObjectName jndiContextName = ObjectName.getInstance("geronimo.client:type=StaticJndiContext");
-                GBeanMBean jndiContextGBean = new GBeanMBean("org.apache.geronimo.client.StaticJndiContextPlugin", appClientClassLoader);
+                GBeanData jndiContextGBeanData = new GBeanData(jndiContextName, StaticJndiContextPlugin.GBEAN_INFO);
                 try {
 
                     componentContext = buildComponentContext(appClientDeploymentContext, appClientModule, appClient, geronimoAppClient, earClassLoader);
-                    jndiContextGBean.setAttribute("context", componentContext);
+                    jndiContextGBeanData.setAttribute("context", componentContext);
                 } catch (Exception e) {
                     throw new DeploymentException("Unable to initialize AppClientModule GBean", e);
                 }
-                appClientDeploymentContext.addGBean(jndiContextName, jndiContextGBean);
+                appClientDeploymentContext.addGBean(jndiContextGBeanData);
 
                 // finally add the app client container
                 ObjectName appClienContainerName = ObjectName.getInstance("geronimo.client:type=ClientContainer");
-                GBeanMBean appClienContainerGBean = new GBeanMBean("org.apache.geronimo.client.AppClientContainer", appClientClassLoader);
+                GBeanData appClienContainerGBeanData = new GBeanData(appClienContainerName, AppClientContainer.GBEAN_INFO);
                 try {
-                    appClienContainerGBean.setAttribute("mainClassName", mainClasss);
-                    appClienContainerGBean.setAttribute("appClientModuleName", appClientModuleName);
-                    appClienContainerGBean.setReferencePattern("JNDIContext", new ObjectName("geronimo.client:type=StaticJndiContext"));
-                    appClienContainerGBean.setReferencePattern("TransactionContextManager", new ObjectName("geronimo.client:type=TransactionContextManager"));
+                    appClienContainerGBeanData.setAttribute("mainClassName", mainClasss);
+                    appClienContainerGBeanData.setAttribute("appClientModuleName", appClientModuleName);
+                    appClienContainerGBeanData.setReferencePattern("JNDIContext", new ObjectName("geronimo.client:type=StaticJndiContext"));
+                    appClienContainerGBeanData.setReferencePattern("TransactionContextManager", new ObjectName("geronimo.client:type=TransactionContextManager"));
                 } catch (Exception e) {
                     throw new DeploymentException("Unable to initialize AppClientModule GBean", e);
                 }
-                appClientDeploymentContext.addGBean(appClienContainerName, appClienContainerGBean);
+                appClientDeploymentContext.addGBean(appClienContainerGBeanData);
             } finally {
                 if (appClientDeploymentContext != null) {
                     try {
@@ -572,7 +551,7 @@
     }
 
 
-    private URI getDependencyURI(GerDependencyType dep) throws DeploymentException {
+    private URI getDependencyURI(DependencyType dep) throws DeploymentException {
         URI uri;
         if (dep.isSetUri()) {
             try {

Modified: geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd?view=diff&rev=123366&p1=geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd&r1=123365&p2=geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd&r2=123366
==============================================================================
--- geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd	(original)
+++ geronimo/trunk/modules/client-builder/src/schema/geronimo-application-client.xsd	Sun Dec 26 12:20:14 2004
@@ -21,6 +21,7 @@
     targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/application-client"
     xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
     xmlns:connector="http://geronimo.apache.org/xml/ns/j2ee/connector"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified"
@@ -28,15 +29,14 @@
 
     <xs:import namespace="http://geronimo.apache.org/xml/ns/naming" schemaLocation="../../../naming-builder/src/schema/geronimo-naming.xsd"/>
     <xs:import namespace="http://geronimo.apache.org/xml/ns/j2ee/connector" schemaLocation="../../../connector-builder/src/schema/geronimo-connector_1_5.xsd"/>
-    <!--xs:include schemaLocation="../../../naming-builder/src/schema/geronimo-naming.xsd"/-->
-    <xs:include schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment" schemaLocation="../../../service-builder/src/schema/geronimo-config.xsd"/>
 
     <xs:element name="application-client" type="geronimo:application-clientType"/>
 
     <xs:complexType name="application-clientType">
         <xs:sequence>
-            <xs:element name="include" type="geronimo:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element name="dependency" type="geronimo:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="include" type="sys:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
 
             <!---->
             <!--            <xs:element name="callback-handler"-->
@@ -54,7 +54,7 @@
 
             <xs:element name="resource" type="geronimo:resourceType" minOccurs="0" maxOccurs="unbounded"/>
 
-            <xs:element name="gbean" type="geronimo:gbeanType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
 
         <xs:attribute name="configId" type="xs:string" use="required"/>

Modified: geronimo/trunk/modules/connector-builder/project.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/project.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/connector-builder/project.xml&r1=123365&p2=geronimo/trunk/modules/connector-builder/project.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/connector-builder/project.xml	(original)
+++ geronimo/trunk/modules/connector-builder/project.xml	Sun Dec 26 12:20:14 2004
@@ -128,6 +128,9 @@
             <groupId>geronimo</groupId>
             <artifactId>geronimo-service-builder</artifactId>
             <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
         </dependency>
 
         <!-- test only-->

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?view=diff&rev=123366&p1=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java&r1=123365&p2=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java	(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java	Sun Dec 26 12:20:14 2004
@@ -54,8 +54,10 @@
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.XATransactions;
 import org.apache.geronimo.connector.outbound.security.PasswordCredentialRealm;
-import org.apache.geronimo.deployment.service.GBeanHelper;
+import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.xbeans.DependencyType;
+import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.gbean.DynamicGAttributeInfo;
 import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
@@ -71,6 +73,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.naming.reference.GBeanGetResourceRefAddr;
 import org.apache.geronimo.naming.reference.RefAddrContentObjectFactory;
 import org.apache.geronimo.schema.SchemaConversionUtils;
@@ -83,8 +86,6 @@
 import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorType;
 import org.apache.geronimo.xbeans.geronimo.GerCredentialInterfaceType;
-import org.apache.geronimo.xbeans.geronimo.GerDependencyType;
-import org.apache.geronimo.xbeans.geronimo.GerGbeanType;
 import org.apache.geronimo.xbeans.geronimo.GerPartitionedpoolType;
 import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
 import org.apache.geronimo.xbeans.geronimo.GerSinglepoolType;
@@ -112,10 +113,20 @@
     private final int defaultIdleTimeoutMinutes;
     private final boolean defaultXATransactionCaching;
     private final boolean defaultXAThreadCaching;
-    private final Kernel kernel;
     private final URI defaultParentId;
+    private final Repository repository;
+    private final Kernel kernel;
 
-    public ConnectorModuleBuilder(URI defaultParentId, int defaultMaxSize, int defaultMinSize, int defaultBlockingTimeoutMilliseconds, int defaultIdleTimeoutMinutes, boolean defaultXATransactionCaching, boolean defaultXAThreadCaching, Kernel kernel) {
+    public ConnectorModuleBuilder(URI defaultParentId,
+                                  int defaultMaxSize,
+                                  int defaultMinSize,
+                                  int defaultBlockingTimeoutMilliseconds,
+                                  int defaultIdleTimeoutMinutes,
+                                  boolean defaultXATransactionCaching,
+                                  boolean defaultXAThreadCaching,
+                                  Repository repository,
+                                  Kernel kernel) {
+        assert repository != null;
         this.defaultParentId = defaultParentId;
         this.defaultMaxSize = defaultMaxSize;
         this.defaultMinSize = defaultMinSize;
@@ -123,6 +134,7 @@
         this.defaultIdleTimeoutMinutes = defaultIdleTimeoutMinutes;
         this.defaultXATransactionCaching = defaultXATransactionCaching;
         this.defaultXAThreadCaching = defaultXAThreadCaching;
+        this.repository = repository;
         this.kernel = kernel;
     }
 
@@ -185,6 +197,7 @@
             if (gerConnector == null) {
                 throw new DeploymentException("A connector module must be deployed using a plan");
             }
+            gerConnector = (GerConnectorType) SchemaConversionUtils.convertToGeronimoServiceSchema(gerConnector);
             SchemaConversionUtils.validateDD(gerConnector);
         } catch (XmlException e) {
             throw new DeploymentException(e);
@@ -234,10 +247,8 @@
             }
 
             GerConnectorType vendorConnector = (GerConnectorType) module.getVendorDD();
-            GerDependencyType[] dependencies = vendorConnector.getDependencyArray();
-            for (int i = 0; i < dependencies.length; i++) {
-                earContext.addDependency(getDependencyURI(dependencies[i]));
-            }
+            DependencyType[] dependencies = vendorConnector.getDependencyArray();
+            ServiceConfigBuilder.addDependencies(earContext, dependencies, repository);
         } catch (IOException e) {
             throw new DeploymentException("Problem deploying connector", e);
         }
@@ -366,10 +377,11 @@
 
         GerConnectorType geronimoConnector = (GerConnectorType) module.getVendorDD();
 
-        GerGbeanType[] gbeans = geronimoConnector.getGbeanArray();
-        for (int i = 0; i < gbeans.length; i++) {
-            GBeanHelper.addGbean(new RARGBeanAdapter(gbeans[i]), cl, earContext);
-        }
+        GbeanType[] gbeans = geronimoConnector.getGbeanArray();
+        ServiceConfigBuilder.addGBeans(gbeans, cl, earContext);
+//        for (int i = 0; i < gbeans.length; i++) {
+//            GBeanHelper.addGbean(new RARGBeanAdapter(gbeans[i]), cl, earContext);
+//        }
 
         addConnectorGBeans(earContext, moduleJ2eeContext, resourceAdapterModuleName, (ConnectorType) specDD, geronimoConnector, cl);
 
@@ -766,23 +778,6 @@
         earContext.addGBean(connectionFactoryGBeanData);
     }
 
-    private static URI getDependencyURI(GerDependencyType dependency) throws DeploymentException {
-        if (dependency.isSetUri()) {
-            try {
-                return new URI(dependency.getUri());
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Invalid dependency URI " + dependency.getUri(), e);
-            }
-        } else {
-            String id = dependency.getGroupId() + "/jars/" + dependency.getArtifactId() + '-' + dependency.getVersion() + ".jar";
-            try {
-                return new URI(id);
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Unable to construct URI for groupId=" + dependency.getGroupId() + ", artifactId=" + dependency.getArtifactId() + ", version=" + dependency.getVersion(), e);
-            }
-        }
-    }
-
     //ResourceReferenceBuilder implementation
     public Reference createResourceRef(String containerId, Class iface) throws DeploymentException {
         Reference ref = new Reference(null, RefAddrContentObjectFactory.class.getName(), null);
@@ -855,12 +850,21 @@
         infoBuilder.addAttribute("defaultXATransactionCaching", boolean.class, true);
         infoBuilder.addAttribute("defaultXAThreadCaching", boolean.class, true);
 
+        infoBuilder.addReference("Repository", Repository.class);
         infoBuilder.addAttribute("kernel", Kernel.class, false);
 
         infoBuilder.addInterface(ModuleBuilder.class);
         infoBuilder.addInterface(ResourceReferenceBuilder.class);
 
-        infoBuilder.setConstructor(new String[]{"defaultParentId", "defaultMaxSize", "defaultMinSize", "defaultBlockingTimeoutMilliseconds", "defaultIdleTimeoutMinutes", "defaultXATransactionCaching", "defaultXAThreadCaching", "kernel"});
+        infoBuilder.setConstructor(new String[]{"defaultParentId",
+                                                "defaultMaxSize",
+                                                "defaultMinSize",
+                                                "defaultBlockingTimeoutMilliseconds",
+                                                "defaultIdleTimeoutMinutes",
+                                                "defaultXATransactionCaching",
+                                                "defaultXAThreadCaching",
+                                                "Repository",
+                                                "kernel"});
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }
 

Deleted: /geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARGBeanAdapter.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/RARGBeanAdapter.java?view=auto&rev=123365
==============================================================================

Modified: geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd?view=diff&rev=123366&p1=geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd&r1=123365&p2=geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd&r2=123366
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd	(original)
+++ geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd	Sun Dec 26 12:20:14 2004
@@ -18,14 +18,14 @@
 
 <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
     xmlns:ger="http://geronimo.apache.org/xml/ns/j2ee/connector"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
     targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/connector"
-    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified"
     version="1.5">
 
-    <xsd:include schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
+    <xsd:import namespace="http://geronimo.apache.org/xml/ns/deployment" schemaLocation="../../../service-builder/src/schema/geronimo-config.xsd"/>
 
     <xsd:annotation>
         <xsd:documentation>
@@ -299,13 +299,15 @@
         </xsd:annotation>
 
         <xsd:sequence>
-            <xsd:element name="dependency" type="ger:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
+<!--            <xsd:element name="dependency" type="sys:dependencyType" minOccurs="0" maxOccurs="unbounded"/>-->
 
             <xsd:element name="resourceadapter" type="ger:resourceadapterType" maxOccurs="unbounded"/>
 
             <xsd:element name="adminobject" type="ger:adminobjectType" minOccurs="0" maxOccurs="unbounded"/>
 
-            <xsd:element name="gbean" type="ger:gbeanType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
+<!--            <xsd:element name="gbean" type="sys:gbeanType" minOccurs="0" maxOccurs="unbounded"/>-->
         </xsd:sequence>
 
         <xsd:attribute name="version" type="ger:versionType" use="required"/>

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java?view=diff&rev=123366&p1=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java&r1=123365&p2=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java	(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java	Sun Dec 26 12:20:14 2004
@@ -54,6 +54,7 @@
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
+import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.xmlbeans.XmlOptions;
 import org.tranql.sql.jdbc.JDBCUtil;
 
@@ -78,6 +79,7 @@
     public void testLoadGeronimoDeploymentDescriptor() throws Exception {
         InputStream geronimoInputStream = geronimoDD.openStream();
         GerConnectorDocument connectorDocument = GerConnectorDocument.Factory.parse(geronimoInputStream);
+        connectorDocument = (GerConnectorDocument)SchemaConversionUtils.convertToGeronimoServiceSchema(connectorDocument);
         assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
         if (!connectorDocument.validate(xmlOptions)) {
             fail(errors.toString());
@@ -169,7 +171,7 @@
         ObjectName connectionTrackerName = new ObjectName("geronimo.connector:service=ConnectionTracker");
 
         Kernel kernel = new Kernel("testServer");
-        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, kernel);
+        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, null, kernel);
         File rarFile = action.getRARFile();
 
         ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
@@ -223,7 +225,7 @@
         JarFile rarFile = null;
         try {
             rarFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear-noger.ear"));
-            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, j2eeServer, null, connectionTrackerName, null, null, null, null, null, null, new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, kernel), null, null, kernel);
+            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, j2eeServer, null, connectionTrackerName, null, null, null, null, null, null, new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, null, kernel), null, null, kernel);
             File tempDir = null;
             try {
                 tempDir = DeploymentUtil.createTempDir();

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java?view=diff&rev=123366&p1=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java&r1=123365&p2=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java	(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java	Sun Dec 26 12:20:14 2004
@@ -52,6 +52,7 @@
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
 import org.apache.geronimo.xbeans.j2ee.ConnectorDocument;
+import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.xmlbeans.XmlOptions;
 import org.tranql.sql.jdbc.JDBCUtil;
 
@@ -84,6 +85,7 @@
     public void testLoadGeronimoDeploymentDescriptor() throws Exception {
         InputStream geronimoInputStream = geronimoDD.openStream();
         GerConnectorDocument connectorDocument = GerConnectorDocument.Factory.parse(geronimoInputStream);
+        connectorDocument = (GerConnectorDocument)SchemaConversionUtils.convertToGeronimoServiceSchema(connectorDocument);
         assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
         if (!connectorDocument.validate(xmlOptions)) {
             fail(errors.toString());
@@ -127,7 +129,7 @@
         ObjectName connectionTrackerName = new ObjectName("geronimo.connector:service=ConnectionTracker");
 
         Kernel kernel = new Kernel("testServer");
-        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, kernel);
+        ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, null, kernel);
         File rarFile = action.getRARFile();
 
         ClassLoader oldCl = Thread.currentThread().getContextClassLoader();

Modified: geronimo/trunk/modules/j2ee-builder/project.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/project.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/j2ee-builder/project.xml&r1=123365&p2=geronimo/trunk/modules/j2ee-builder/project.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/project.xml	(original)
+++ geronimo/trunk/modules/j2ee-builder/project.xml	Sun Dec 26 12:20:14 2004
@@ -69,6 +69,9 @@
             <groupId>geronimo</groupId>
             <artifactId>geronimo-service-builder</artifactId>
             <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
         </dependency>
         <dependency>
             <groupId>geronimo</groupId>

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?view=diff&rev=123366&p1=geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java&r1=123365&p2=geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java	(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java	Sun Dec 26 12:20:14 2004
@@ -18,10 +18,10 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.net.MalformedURLException;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -39,12 +39,14 @@
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ConfigurationBuilder;
-import org.apache.geronimo.deployment.service.GBeanHelper;
-import org.apache.geronimo.deployment.util.NestedJarFile;
+import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 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.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.ApplicationInfo;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.management.impl.J2EEApplicationImpl;
@@ -54,8 +56,6 @@
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerApplicationDocument;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerApplicationType;
-import org.apache.geronimo.xbeans.geronimo.j2ee.GerDependencyType;
-import org.apache.geronimo.xbeans.geronimo.j2ee.GerGbeanType;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType;
 import org.apache.geronimo.xbeans.j2ee.ApplicationType;
 import org.apache.geronimo.xbeans.j2ee.ModuleType;
@@ -175,6 +175,7 @@
 
             // if we got one extract the validate it otherwise create a default one
             if (gerApplicationDoc != null) {
+                gerApplicationDoc = (GerApplicationDocument) SchemaConversionUtils.convertToGeronimoServiceSchema(gerApplicationDoc);
                 SchemaConversionUtils.validateDD(gerApplicationDoc);
                 gerApplication = gerApplicationDoc.getApplication();
             } else {
@@ -303,10 +304,8 @@
             // add dependencies declared in the geronimo-application.xml
             GerApplicationType geronimoApplication = (GerApplicationType) applicationInfo.getVendorDD();
             if (geronimoApplication != null) {
-                GerDependencyType[] dependencies = geronimoApplication.getDependencyArray();
-                for (int i = 0; i < dependencies.length; i++) {
-                    earContext.addDependency(getDependencyURI(dependencies[i]));
-                }
+                DependencyType[] dependencies = geronimoApplication.getDependencyArray();
+                ServiceConfigBuilder.addDependencies(earContext, dependencies, repository);
             }
 
             // each module installs it's files into the output context.. this is different for each module type
@@ -325,23 +324,20 @@
 
             // add gbeans declared in the geronimo-application.xml
             if (geronimoApplication != null) {
-                GerGbeanType[] gbeans = geronimoApplication.getGbeanArray();
-                for (int i = 0; i < gbeans.length; i++) {
-                    GBeanHelper.addGbean(new GerGBeanAdapter(gbeans[i]), cl, earContext);
-                }
+                GbeanType[] gbeans = geronimoApplication.getGbeanArray();
+                ServiceConfigBuilder.addGBeans(gbeans, cl, earContext);
             }
 
             // Create the J2EEApplication managed object
             if (ConfigurationModuleType.EAR == applicationType) {
-                GBeanMBean gbean = new GBeanMBean(J2EEApplicationImpl.GBEAN_INFO, cl);
+                GBeanData gbeanData = new GBeanData(earContext.getApplicationObjectName(), J2EEApplicationImpl.GBEAN_INFO);
                 try {
-                    gbean.setAttribute("deploymentDescriptor", applicationInfo.getOriginalSpecDD());
+                    gbeanData.setAttribute("deploymentDescriptor", applicationInfo.getOriginalSpecDD());
                 } catch (Exception e) {
                     throw new DeploymentException("Error initializing J2EEApplication managed object");
                 }
-                gbean.setReferencePatterns("j2eeServer", Collections.singleton(j2eeServer));
-                ObjectName applicationName = earContext.getApplicationObjectName();
-                earContext.addGBean(applicationName, gbean);
+                gbeanData.setReferencePatterns("j2eeServer", Collections.singleton(j2eeServer));
+                earContext.addGBean(gbeanData);
             }
 
             // each module can now add it's GBeans
@@ -516,26 +512,6 @@
             return appClientConfigBuilder;
         }
         throw new IllegalArgumentException("Unknown module type: " + module.getClass().getName());
-    }
-
-    private URI getDependencyURI(GerDependencyType dep) throws DeploymentException {
-        URI uri;
-        if (dep.isSetUri()) {
-            try {
-                uri = new URI(dep.getUri());
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Invalid dependency URI " + dep.getUri(), e);
-            }
-        } else {
-            // @todo support more than just jars
-            String id = dep.getGroupId() + "/jars/" + dep.getArtifactId() + '-' + dep.getVersion() + ".jar";
-            try {
-                uri = new URI(id);
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Unable to construct URI for groupId=" + dep.getGroupId() + ", artifactId=" + dep.getArtifactId() + ", version=" + dep.getVersion(), e);
-            }
-        }
-        return uri;
     }
 
     public static final GBeanInfo GBEAN_INFO;

Deleted: /geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/GerGBeanAdapter.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/GerGBeanAdapter.java?view=auto&rev=123365
==============================================================================

Modified: geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd?view=diff&rev=123366&p1=geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd&r1=123365&p2=geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd&r2=123366
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd	(original)
+++ geronimo/trunk/modules/j2ee-builder/src/schema/geronimo-application.xsd	Sun Dec 26 12:20:14 2004
@@ -19,20 +19,21 @@
 <xs:schema
     xmlns:geronimo="http://geronimo.apache.org/xml/ns/j2ee/application"
     targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/application"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified"
     version="1.0">
 
-    <xs:include schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment" schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
 
     <xs:element name="application" type="geronimo:applicationType"/>
 
     <xs:complexType name="applicationType">
         <xs:sequence>
-            <xs:element name="dependency" type="geronimo:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element name="gbean" type="geronimo:gbeanType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="module" type="geronimo:moduleType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
 
         <xs:attribute name="configId" type="xs:string" use="required"/>

Modified: geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml&r1=123365&p2=geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml	(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml	Sun Dec 26 12:20:14 2004
@@ -20,9 +20,6 @@
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 
-    <!-- a random gbean just to verify that the deployer doesn't die because of it -->
-    <gbean name="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
-
     <module>
         <web>test-war/</web>
         <alt-dd>alt-ger-war.xml</alt-dd>
@@ -35,5 +32,8 @@
         <connector>test-rar</connector>
         <alt-dd>alt-ger-ra.xml</alt-dd>
     </module>
+
+    <!-- a random gbean just to verify that the deployer doesn't die because of it -->
+    <gbean name="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
 
 </application>

Modified: geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?view=diff&rev=123366&p1=geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java&r1=123365&p2=geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java	(original)
+++ geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java	Sun Dec 26 12:20:14 2004
@@ -44,6 +44,7 @@
 
     static final String GERONIMO_NAMING_NAMESPACE = "http://geronimo.apache.org/xml/ns/naming";
     private static final String GERONIMO_SECURITY_NAMESPACE = "http://geronimo.apache.org/xml/ns/security";
+    private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment";
 
     private static final QName RESOURCE_ADAPTER_VERSION = new QName(J2EE_NAMESPACE, "resourceadapter-version");
     private static final QName TAGLIB = new QName(J2EE_NAMESPACE, "taglib");
@@ -345,6 +346,28 @@
                     String localName = cursor.getName().getLocalPart();
                     if (localName.equals("security")) {
                         convertElementToSchema(cursor, end, GERONIMO_SECURITY_NAMESPACE);
+                    }
+                }
+                cursor.toNextToken();
+            }
+        } finally {
+            cursor.dispose();
+            end.dispose();
+        }
+        return xmlObject;
+    }
+
+    public static XmlObject convertToGeronimoServiceSchema(XmlObject xmlObject) {
+        XmlCursor cursor = xmlObject.newCursor();
+        XmlCursor end = xmlObject.newCursor();
+        try {
+            while (cursor.hasNextToken()) {
+                if (cursor.isStart()) {
+                    String localName = cursor.getName().getLocalPart();
+                    if (localName.equals("gbean")
+                    || localName.equals("dependency")
+                    || localName.equals("include")) {
+                        convertElementToSchema(cursor, end, GERONIMO_SERVICE_NAMESPACE);
                     }
                 }
                 cursor.toNextToken();

Modified: geronimo/trunk/modules/jetty-builder/project.xml
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/project.xml?view=diff&rev=123366&p1=geronimo/trunk/modules/jetty-builder/project.xml&r1=123365&p2=geronimo/trunk/modules/jetty-builder/project.xml&r2=123366
==============================================================================
--- geronimo/trunk/modules/jetty-builder/project.xml	(original)
+++ geronimo/trunk/modules/jetty-builder/project.xml	Sun Dec 26 12:20:14 2004
@@ -129,6 +129,15 @@
 
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-service-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-transaction</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>

Deleted: /geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyGBeanAdapter.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyGBeanAdapter.java?view=auto&rev=123365
==============================================================================

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?view=diff&rev=123366&p1=geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r1=123365&p2=geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java	(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java	Sun Dec 26 12:20:14 2004
@@ -47,8 +47,10 @@
 import javax.transaction.UserTransaction;
 
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.service.GBeanHelper;
+import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.xbeans.DependencyType;
+import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -65,17 +67,16 @@
 import org.apache.geronimo.jetty.JettyServletHolder;
 import org.apache.geronimo.jetty.JettyWebAppContext;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
 import org.apache.geronimo.naming.java.ReadOnlyContext;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.security.deploy.Security;
 import org.apache.geronimo.security.deployment.SecurityBuilder;
-import org.apache.geronimo.security.util.URLPattern;
 import org.apache.geronimo.security.realm.GenericSecurityRealm;
+import org.apache.geronimo.security.util.URLPattern;
 import org.apache.geronimo.transaction.OnlineUserTransaction;
-import org.apache.geronimo.xbeans.geronimo.jetty.JettyDependencyType;
-import org.apache.geronimo.xbeans.geronimo.jetty.JettyGbeanType;
 import org.apache.geronimo.xbeans.geronimo.jetty.JettyWebAppDocument;
 import org.apache.geronimo.xbeans.geronimo.jetty.JettyWebAppType;
 import org.apache.geronimo.xbeans.j2ee.DispatcherType;
@@ -124,6 +125,7 @@
     private final List defaultWelcomeFiles;
     private final Integer defaultSessionTimeoutSeconds;
 
+    private final Repository repository;
     private final Kernel kernel;
 
     public JettyModuleBuilder(URI defaultParentId,
@@ -133,6 +135,7 @@
                               ObjectName defaultServlets,
                               ObjectName defaultFilters,
                               ObjectName defaultFilterMappings,
+                              Repository repository,
                               Kernel kernel) {
         this.defaultParentId = defaultParentId;
         this.defaultSessionTimeoutSeconds = (defaultSessionTimeoutSeconds == null) ? new Integer(30 * 60) : defaultSessionTimeoutSeconds;
@@ -140,6 +143,7 @@
         this.defaultServlets = defaultServlets;
         this.defaultFilters = defaultFilters;
         this.defaultFilterMappings = defaultFilterMappings;
+        this.repository = repository;
         this.kernel = kernel;
 
         //todo locale mappings
@@ -239,6 +243,7 @@
             if (jettyWebApp != null) {
                 jettyWebApp = (JettyWebAppType) SchemaConversionUtils.convertToGeronimoNamingSchema(jettyWebApp);
                 jettyWebApp = (JettyWebAppType) SchemaConversionUtils.convertToGeronimoSecuritySchema(jettyWebApp);
+                jettyWebApp = (JettyWebAppType) SchemaConversionUtils.convertToGeronimoServiceSchema(jettyWebApp);
                 SchemaConversionUtils.validateDD(jettyWebApp);
             } else {
                 String path;
@@ -306,10 +311,8 @@
 
             // add the dependencies declared in the geronimo-jetty.xml file
             JettyWebAppType jettyWebApp = (JettyWebAppType) module.getVendorDD();
-            JettyDependencyType[] dependencies = jettyWebApp.getDependencyArray();
-            for (int i = 0; i < dependencies.length; i++) {
-                earContext.addDependency(getDependencyURI(dependencies[i]));
-            }
+            DependencyType[] dependencies = jettyWebApp.getDependencyArray();
+            ServiceConfigBuilder.addDependencies(earContext, dependencies, repository);
         } catch (IOException e) {
             throw new DeploymentException("Problem deploying war", e);
         }
@@ -347,10 +350,10 @@
         ClassLoader webClassLoader = new JettyClassLoader(webClassPathURLs, cl, contextPriorityClassLoader);
         Map localSecurityRealms = new HashMap();
         if (jettyWebApp != null) {
-            JettyGbeanType[] gbeans = jettyWebApp.getGbeanArray();
-            for (int i = 0; i < gbeans.length; i++) {
-                GBeanData gBeanData = GBeanHelper.getGBeanData(new JettyGBeanAdapter(gbeans[i]), webClassLoader);
-                earContext.addGBean(gBeanData);
+            GbeanType[] gbeans = jettyWebApp.getGbeanArray();
+            Set added = ServiceConfigBuilder.addGBeans(gbeans, cl, earContext);
+            for (Iterator iterator = added.iterator(); iterator.hasNext();) {
+                GBeanData gBeanData = (GBeanData) iterator.next();
                 String className = gBeanData.getGBeanInfo().getClassName();
                 if (GenericSecurityRealm.class.getName().equals(className)) {
                     localSecurityRealms.put(gBeanData.getAttribute("realmName"), gBeanData);
@@ -977,27 +980,6 @@
                 cl);
     }
 
-
-    private URI getDependencyURI(JettyDependencyType dep) throws DeploymentException {
-        URI uri;
-        if (dep.isSetUri()) {
-            try {
-                uri = new URI(dep.getUri());
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Invalid dependency URI " + dep.getUri(), e);
-            }
-        } else {
-            // @todo support more than just jars
-            String id = dep.getGroupId() + "/jars/" + dep.getArtifactId() + '-' + dep.getVersion() + ".jar";
-            try {
-                uri = new URI(id);
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Unable to construct URI for groupId=" + dep.getGroupId() + ", artifactId=" + dep.getArtifactId() + ", version=" + dep.getVersion(), e);
-            }
-        }
-        return uri;
-    }
-
     private static void check(WebAppType webApp) throws DeploymentException {
         checkURLPattern(webApp);
         checkMultiplicities(webApp);
@@ -1052,6 +1034,7 @@
         infoBuilder.addAttribute("defaultServlets", ObjectName.class, true);
         infoBuilder.addAttribute("defaultFilters", ObjectName.class, true);
         infoBuilder.addAttribute("defaultFilterMappings", ObjectName.class, true);
+        infoBuilder.addReference("Repository", Repository.class);
         infoBuilder.addAttribute("kernel", Kernel.class, false);
         infoBuilder.addInterface(ModuleBuilder.class);
 
@@ -1063,6 +1046,7 @@
             "defaultServlets",
             "defaultFilters",
             "defaultFilterMappings",
+            "Repository",
             "kernel"});
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Modified: geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd?view=diff&rev=123366&p1=geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd&r1=123365&p2=geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd&r2=123366
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd	(original)
+++ geronimo/trunk/modules/jetty-builder/src/schema/geronimo-jetty.xsd	Sun Dec 26 12:20:14 2004
@@ -21,6 +21,7 @@
     targetNamespace="http://geronimo.apache.org/xml/ns/web/jetty"
     xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
     xmlns:security="http://geronimo.apache.org/xml/ns/security"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified"
@@ -28,14 +29,14 @@
 
     <xs:import namespace="http://geronimo.apache.org/xml/ns/naming" schemaLocation="../../../naming-builder/src/schema/geronimo-naming.xsd"/>
     <xs:import namespace="http://geronimo.apache.org/xml/ns/security" schemaLocation="../../../security-builder/src/schema/geronimo-security.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment" schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
 
-    <xs:include schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
 
     <xs:element name="web-app" type="jetty:web-appType"/>
 
     <xs:complexType name="web-appType">
         <xs:sequence>
-            <xs:element name="dependency" type="jetty:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
 
             <xs:element name="context-root" type="xs:string" minOccurs="0"/>
             <xs:element name="context-priority-classloader" type="xs:boolean"/>
@@ -54,7 +55,7 @@
             <xs:element ref="naming:resource-ref" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="naming:resource-env-ref" minOccurs="0" maxOccurs="unbounded"/>
 
-            <xs:element name="gbean" type="jetty:gbeanType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
 
         </xs:sequence>
         <xs:attribute name="configId" type="xs:string" use="required"/>

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?view=diff&rev=123366&p1=geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java&r1=123365&p2=geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java	(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java	Sun Dec 26 12:20:14 2004
@@ -187,7 +187,7 @@
         //install the policy configuration factory
         SecurityServiceImpl securityService = new SecurityServiceImpl("org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory");
 
-        builder = new JettyModuleBuilder(new URI("null"), new Integer(1800), Collections.EMPTY_LIST, containerName, defaultServlets, null, null, kernel);
+        builder = new JettyModuleBuilder(new URI("null"), new Integer(1800), Collections.EMPTY_LIST, containerName, defaultServlets, null, null, null, kernel);
 
         container = new GBeanData(containerName, JettyContainerImpl.GBEAN_INFO);
 

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java?view=diff&rev=123366&p1=geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java&r1=123365&p2=geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java	(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java	Sun Dec 26 12:20:14 2004
@@ -14,7 +14,7 @@
  */
 public class PlanParsingTest extends TestCase {
     ObjectName jettyContainerObjectName = JMXUtil.getObjectName("test:type=JettyContainer");
-    private JettyModuleBuilder builder = new JettyModuleBuilder(null, new Integer(1800), null, jettyContainerObjectName, null, null, null, null);
+    private JettyModuleBuilder builder = new JettyModuleBuilder(null, new Integer(1800), null, jettyContainerObjectName, null, null, null, null, null);
     private File basedir = new File(System.getProperty("basedir", "."));
 
     public void testResourceRef() throws Exception {

Deleted: /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanAdapter.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanAdapter.java?view=auto&rev=123365
==============================================================================

Deleted: /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanDefault.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanDefault.java?view=auto&rev=123365
==============================================================================

Deleted: /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanHelper.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanHelper.java?view=auto&rev=123365
==============================================================================

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?view=diff&rev=123366&p1=geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java&r1=123365&p2=geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java&r2=123366
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java	(original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java	Sun Dec 26 12:20:14 2004
@@ -20,24 +20,30 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.net.MalformedURLException;
 import java.net.URLClassLoader;
 import java.util.Collections;
 import java.util.List;
+import java.util.Set;
+import java.util.HashSet;
 import java.util.jar.JarFile;
 import javax.management.MalformedObjectNameException;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ConfigurationBuilder;
 import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.xbeans.AttributeType;
 import org.apache.geronimo.deployment.xbeans.ConfigurationDocument;
 import org.apache.geronimo.deployment.xbeans.ConfigurationType;
 import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
+import org.apache.geronimo.deployment.xbeans.ReferenceType;
+import org.apache.geronimo.deployment.xbeans.ReferencesType;
 import org.apache.geronimo.deployment.xbeans.ServiceDocument;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.kernel.Kernel;
@@ -108,21 +114,18 @@
         } catch (MalformedObjectNameException e) {
             throw new DeploymentException(e);
         }
-        addIncludes(context, configType);
-        addDependencies(context, configType.getDependencyArray());
+        DependencyType[] includes = configType.getIncludeArray();
+        addIncludes(context, includes, repository);
+        addDependencies(context, configType.getDependencyArray(), repository);
         ClassLoader cl = context.getClassLoader(repository);
         GbeanType[] gbeans = configType.getGbeanArray();
-        for (int i = 0; i < gbeans.length; i++) {
-            GBeanHelper.addGbean(new ServiceGBeanAdapter(gbeans[i]), cl, context);
-
-        }
+        addGBeans(gbeans, cl, context);
         context.close();
 
         return Collections.EMPTY_LIST;
     }
 
-    private void addIncludes(DeploymentContext context, ConfigurationType configType) throws DeploymentException {
-        DependencyType[] includes = configType.getIncludeArray();
+    public static void addIncludes(DeploymentContext context, DependencyType[] includes, Repository repository) throws DeploymentException {
         for (int i = 0; i < includes.length; i++) {
             DependencyType include = includes[i];
             URI uri = getDependencyURI(include);
@@ -146,7 +149,7 @@
         }
     }
 
-    private void addDependencies(DeploymentContext context, DependencyType[] deps) throws DeploymentException {
+    public static void addDependencies(DeploymentContext context, DependencyType[] deps, Repository repository) throws DeploymentException {
         for (int i = 0; i < deps.length; i++) {
             URI dependencyURI = getDependencyURI(deps[i]);
             context.addDependency(dependencyURI);
@@ -171,13 +174,55 @@
                 }
                 DependencyType[] dependencyDeps = serviceDoc.getService().getDependencyArray();
                 if (dependencyDeps != null) {
-                    addDependencies(context, dependencyDeps);
+                    addDependencies(context, dependencyDeps, repository);
                 }
             }
         }
     }
 
-    private URI getDependencyURI(DependencyType dep) throws DeploymentException {
+    //TODO returning set of added gbeans is a HACK used only by stuff needing to access security gbeans at deploy time!  REMOVE IT!!
+    public static Set addGBeans(GbeanType[] gbeans, ClassLoader cl, DeploymentContext context) throws DeploymentException {
+        Set result = new HashSet();
+        for (int i = 0; i < gbeans.length; i++) {
+            GBeanData gBeanData = getGBeanData(gbeans[i], cl);
+            context.addGBean(gBeanData);
+            result.add(gBeanData);
+        }
+        return result;
+    }
+
+    public static GBeanData getGBeanData(GbeanType gbean, ClassLoader cl) throws DeploymentException {
+        GBeanBuilder builder = new GBeanBuilder(gbean.getName(), cl, gbean.getClass1());
+
+        // set up attributes
+        AttributeType[] attributeArray = gbean.getAttributeArray();
+        if (attributeArray != null) {
+            for (int j = 0; j < attributeArray.length; j++) {
+                builder.setAttribute(attributeArray[j].getName().trim(), attributeArray[j].getType(), attributeArray[j].getStringValue());
+            }
+        }
+
+        // set up all single pattern references
+        ReferenceType[] referenceArray = gbean.getReferenceArray();
+        if (referenceArray != null) {
+            for (int j = 0; j < referenceArray.length; j++) {
+                builder.setReference(referenceArray[j].getName(), referenceArray[j].getStringValue());
+            }
+        }
+
+        // set up app multi-patterned references
+        ReferencesType[] referencesArray = gbean.getReferencesArray();
+        if (referencesArray != null) {
+            for (int j = 0; j < referencesArray.length; j++) {
+                builder.setReference(referencesArray[j].getName(), referencesArray[j].getPatternArray());
+            }
+        }
+
+        GBeanData gBeanData = builder.getGBeanData();
+        return gBeanData;
+    }
+
+    private static URI getDependencyURI(DependencyType dep) throws DeploymentException {
         URI uri;
         if (dep.isSetUri()) {
             try {

Deleted: /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceGBeanAdapter.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceGBeanAdapter.java?view=auto&rev=123365
==============================================================================

Modified: geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd?view=diff&rev=123366&p1=geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd&r1=123365&p2=geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd&r2=123366
==============================================================================
--- geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd	(original)
+++ geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd	Sun Dec 26 12:20:14 2004
@@ -17,9 +17,9 @@
 -->
   
 <xs:schema
-    xmlns="http://geronimo.apache.org/xml/ns/deployment"
-    xmlns:xs="http://www.w3.org/2001/XMLSchema"
     targetNamespace="http://geronimo.apache.org/xml/ns/deployment"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified"
     attributeFormDefault="unqualified"
     >
@@ -32,18 +32,66 @@
         </xs:documentation>
     </xs:annotation>
 
-    <xs:include schemaLocation="geronimo-common.xsd"/>
+<!--    <xs:include schemaLocation="geronimo-common.xsd"/>-->
 
-    <xs:element name="configuration" type="configurationType"/>
+    <xs:element name="configuration" type="sys:configurationType"/>
 
     <xs:complexType name="configurationType">
         <xs:sequence>
-            <xs:element name="include" type="dependencyType" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element name="dependency" type="dependencyType" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element name="gbean" type="gbeanType" minOccurs="1" maxOccurs="unbounded"/>
+            <xs:element name="include" type="sys:dependencyType" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
+            <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:complexType>
+
+    <xs:element name="dependency" type="sys:dependencyType"/>
+    <xs:element name="gbean" type="sys:gbeanType"/>
+
+    <xs:complexType name="dependencyType">
+        <xs:choice>
+            <xs:sequence>
+                <xs:element name="groupId" type="xs:string"/>
+                <xs:element name="artifactId" type="xs:string"/>
+                <xs:element name="version" type="xs:string"/>
+            </xs:sequence>
+            <xs:element name="uri" type="xs:string"/>
+        </xs:choice>
+    </xs:complexType>
+
+    <xs:complexType name="gbeanType">
+        <xs:choice minOccurs="0" maxOccurs="unbounded">
+            <xs:element name="attribute" type="sys:attributeType"/>
+            <xs:element name="reference" type="sys:referenceType"/>
+            <xs:element name="references" type="sys:referencesType"/>
+        </xs:choice>
+        <xs:attribute name="name" type="xs:string"/>
+        <xs:attribute name="class" type="xs:string"/>
+    </xs:complexType>
+
+    <xs:complexType name="attributeType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="name" type="xs:string"/>
+                <xs:attribute name="type" type="xs:string"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+    <xs:complexType name="referenceType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="name" type="xs:string"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+    <xs:complexType name="referencesType">
+        <xs:sequence>
+            <xs:element name="pattern" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="name" type="xs:string"/>
     </xs:complexType>
 
 </xs:schema>

Modified: geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd?view=diff&rev=123366&p1=geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd&r1=123365&p2=geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd&r2=123366
==============================================================================
--- geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd	(original)
+++ geronimo/trunk/modules/service-builder/src/schema/geronimo-service.xsd	Sun Dec 26 12:20:14 2004
@@ -32,7 +32,7 @@
         </xs:documentation>
     </xs:annotation>
 
-    <xs:include schemaLocation="geronimo-common.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment" schemaLocation="geronimo-config.xsd"/>
 
     <xs:element name="service" type="serviceType"/>
 

Mime
View raw message