You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2005/09/29 04:08:52 UTC

svn commit: r292376 [2/4] - in /geronimo/branches/1.0-M5: ./ applications/console-ear/src/plan/ applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/ applications/console-standard/src/java/org/apache/geronimo/console/jmsma...

Modified: geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan1.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan1.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan1.xml (original)
+++ geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan1.xml Wed Sep 28 19:07:10 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
+<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.0"
     clientConfigId="test-client"
     configId="client"
     parentId="org/apache/geronimo/DefaultDatabase">

Modified: geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan2.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan2.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan2.xml (original)
+++ geronimo/branches/1.0-M5/modules/client-builder/src/test-resources/plans/plan2.xml Wed Sep 28 19:07:10 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
+<application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.0"
     clientConfigId="test-client"
     configId="client"
     parentId="org/apache/geronimo/DefaultDatabase">
@@ -9,7 +9,7 @@
     </resource-ref>
     <resource>
         <external-rar>tranql/rars/tranql-connector-1.0-SNAPSHOT</external-rar>
-        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
             configId="org/apache/geronimo/DefaultDatabase"
             parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/maven.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/maven.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/maven.xml Wed Sep 28 19:07:10 2005
@@ -28,7 +28,7 @@
 
     <preGoal name="java:compile">
         <xmlbeans:schema2java
-            maven.xmlbeans2.sourceschema="schema/geronimo-connector.xsd"/>
+            maven.xmlbeans2.sourceschema="schema/geronimo-connector-1.0.xsd"/>
         <mkdir dir="${basedir}/target/xmlbeans-classes"/>
         <mkdir dir="${basedir}/target/xmlbeans-classes/schemaorg_apache_xmlbeans"/>
         <copy todir="${basedir}/target/xmlbeans-classes/schemaorg_apache_xmlbeans">

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Wed Sep 28 19:07:10 2005
@@ -64,9 +64,11 @@
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.XATransactions;
 import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.DynamicGAttributeInfo;
 import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
@@ -178,7 +180,7 @@
         //we found ra.xml, if it won't parse it's an error.
         try {
             // parse it
-            XmlObject xmlObject = SchemaConversionUtils.parse(specDD);
+            XmlObject xmlObject = XmlBeansUtil.parse(specDD);
             ConnectorDocument connectorDoc = SchemaConversionUtils.convertToConnectorSchema(xmlObject);
             connector = connectorDoc.getConnector();
         } catch (XmlException e) {
@@ -194,11 +196,15 @@
                             GerConnectorType.type);
                 } else {
                     GerConnectorDocument gerConnectorDoc = null;
+                    ArrayList errors = new ArrayList();
                     if (plan != null) {
-                        gerConnectorDoc = GerConnectorDocument.Factory.parse((File) plan);
+                        gerConnectorDoc = GerConnectorDocument.Factory.parse((File) plan, XmlBeansUtil.createXmlOptions(errors));
                     } else {
                         URL path = DeploymentUtil.createJarURL(moduleFile, "META-INF/geronimo-ra.xml");
-                        gerConnectorDoc = GerConnectorDocument.Factory.parse(path);
+                        gerConnectorDoc = GerConnectorDocument.Factory.parse(path, XmlBeansUtil.createXmlOptions(errors));
+                    }
+                    if (errors.size() > 0) {
+                        throw new DeploymentException("Could not parse connector doc: " + errors);
                     }
                     if (gerConnectorDoc != null) {
                         gerConnector = gerConnectorDoc.getConnector();
@@ -213,9 +219,13 @@
                         " (either META-INF/geronimo-ra.xml in the RAR file or a standalone deployment plan passed to the deployer).");
             }
             ConnectorPlanRectifier.rectifyPlan(gerConnector);
-            gerConnector = (GerConnectorType) SchemaConversionUtils.convertToGeronimoServiceSchema(gerConnector);
-            //for workmanager
-            gerConnector = (GerConnectorType) SchemaConversionUtils.convertToGeronimoNamingSchema(gerConnector);
+            XmlCursor cursor = gerConnector.newCursor();
+            try {
+                SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+            } finally {
+                cursor.dispose();
+            }
+
             SchemaConversionUtils.validateDD(gerConnector);
         } catch (XmlException e) {
             throw new DeploymentException(e);

Propchange: geronimo/branches/1.0-M5/modules/connector-builder/src/schema/geronimo-connector-1.0.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/branches/1.0-M5/modules/connector-builder/src/schema/geronimo-connector-1.0.xsd
------------------------------------------------------------------------------
    svn:keywords = author date id rev

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/schema/xmlconfig.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/schema/xmlconfig.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/schema/xmlconfig.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/schema/xmlconfig.xml Wed Sep 28 19:07:10 2005
@@ -1,7 +1,7 @@
 <xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config"
     >
 
-    <xb:namespace uri="http://geronimo.apache.org/xml/ns/j2ee/connector">
+    <xb:namespace uri="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0">
         <xb:package>org.apache.geronimo.xbeans.geronimo</xb:package>
         <xb:prefix>Ger</xb:prefix>
     </xb:namespace>

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-admin-object-name.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-admin-object-name.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-admin-object-name.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-admin-object-name.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-connectionfactoryinstance-name.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-connectionfactoryinstance-name.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-connectionfactoryinstance-name.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-connectionfactoryinstance-name.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-resourceadapter-name.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-resourceadapter-name.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-resourceadapter-name.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/dup-resourceadapter-name.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/external-application-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/external-application-plan.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/external-application-plan.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/external-application-plan.xml Wed Sep 28 19:07:10 2005
@@ -16,14 +16,14 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     >
     <!--parentId="org/apache/geronimo/Server"-->
 
     <module>
         <connector>test-rar-10-noger.rar</connector>
-        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
             configId="org/apache/geronimo/j2ee/deployment/test"
             parentId="org/apache/geronimo/Server">
 
@@ -83,7 +83,7 @@
     </module>
     <module>
         <connector>test-rar-15-noger.rar</connector>
-        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
             configId="org/apache/geronimo/j2ee/deployment/test"
             parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/old-schema-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/old-schema-plan.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/old-schema-plan.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/data/old-schema-plan.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
     version="1.5"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/ear/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/ear/geronimo-application.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/ear/geronimo-application.xml (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test-data/ear/geronimo-application.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 </application>

Modified: geronimo/branches/1.0-M5/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/PlanParsingTest.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/PlanParsingTest.java (original)
+++ geronimo/branches/1.0-M5/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/PlanParsingTest.java Wed Sep 28 19:07:10 2005
@@ -7,6 +7,8 @@
 import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorType;
 import org.apache.geronimo.xbeans.j2ee.ConnectorDocument;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 
@@ -19,17 +21,17 @@
     public void testLoadGeronimoDeploymentDescriptor10() throws Exception {
         File geronimoDD = new File(basedir, "src/test-data/connector_1_0/geronimo-ra.xml");
         assertTrue(geronimoDD.exists());
-        XmlObject plan = SchemaConversionUtils.parse(geronimoDD.toURL());
+        XmlObject plan = XmlBeansUtil.parse(geronimoDD.toURL());
         GerConnectorDocument connectorDocument = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        connectorDocument = (GerConnectorDocument)SchemaConversionUtils.convertToGeronimoServiceSchema(connectorDocument);
-        SchemaConversionUtils.validateDD(connectorDocument);
+        GerConnectorType connector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(connectorDocument, "connector", GerConnectorType.type);
+        SchemaConversionUtils.validateDD(connector);
         assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
     }
 
     public void testLoadJ2eeDeploymentDescriptor() throws Exception {
         File j2eeDD = new File(basedir, "src/test-data/connector_1_5/ra.xml");
         assertTrue(j2eeDD.exists());
-        XmlObject plan = SchemaConversionUtils.parse(j2eeDD.toURL());
+        XmlObject plan = XmlBeansUtil.parse(j2eeDD.toURL());
         ConnectorDocument connectorDocument = (ConnectorDocument) plan.changeType(ConnectorDocument.type);
         assertNotNull(connectorDocument.getConnector().getResourceadapter());
         SchemaConversionUtils.validateDD(connectorDocument);
@@ -38,19 +40,17 @@
     public void testLoadGeronimoDeploymentDescriptor15() throws Exception {
         File geronimoDD = new File(basedir, "src/test-data/connector_1_5/geronimo-ra.xml");
         assertTrue(geronimoDD.exists());
-        XmlObject plan = SchemaConversionUtils.parse(geronimoDD.toURL());
+        XmlObject plan = XmlBeansUtil.parse(geronimoDD.toURL());
         GerConnectorDocument connectorDocument = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        connectorDocument = (GerConnectorDocument) SchemaConversionUtils.convertToGeronimoServiceSchema(connectorDocument);
-        connectorDocument = (GerConnectorDocument) SchemaConversionUtils.convertToGeronimoNamingSchema(connectorDocument);
-        assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
-        SchemaConversionUtils.validateDD(connectorDocument);
+        GerConnectorType connector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(connectorDocument, "connector", GerConnectorType.type);
+        assertEquals(1, connector.getResourceadapterArray().length);
     }
 
     public void testResourceAdapterNameUniqueness() throws Exception {
         File resourcePlan = new File(basedir, "src/test-data/data/dup-resourceadapter-name.xml");
         assertTrue(resourcePlan.exists());
 
-        XmlObject plan = SchemaConversionUtils.parse(resourcePlan.toURL());
+        XmlObject plan = XmlBeansUtil.parse(resourcePlan.toURL());
         GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
         if (doc == null) {
             doc = (GerConnectorDocument) plan;
@@ -67,7 +67,7 @@
         File resourcePlan = new File(basedir, "src/test-data/data/dup-connectionfactoryinstance-name.xml");
         assertTrue(resourcePlan.exists());
 
-        XmlObject plan = SchemaConversionUtils.parse(resourcePlan.toURL());
+        XmlObject plan = XmlBeansUtil.parse(resourcePlan.toURL());
         GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
         if (doc == null) {
             doc = (GerConnectorDocument) plan;
@@ -84,7 +84,7 @@
         File resourcePlan = new File(basedir, "src/test-data/data/dup-admin-object-name.xml");
         assertTrue(resourcePlan.exists());
 
-        XmlObject plan = SchemaConversionUtils.parse(resourcePlan.toURL());
+        XmlObject plan = XmlBeansUtil.parse(resourcePlan.toURL());
         GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
         if (doc == null) {
             doc = (GerConnectorDocument) plan;
@@ -101,17 +101,14 @@
         File resourcePlan = new File(basedir, "src/test-data/data/old-schema-plan.xml");
         assertTrue(resourcePlan.exists());
 
-        XmlObject plan = SchemaConversionUtils.parse(resourcePlan.toURL());
+        XmlObject plan = XmlBeansUtil.parse(resourcePlan.toURL());
         GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
         if (doc == null) {
             doc = (GerConnectorDocument) plan;
         }
         GerConnectorType gerConnector = doc.getConnector();
         ConnectorPlanRectifier.rectifyPlan(gerConnector);
-        gerConnector = (GerConnectorType) SchemaConversionUtils.convertToGeronimoServiceSchema(gerConnector);
-        //for workmanager
-        gerConnector = (GerConnectorType) SchemaConversionUtils.convertToGeronimoNamingSchema(gerConnector);
-            SchemaConversionUtils.validateDD(doc);
+        gerConnector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(gerConnector, "connector", GerConnectorType.type);
     }
 
 }

Modified: geronimo/branches/1.0-M5/modules/deployment/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/deployment/project.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/deployment/project.xml (original)
+++ geronimo/branches/1.0-M5/modules/deployment/project.xml Wed Sep 28 19:07:10 2005
@@ -41,6 +41,19 @@
     <!-- ============ -->
 
     <dependencies>
+
+        <dependency>
+            <groupId>xmlbeans</groupId>
+            <artifactId>xbean</artifactId>
+            <version>${xmlbeans_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>stax</groupId>
+            <artifactId>stax-api</artifactId>
+            <version>${stax_api_version}</version>
+        </dependency>
+
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-kernel</artifactId>
@@ -107,7 +120,7 @@
                 <exclude>**/Abstract*.java</exclude>
             </excludes>
             <resources>
-<!--   
+<!--
              <resource>
                     <directory>${basedir}/src/schema</directory>
                     <includes>

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/maven.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/maven.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/maven.xml Wed Sep 28 19:07:10 2005
@@ -27,7 +27,7 @@
 
     <preGoal name="java:compile">
         <xmlbeans:schema2java
-            maven.xmlbeans2.sourceschema="schema/geronimo-application.xsd"/>
+            maven.xmlbeans2.sourceschema="schema/geronimo-application-1.0.xsd"/>
         <mkdir dir="${basedir}/target/xmlbeans-classes"/>
         <mkdir dir="${basedir}/target/xmlbeans-classes/schemaorg_apache_xmlbeans"/>
         <copy todir="${basedir}/target/xmlbeans-classes/schemaorg_apache_xmlbeans">

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java Wed Sep 28 19:07:10 2005
@@ -35,7 +35,7 @@
     private Collection resourceModules;
 
     public AppClientModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
-        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD);
+        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
     }
 
     public ConfigurationModuleType getType() {

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java Wed Sep 28 19:07:10 2005
@@ -31,7 +31,7 @@
  */
 public class ConnectorModule extends Module {
     public ConnectorModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
-        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD);
+        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
     }
 
     public ConfigurationModuleType getType() {

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Wed Sep 28 19:07:10 2005
@@ -43,6 +43,7 @@
 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.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.gbean.GBeanData;
@@ -73,8 +74,6 @@
  */
 public class EARConfigBuilder implements ConfigurationBuilder {
 
-    private static final QName APPLICATION_QNAME = new QName("http://geronimo.apache.org/xml/ns/j2ee/application", "application");
-
     private final Kernel kernel;
     private final Repository repository;
     private final ModuleBuilder ejbConfigBuilder;
@@ -167,7 +166,7 @@
             }
             //we found something called application.xml in the right place, if we can't parse it it's an error
             try {
-                XmlObject xmlObject = SchemaConversionUtils.parse(specDD);
+                XmlObject xmlObject = XmlBeansUtil.parse(specDD);
                 application = SchemaConversionUtils.convertToApplicationSchema(xmlObject).getApplication();
             } catch (XmlException e) {
                 throw new DeploymentException("Could not parse application.xml", e);
@@ -178,36 +177,25 @@
         try {
             // load the geronimo-application.xml from either the supplied plan or from the earFile
             GerApplicationDocument gerApplicationDoc = null;
+            XmlObject rawPlan = null;
             try {
                 if (planFile != null) {
-                    XmlObject xml = SchemaConversionUtils.parse(planFile.toURL());
-                    XmlCursor cursor = xml.newCursor();
-                    try {
-                        cursor.toFirstChild();
-                        QName qname = cursor.getName();
-                        if (APPLICATION_QNAME.equals(qname)) {
-                            gerApplicationDoc = (GerApplicationDocument) xml.changeType(GerApplicationDocument.type);
-                        } else {
-                            return null;
-                        }
-                    } finally {
-                        cursor.dispose();
+                    rawPlan = XmlBeansUtil.parse(planFile.toURL());
+                    gerApplication = (GerApplicationType) SchemaConversionUtils.fixGeronimoSchema(rawPlan, "application", GerApplicationType.type);
+                    if (gerApplication == null) {
+                        return null;
                     }
                 } else {
                     URL path = DeploymentUtil.createJarURL(earFile, "META-INF/geronimo-application.xml");
-                    gerApplicationDoc = GerApplicationDocument.Factory.parse(path);
+                    rawPlan = XmlBeansUtil.parse(path);
+                    gerApplication = (GerApplicationType) SchemaConversionUtils.fixGeronimoSchema(rawPlan, "application", GerApplicationType.type);
                 }
             } catch (IOException e) {
+                //TODO isn't this an error?
             }
 
             // if we got one extract the validate it otherwise create a default one
-            if (gerApplicationDoc != null) {
-                gerApplicationDoc = (GerApplicationDocument) SchemaConversionUtils.convertToGeronimoServiceSchema(gerApplicationDoc);
-                gerApplicationDoc = (GerApplicationDocument) SchemaConversionUtils.convertToGeronimoNamingSchema(gerApplicationDoc);
-                gerApplicationDoc = (GerApplicationDocument) SchemaConversionUtils.convertToGeronimoSecuritySchema(gerApplicationDoc);
-                SchemaConversionUtils.validateDD(gerApplicationDoc);
-                gerApplication = gerApplicationDoc.getApplication();
-            } else {
+            if (gerApplication == null) {
                 gerApplication = createDefaultPlan(application, earFile);
             }
         } catch (XmlException e) {

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java Wed Sep 28 19:07:10 2005
@@ -31,7 +31,7 @@
  */
 public class EJBModule extends Module {
     public EJBModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
-        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD);
+        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
     }
 
     public ConfigurationModuleType getType() {

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java Wed Sep 28 19:07:10 2005
@@ -43,10 +43,11 @@
     private final XmlObject specDD;
     private final XmlObject vendorDD;
     private final String originalSpecDD;
+    private final String namespace;
 
     private URI uniqueModuleLocation;
 
-    protected Module(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
+    protected Module(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String namespace) {
         assert targetPath != null: "targetPath is null";
 
         this.standAlone = standAlone;
@@ -57,6 +58,7 @@
         this.specDD = specDD;
         this.vendorDD = vendorDD;
         this.originalSpecDD = originalSpecDD;
+        this.namespace = namespace;
 
         if (standAlone) {
             name = configId.toString();
@@ -113,6 +115,10 @@
 
     public String getOriginalSpecDD() {
         return originalSpecDD;
+    }
+
+    public String getNamespace() {
+        return namespace;
     }
 
     public int hashCode() {

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java Wed Sep 28 19:07:10 2005
@@ -37,6 +37,8 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlCursor;
@@ -97,7 +99,7 @@
         XmlObject xmlObject;
         if (plan instanceof File) {
             try {
-                xmlObject = SchemaConversionUtils.parse(((File) plan).toURL());
+                xmlObject = XmlBeansUtil.parse(((File) plan).toURL());
             } catch (IOException e) {
                 throw new DeploymentException("Could not read plan file", e);
             } catch (XmlException e) {
@@ -110,12 +112,17 @@
         }
         XmlCursor cursor = xmlObject.newCursor();
         try {
-            cursor.toFirstChild();
-            String namespace = cursor.getName().getNamespaceURI();
-            return namespace;
+            while (cursor.hasNextToken()){
+                if (cursor.isStart()) {
+                    String namespace = cursor.getName().getNamespaceURI();
+                    return namespace;
+                }
+                cursor.toNextToken();
+            }
         } finally {
             cursor.dispose();
         }
+        throw new DeploymentException("Cannot find namespace in xmlObject: " + xmlObject.xmlText());
     }
 
     private ModuleBuilder getBuilderFromNamespace(String namespace) throws DeploymentException {
@@ -136,22 +143,19 @@
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module module) throws DeploymentException {
-        XmlObject plan = module.getVendorDD();
-        String namespace = getNamespaceFromPlan(plan);
+        String namespace = module.getNamespace();
         ModuleBuilder builder = getBuilderFromNamespace(namespace);
         builder.installModule(earFile, earContext, module);
     }
 
     public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
-        XmlObject plan = module.getVendorDD();
-        String namespace = getNamespaceFromPlan(plan);
+        String namespace = module.getNamespace();
         ModuleBuilder builder = getBuilderFromNamespace(namespace);
         builder.initContext(earContext, module, cl);
     }
 
     public void addGBeans(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
-        XmlObject plan = module.getVendorDD();
-        String namespace = getNamespaceFromPlan(plan);
+        String namespace = module.getNamespace();
         ModuleBuilder builder = getBuilderFromNamespace(namespace);
         builder.addGBeans(earContext, module, cl);
     }

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java Wed Sep 28 19:07:10 2005
@@ -37,8 +37,8 @@
     private final String contextRoot;
     private final Map portMap;
 
-    public WebModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String contextRoot, Map portMap) {
-        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD);
+    public WebModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String contextRoot, Map portMap, String namespace) {
+        super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, namespace);
         this.contextRoot = contextRoot;
         this.portMap = portMap;
     }

Propchange: geronimo/branches/1.0-M5/modules/j2ee-builder/src/schema/geronimo-application-1.0.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/branches/1.0-M5/modules/j2ee-builder/src/schema/geronimo-application-1.0.xsd
------------------------------------------------------------------------------
    svn:keywords = author date id rev

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/schema/xmlconfig.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/schema/xmlconfig.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/schema/xmlconfig.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/schema/xmlconfig.xml Wed Sep 28 19:07:10 2005
@@ -1,6 +1,6 @@
 <xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config">
 
-    <xb:namespace uri="http://geronimo.apache.org/xml/ns/j2ee/application">
+    <xb:namespace uri="http://geronimo.apache.org/xml/ns/j2ee/application-1.0">
         <xb:package>org.apache.geronimo.xbeans.geronimo.j2ee</xb:package>
         <xb:prefix>Ger</xb:prefix>
     </xb:namespace>

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 <openejb-jar
-    xmlns="http://www.openejb.org/xml/ns/openejb-jar"
+    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
     configId="org/openejb/itests"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml Wed Sep 28 19:07:10 2005
@@ -6,17 +6,17 @@
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
-  
+
        http://www.apache.org/licenses/LICENSE-2.0
-  
+
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-  
-<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/web/jetty">
+
+<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
     <jetty:context-priority-classloader>false</jetty:context-priority-classloader>
     <!--
         <jetty:security>

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml Wed Sep 28 19:07:10 2005
@@ -17,7 +17,7 @@
 -->
 
 <openejb-jar
-    xmlns="http://www.openejb.org/xml/ns/openejb-jar"
+    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
     configId="org/openejb/itests"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml Wed Sep 28 19:07:10 2005
@@ -6,17 +6,17 @@
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
-  
+
        http://www.apache.org/licenses/LICENSE-2.0
-  
+
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-  
-<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/web/jetty">
+
+<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
     <jetty:context-priority-classloader>false</jetty:context-priority-classloader>
     <!--
         <jetty:security>

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-car.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-car.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-car.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-car.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-rar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-rar.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-rar.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-rar.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-war.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-war.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-war.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-plan/test-bad-war.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
     configId="org/apache/geronimo/j2ee/deployment/test"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 <openejb-jar
-    xmlns="http://www.openejb.org/xml/ns/openejb-jar"
+    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
     configId="org/openejb/itests"
     parentId="org/apache/geronimo/Server">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-war.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-war.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-war.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-war.xml Wed Sep 28 19:07:10 2005
@@ -16,7 +16,7 @@
     limitations under the License.
 -->
 
-<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/web/jetty">
+<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
     <jetty:context-priority-classloader>false</jetty:context-priority-classloader>
     <!--
         <jetty:security>

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java Wed Sep 28 19:07:10 2005
@@ -58,6 +58,7 @@
 public class EARConfigBuilderTest extends TestCase {
     private static final File basedir = new File(System.getProperty("basedir", System.getProperty("user.dir")));
 
+    private static String WEB_NAMESPACE="foo";
     private static JarFile earFile;
     private static MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
     private static MockWARConfigBuilder webConfigBuilder = new MockWARConfigBuilder();
@@ -92,7 +93,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-ear.ear"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -108,7 +109,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-naked-ear.ear"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -124,7 +125,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-ear.ear"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -140,7 +141,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-naked-ear.ear"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -156,7 +157,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/full/"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -172,7 +173,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/naked/"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -188,7 +189,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd/"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 
@@ -204,7 +205,7 @@
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd.ear"));
                 ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap);
+                webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                 connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
             }
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java Wed Sep 28 19:07:10 2005
@@ -36,13 +36,14 @@
     public ClassLoader cl;
     public String contextRoot;
     private Map portMap = null;
+    private String namespace = "foo";
 
     public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
-        return new WebModule(true, null, null, moduleFile, "war", null, null, null, contextRoot, portMap);
+        return new WebModule(true, null, null, moduleFile, "war", null, null, null, contextRoot, portMap, namespace);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException {
-        return new WebModule(false, null, null, moduleFile, targetPath, null, null, null, contextRoot, portMap);
+        return new WebModule(false, null, null, moduleFile, targetPath, null, null, null, contextRoot, portMap, namespace);
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module webModule) throws DeploymentException {

Modified: geronimo/branches/1.0-M5/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java Wed Sep 28 19:07:10 2005
@@ -19,8 +19,11 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Map;
+import java.util.HashMap;
 import java.net.URL;
 import javax.xml.namespace.QName;
 
@@ -43,58 +46,41 @@
 public class SchemaConversionUtils {
     static final String J2EE_NAMESPACE = "http://java.sun.com/xml/ns/j2ee";
 
-    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";
+    static final String GERONIMO_NAMING_NAMESPACE = "http://geronimo.apache.org/xml/ns/naming-1.0";
+    private static final String GERONIMO_SECURITY_NAMESPACE = "http://geronimo.apache.org/xml/ns/security-1.0";
+    private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.0";
 
     private static final QName RESOURCE_ADAPTER_VERSION = new QName(J2EE_NAMESPACE, "resourceadapter-version");
     private static final QName TAGLIB = new QName(J2EE_NAMESPACE, "taglib");
     private static final QName CMP_VERSION = new QName(J2EE_NAMESPACE, "cmp-version");
 
-    private SchemaConversionUtils() {
-    }
-
-    public static XmlObject parse(URL url) throws IOException, XmlException {
-        ArrayList errors = new ArrayList();
-        XmlObject parsed = XmlObject.Factory.parse(url, createXmlOptions(errors));
-        if (errors.size() != 0) {
-            throw new XmlException(errors.toArray().toString());
-        }
-        return parsed;
-    }
+    private static final Map GERONIMO_SCHEMA_CONVERSIONS = new HashMap();
 
-    public static XmlObject parse(InputStream is) throws IOException, XmlException {
-        ArrayList errors = new ArrayList();
-        XmlObject parsed = XmlObject.Factory.parse(is, createXmlOptions(errors));
-        if (errors.size() != 0) {
-            throw new XmlException(errors.toArray().toString());
-        }
-        return parsed;
-    }
+    static {
 
-    public static XmlObject parse(String xml) throws XmlException {
-        ArrayList errors = new ArrayList();
-        XmlObject parsed = XmlObject.Factory.parse(xml, createXmlOptions(errors));
-        if (errors.size() != 0) {
-            throw new XmlException(errors.toArray().toString());
-        }
-        return parsed;
+        GERONIMO_SCHEMA_CONVERSIONS.put("ejb-ref", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("ejb-local-ref", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("service-ref", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("resource-ref", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("resource-env-ref", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("cmp-connection-factory", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("workmanager", GERONIMO_NAMING_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("resource-adapter", GERONIMO_NAMING_NAMESPACE);
+
+        GERONIMO_SCHEMA_CONVERSIONS.put("security", GERONIMO_SECURITY_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("default-principal", GERONIMO_SECURITY_NAMESPACE);
+
+        GERONIMO_SCHEMA_CONVERSIONS.put("gbean", GERONIMO_SERVICE_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("import", GERONIMO_SERVICE_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("dependency", GERONIMO_SERVICE_NAMESPACE);
+        GERONIMO_SCHEMA_CONVERSIONS.put("include", GERONIMO_SERVICE_NAMESPACE);
     }
 
-    public static XmlObject parse(Element element) throws XmlException {
-        ArrayList errors = new ArrayList();
-        XmlObject parsed = XmlObject.Factory.parse(element, createXmlOptions(errors));
-        if (errors.size() != 0) {
-            throw new XmlException(errors.toArray().toString());
-        }
-        return parsed;
+    private SchemaConversionUtils() {
     }
 
-    public static XmlOptions createXmlOptions(ArrayList errors) {
-        XmlOptions options = new XmlOptions();
-        options.setLoadLineNumbers();
-        options.setErrorListener(errors);
-        return options;
+    public static void registerNamespaceConversions(Map conversions) {
+        GERONIMO_SCHEMA_CONVERSIONS.putAll(conversions);
     }
 
     public static ApplicationDocument convertToApplicationSchema(XmlObject xmlObject) throws XmlException {
@@ -339,111 +325,84 @@
         return (WebAppDocument) xmlObject;
     }
 
-    public static XmlObject convertToGeronimoNamingSchema(XmlObject xmlObject) {
-        XmlCursor cursor = xmlObject.newCursor();
-        XmlCursor end = xmlObject.newCursor();
+    public static void convertToGeronimoSubSchemas(XmlCursor cursor) {
+        cursor.toStartDoc();
+        XmlCursor end = cursor.newCursor();
         try {
             while (cursor.hasNextToken()) {
                 if (cursor.isStart()) {
                     String localName = cursor.getName().getLocalPart();
-                    if (localName.equals("ejb-ref")
-                            || localName.equals("ejb-local-ref")
-                            || localName.equals("service-ref")
-                            || localName.equals("resource-ref")
-                            || localName.equals("resource-env-ref")
-                            || localName.equals("cmp-connection-factory")
-                            || localName.equals("workmanager")
-                            || localName.equals("resource-adapter")) {
-                        convertElementToSchema(cursor, end, GERONIMO_NAMING_NAMESPACE);
+                    String namespace = (String) GERONIMO_SCHEMA_CONVERSIONS.get(localName);
+                    if (namespace != null) {
+                        convertElementToSchema(cursor, end, namespace);
                     }
                 }
                 cursor.toNextToken();
             }
         } finally {
-            cursor.dispose();
             end.dispose();
         }
-        return xmlObject;
     }
 
-    public static XmlObject convertToGeronimoSecuritySchema(XmlObject xmlObject) {
-        XmlCursor cursor = xmlObject.newCursor();
-        XmlCursor end = xmlObject.newCursor();
+    public static XmlObject fixGeronimoSchema(XmlObject rawPlan, String desiredElement, SchemaType desiredType) throws XmlException {
+        XmlCursor cursor = rawPlan.newCursor();
         try {
-            while (cursor.hasNextToken()) {
-                if (cursor.isStart()) {
-                    String localName = cursor.getName().getLocalPart();
-                    if (localName.equals("security") || localName.equals("default-principal")) {
-                        convertElementToSchema(cursor, end, GERONIMO_SECURITY_NAMESPACE);
-                    }
+            if (findNestedElement(cursor, desiredElement)) {
+                cursor.push();
+                convertToGeronimoSubSchemas(cursor);
+                cursor.pop();
+                XmlObject temp = cursor.getObject();
+
+                XmlObject result = temp.changeType(desiredType);
+                if (result == null || result.schemaType() != desiredType) {
+                    result = temp.copy().changeType(desiredType);
                 }
-                cursor.toNextToken();
+                validateDD(result);
+                return result;
+            } else {
+                return null;
             }
         } finally {
             cursor.dispose();
-            end.dispose();
         }
-        return xmlObject;
     }
 
-    public static XmlObject convertToGeronimoServiceSchema(XmlObject xmlObject) {
+    public static XmlObject getNestedObject(XmlObject xmlObject, String desiredElement) {
         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("import")
-                            || localName.equals("dependency")
-                            || localName.equals("include")) {
-                        convertElementToSchema(cursor, end, GERONIMO_SERVICE_NAMESPACE);
-                    }
-                }
-                cursor.toNextToken();
+            if (findNestedElement(cursor, desiredElement)) {
+                XmlObject child = cursor.getObject();
+                //The copy seems to be needed to make the type change work for some documents!
+                return child.copy();
             }
         } finally {
             cursor.dispose();
-            end.dispose();
         }
-        return xmlObject;
+        throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "/n" + xmlObject);
     }
 
-    public static XmlObject getNestedObject(XmlObject xmlObject, String desiredElement) {
-        XmlCursor cursor = xmlObject.newCursor();
-        try {
-            while (cursor.hasNextToken()) {
-                if (cursor.isStart()) {
-                    String localName = cursor.getName().getLocalPart();
-                    if (localName.equals(desiredElement)) {
-                        XmlObject child = cursor.getObject();
-                        //The copy seems to be needed to make the type change work for some documents!
-                        return child.copy();
-                    }
+    public static boolean findNestedElement(XmlCursor cursor, String desiredElement) {
+        while (cursor.hasNextToken()) {
+            if (cursor.isStart()) {
+                String localName = cursor.getName().getLocalPart();
+                if (localName.equals(desiredElement)) {
+                    return true;
                 }
-                cursor.toNextToken();
             }
-        } finally {
-            cursor.dispose();
+            cursor.toNextToken();
         }
-        throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "/n" + xmlObject);
+        return false;
     }
 
     public static XmlObject getNestedObjectAsType(XmlObject xmlObject, String desiredElement, SchemaType type) {
         XmlCursor cursor = xmlObject.newCursor();
         try {
-            while (cursor.hasNextToken()) {
-                if (cursor.isStart()) {
-                    String localName = cursor.getName().getLocalPart();
-                    if (localName.equals(desiredElement)) {
-                        XmlObject child = cursor.getObject();
-                        //The copy seems to be needed to make the type change work for some documents!
-                        XmlObject result = child.copy().changeType(type);
-                        assert result.schemaType() == type;
-                        return result;
-                    }
-                }
-                cursor.toNextToken();
+            if (findNestedElement(cursor, desiredElement)) {
+                XmlObject child = cursor.getObject();
+                //The copy seems to be needed to make the type change work for some documents!
+                XmlObject result = child.copy().changeType(type);
+                assert result.schemaType() == type;
+                return result;
             }
         } finally {
             cursor.dispose();

Modified: geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml Wed Sep 28 19:07:10 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<openejb-jar configId="org/openejb/Itests" parentId="org/apache/geronimo/DefaultDatabase" xmlns="http://www.openejb.org/xml/ns/openejb-jar" xmlns:nam="http://geronimo.apache.org/xml/ns/naming">
+<openejb-jar configId="org/openejb/Itests" parentId="org/apache/geronimo/DefaultDatabase" xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0">
   <dependency>
     <uri>junit/jars/junit-3.8.jar</uri>
   </dependency>

Modified: geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-pre.xml Wed Sep 28 19:07:10 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 
 <openejb-jar
-    xmlns="http://www.openejb.org/xml/ns/openejb-jar"
+    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
     configId="org/openejb/Itests"
     parentId="org/apache/geronimo/DefaultDatabase">
 

Modified: geronimo/branches/1.0-M5/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java (original)
+++ geronimo/branches/1.0-M5/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java Wed Sep 28 19:07:10 2005
@@ -365,15 +365,20 @@
         File srcXml = new File(basedir, "src/test-data/geronimo/ejb-naming-pre.xml");
         File expectedOutputXml = new File(basedir, "src/test-data/geronimo/ejb-naming-post.xml");
         XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
-        xmlObject = SchemaConversionUtils.convertToGeronimoNamingSchema(xmlObject);
-        //        System.out.println(xmlObject.toString());
-        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
-        List problems = new ArrayList();
-        boolean ok = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences: " + problems, ok);
-        xmlObject = SchemaConversionUtils.convertToGeronimoNamingSchema(xmlObject);
-        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences: " + problems, ok2);
+        XmlCursor cursor = xmlObject.newCursor();
+        try {
+            SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+            //        System.out.println(xmlObject.toString());
+            XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+            List problems = new ArrayList();
+            boolean ok = compareXmlObjects(xmlObject, expected, problems);
+            assertTrue("Differences: " + problems, ok);
+            SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+            boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+            assertTrue("Differences: " + problems, ok2);
+        } finally {
+            cursor.dispose();
+        }
     }
 //
     public void testGetNestedObjectAsType() throws Exception {

Modified: geronimo/branches/1.0-M5/modules/jetty-builder/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/jetty-builder/maven.xml?rev=292376&r1=292375&r2=292376&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/jetty-builder/maven.xml (original)
+++ geronimo/branches/1.0-M5/modules/jetty-builder/maven.xml Wed Sep 28 19:07:10 2005
@@ -25,7 +25,7 @@
 
     <preGoal name="java:compile">
         <xmlbeans:schema2java
-            maven.xmlbeans2.sourceschema="schema/geronimo-jetty.xsd"/>
+            maven.xmlbeans2.sourceschema="schema/geronimo-jetty-1.0.xsd,schema/geronimo-jetty-config-1.0.xsd"/>
         <mkdir dir="${basedir}/target/xmlbeans-classes"/>
         <mkdir dir="${basedir}/target/xmlbeans-classes/schemaorg_apache_xmlbeans"/>
         <copy todir="${basedir}/target/xmlbeans-classes/schemaorg_apache_xmlbeans">