geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r957655 [5/15] - in /geronimo/server/trunk: ./ framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/ framework/configs/geronimo-gbean-deployer/src/main/history/ framework/configs/jsr88-cli/src/main/history/ framework/configs...
Date Thu, 24 Jun 2010 18:06:33 GMT
Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java Thu Jun 24 18:06:24 2010
@@ -33,10 +33,10 @@ public class EARConfigBuilder5AltDDTest
         super.setUp();
         earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
-        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, null, jndiContext, parentModule);
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, jndiContext, parentModule);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null, jndiContext, parentModule);
-        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar", null, null, null, null, jndiContext, parentModule);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, jndiContext, parentModule);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar", null, null, null, jndiContext, parentModule);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java Thu Jun 24 18:06:24 2010
@@ -33,10 +33,10 @@ public class EARConfigBuilder5AltDDUnpac
         super.setUp();
         earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
-        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, null, jndiContext, parentModule);
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, jndiContext, parentModule);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null, jndiContext, parentModule);
-        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar/", null, null, null, null, jndiContext, parentModule);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, jndiContext, parentModule);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar/", null, null, null, jndiContext, parentModule);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java Thu Jun 24 18:06:24 2010
@@ -34,10 +34,10 @@ public class EARConfigBuilder5NakedTest
 
         earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-naked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
-        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "test-ejb-jar.jar", null, null, null, null, jndiContext, parentModule);
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "test-ejb-jar.jar", null, null, null, jndiContext, parentModule);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null, jndiContext, parentModule);
-        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "test-rar.rar", null, null, null, null, jndiContext, parentModule);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, jndiContext, parentModule);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "test-rar.rar", null, null, null, jndiContext, parentModule);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java Thu Jun 24 18:06:24 2010
@@ -34,10 +34,10 @@ public class EARConfigBuilder5NakedUnpac
 
         earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-naked-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
-        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, null, jndiContext, parentModule);
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, jndiContext, parentModule);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null, jndiContext, parentModule);
-        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar/", null, null, null, null, jndiContext, parentModule);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, jndiContext, parentModule);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar/", null, null, null, jndiContext, parentModule);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java Thu Jun 24 18:06:24 2010
@@ -34,10 +34,10 @@ public class EARConfigBuilder5Test
 
         earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
-        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar", null, null, null, null, jndiContext, parentModule);
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar", null, null, null, jndiContext, parentModule);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war", null, null, null, contextRoot, WEB_NAMESPACE, null, jndiContext, parentModule);
-        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar", null, null, null, null, jndiContext, parentModule);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war", null, null, null, contextRoot, WEB_NAMESPACE, jndiContext, parentModule);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar", null, null, null, jndiContext, parentModule);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java Thu Jun 24 18:06:24 2010
@@ -34,10 +34,10 @@ public class EARConfigBuilder5UnpackedTe
 
         earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
-        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, null, jndiContext, parentModule);
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, null, "ejb.jar/", null, null, null, jndiContext, parentModule);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null, jndiContext, parentModule);
-        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar/", null, null, null, null, jndiContext, parentModule);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, jndiContext, parentModule);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, null, "rar.rar/", null, null, null, jndiContext, parentModule);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java Thu Jun 24 18:06:24 2010
@@ -52,12 +52,12 @@ public class MockConnectorConfigBuilder 
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName earName = naming.createRootName(new Artifact("test", "test-war", "", "rar"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
         AbstractName moduleName = naming.createChildName(earName, "rar", NameFactory.RESOURCE_ADAPTER_MODULE);
-        return new ConnectorModule(true, moduleName, null, null, moduleFile, "connector", null, null, null, null, null, null);
+        return new ConnectorModule(true, moduleName, null, null, moduleFile, "connector", null, null, null, null, null);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, Module parentModule, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName moduleName = naming.createChildName(parentModule.getModuleName(), "rar", NameFactory.RESOURCE_ADAPTER_MODULE);
-        return new ConnectorModule(false, moduleName, null, null, moduleFile, targetPath, null, null, null, null, Module.share(Module.APP, parentModule.getJndiContext()), parentModule);
+        return new ConnectorModule(false, moduleName, null, null, moduleFile, targetPath, null, null, null, Module.share(Module.APP, parentModule.getJndiContext()), parentModule);
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module connectorModule, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java Thu Jun 24 18:06:24 2010
@@ -48,12 +48,12 @@ public class MockEJBConfigBuilder extend
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName earName = naming.createRootName(new Artifact("test", "test-ejb-jar", "", "jar"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
         AbstractName moduleName = naming.createChildName(earName, "ejb-jar", NameFactory.EJB_MODULE);
-        return new EJBModule(true, moduleName, null, null, moduleFile, "ejb.jar", null, null, null, null, null, null);
+        return new EJBModule(true, moduleName, null, null, moduleFile, "ejb.jar", null, null, null, null, null);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, Module parentModule, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName moduleName = naming.createChildName(parentModule.getModuleName(), "ejb-jar", NameFactory.EJB_MODULE);
-        return new EJBModule(false, moduleName, null, null, moduleFile, targetPath, null, null, null, null, Module.share(Module.APP, parentModule.getJndiContext()), parentModule);
+        return new EJBModule(false, moduleName, null, null, moduleFile, targetPath, null, null, null, Module.share(Module.APP, parentModule.getJndiContext()), parentModule);
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module ejbModule, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java Thu Jun 24 18:06:24 2010
@@ -51,12 +51,12 @@ public class MockWARConfigBuilder extend
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName earName = naming.createRootName(new Artifact("test", "test-war", "", "war"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
         AbstractName moduleName = naming.createChildName(earName, "war", NameFactory.WEB_MODULE);
-        return new WebModule(true, moduleName, null, null, moduleFile, "war", null, null, null, contextRoot, namespace, null, null, null);
+        return new WebModule(true, moduleName, null, null, moduleFile, "war", null, null, null, contextRoot, namespace, null, null);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, Module parentModule, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName moduleName = naming.createChildName(parentModule.getModuleName(), "war", NameFactory.WEB_MODULE);
-        return new WebModule(false, moduleName, null, null, moduleFile, targetPath, null, null, null, contextRoot, namespace, null, Module.share(Module.APP, parentModule.getJndiContext()), parentModule);
+        return new WebModule(false, moduleName, null, null, moduleFile, targetPath, null, null, null, contextRoot, namespace, Module.share(Module.APP, parentModule.getJndiContext()), parentModule);
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module webModule, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws DeploymentException {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/NamingBuilderCollectionTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/NamingBuilderCollectionTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/NamingBuilderCollectionTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/NamingBuilderCollectionTest.java Thu Jun 24 18:06:24 2010
@@ -27,6 +27,7 @@ import junit.framework.TestCase;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.openejb.jee.JndiConsumer;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.XmlObject;
 
@@ -85,13 +86,13 @@ public class NamingBuilderCollectionTest
             this.callList = callList;
         }
         
-        public void buildEnvironment(XmlObject specDD, XmlObject plan, Environment environment)
+        public void buildEnvironment(JndiConsumer specDD, XmlObject plan, Environment environment)
                 throws DeploymentException {
             this.callList.add("buildEnvironment");
             this.callList.add(this);
         }
 
-        public void buildNaming(XmlObject specDD,
+        public void buildNaming(JndiConsumer specDD,
                                 XmlObject plan,
                                 Module module,
                                 Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
@@ -99,7 +100,7 @@ public class NamingBuilderCollectionTest
             this.callList.add(this);
         }
 
-        public void initContext(XmlObject specDD, XmlObject plan, Module module)
+        public void initContext(JndiConsumer specDD, XmlObject plan, Module module)
                 throws DeploymentException {
             this.callList.add("initContext");
             this.callList.add(this);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/SchemaConversionTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/SchemaConversionTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/SchemaConversionTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/SchemaConversionTest.java Thu Jun 24 18:06:24 2010
@@ -37,83 +37,83 @@ public class SchemaConversionTest extend
 
 
     public void testApplication13ToApplication6Transform() throws Exception {
-        URL srcXml = classLoader.getResource("j2ee_1_3dtd/application-13.xml");
-        URL expectedOutputXml = classLoader.getResource("j2ee_1_3dtd/application-6.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
-        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
-        XmlBeansUtil.validateDD(expected);
-        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
-        List problems = new ArrayList();
-        boolean ok = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences: " + problems, ok);
-        //make sure trying to convert twice has no bad effects
-        XmlCursor cursor2 = xmlObject.newCursor();
-        try {
-            String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/application_6.xsd";
-            String version = "6";
-            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version));
-        } finally {
-            cursor2.dispose();
-        }
-        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences after reconverting to schema: " + problems, ok2);
-        //do the whole transform twice...
-        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
-        boolean ok3 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences after reconverting to application schema: " + problems, ok3);
+//        URL srcXml = classLoader.getResource("j2ee_1_3dtd/application-13.xml");
+//        URL expectedOutputXml = classLoader.getResource("j2ee_1_3dtd/application-6.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
+//        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+//        XmlBeansUtil.validateDD(expected);
+//        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
+//        List problems = new ArrayList();
+//        boolean ok = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences: " + problems, ok);
+//        //make sure trying to convert twice has no bad effects
+//        XmlCursor cursor2 = xmlObject.newCursor();
+//        try {
+//            String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/application_6.xsd";
+//            String version = "6";
+//            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version));
+//        } finally {
+//            cursor2.dispose();
+//        }
+//        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences after reconverting to schema: " + problems, ok2);
+//        //do the whole transform twice...
+//        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
+//        boolean ok3 = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences after reconverting to application schema: " + problems, ok3);
     }
 
     public void testApplication14ToApplication6Transform() throws Exception {
-        URL srcXml = classLoader.getResource("j2ee_1_3dtd/application-14.xml");
-        URL expectedOutputXml = classLoader.getResource("j2ee_1_3dtd/application-6.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
-        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
-        XmlBeansUtil.validateDD(expected);
-        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
-        List problems = new ArrayList();
-        boolean ok = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences: " + problems, ok);
-        //make sure trying to convert twice has no bad effects
-        XmlCursor cursor2 = xmlObject.newCursor();
-        try {
-            String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/application_6.xsd";
-            String version = "6";
-            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version));
-        } finally {
-            cursor2.dispose();
-        }
-        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences after reconverting to schema: " + problems, ok2);
-        //do the whole transform twice...
-        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
-        boolean ok3 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences after reconverting to application schema: " + problems, ok3);
+//        URL srcXml = classLoader.getResource("j2ee_1_3dtd/application-14.xml");
+//        URL expectedOutputXml = classLoader.getResource("j2ee_1_3dtd/application-6.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
+//        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+//        XmlBeansUtil.validateDD(expected);
+//        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
+//        List problems = new ArrayList();
+//        boolean ok = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences: " + problems, ok);
+//        //make sure trying to convert twice has no bad effects
+//        XmlCursor cursor2 = xmlObject.newCursor();
+//        try {
+//            String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/application_6.xsd";
+//            String version = "6";
+//            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version));
+//        } finally {
+//            cursor2.dispose();
+//        }
+//        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences after reconverting to schema: " + problems, ok2);
+//        //do the whole transform twice...
+//        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
+//        boolean ok3 = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences after reconverting to application schema: " + problems, ok3);
     }
 
     public void testApplication5ToApplication6Transform() throws Exception {
-        URL srcXml = classLoader.getResource("j2ee_1_3dtd/application-5.xml");
-        URL expectedOutputXml = classLoader.getResource("j2ee_1_3dtd/application-6.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
-        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
-        XmlBeansUtil.validateDD(expected);
-        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
-        List problems = new ArrayList();
-        boolean ok = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences: " + problems, ok);
-        //make sure trying to convert twice has no bad effects
-        XmlCursor cursor2 = xmlObject.newCursor();
-        try {
-            String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/application_6.xsd";
-            String version = "6";
-            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version));
-        } finally {
-            cursor2.dispose();
-        }
-        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences after reconverting to schema: " + problems, ok2);
-        //do the whole transform twice...
-        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
-        boolean ok3 = compareXmlObjects(xmlObject, expected, problems);
-        assertTrue("Differences after reconverting to application schema: " + problems, ok3);
+//        URL srcXml = classLoader.getResource("j2ee_1_3dtd/application-5.xml");
+//        URL expectedOutputXml = classLoader.getResource("j2ee_1_3dtd/application-6.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
+//        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+//        XmlBeansUtil.validateDD(expected);
+//        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
+//        List problems = new ArrayList();
+//        boolean ok = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences: " + problems, ok);
+//        //make sure trying to convert twice has no bad effects
+//        XmlCursor cursor2 = xmlObject.newCursor();
+//        try {
+//            String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/application_6.xsd";
+//            String version = "6";
+//            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version));
+//        } finally {
+//            cursor2.dispose();
+//        }
+//        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences after reconverting to schema: " + problems, ok2);
+//        //do the whole transform twice...
+//        xmlObject = EARConfigBuilder.convertToApplicationSchema(xmlObject);
+//        boolean ok3 = compareXmlObjects(xmlObject, expected, problems);
+//        assertTrue("Differences after reconverting to application schema: " + problems, ok3);
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/annotation/AnnotationHelperTest.java Thu Jun 24 18:06:24 2010
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.j2ee.deployment.annotation;
 
+import java.io.InputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -35,13 +36,14 @@ import javax.persistence.PersistenceCont
 import javax.persistence.PersistenceContexts;
 import javax.persistence.PersistenceUnit;
 import javax.persistence.PersistenceUnits;
+import javax.xml.bind.JAXBException;
 import javax.xml.ws.WebServiceRef;
 import javax.xml.ws.WebServiceRefs;
-
 import org.apache.geronimo.testsupport.XmlBeansTestSupport;
-import org.apache.geronimo.xbeans.javaee6.WebAppDocument;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
+import org.apache.openejb.jee.JaxbJavaee;
+import org.apache.openejb.jee.WebApp;
 import org.apache.xbean.finder.ClassFinder;
+import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
 
@@ -109,16 +111,15 @@ public class AnnotationHelperTest extend
         //-------------------------------------------------
         // Ensure annotations are processed correctly
         //-------------------------------------------------
-        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
-        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        WebAppType webApp = webAppDoc.getWebApp();
-        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
-        EJBAnnotationHelper.processAnnotations(annotatedWebApp, classFinder);
+//        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+        WebApp webApp = load("annotation/empty-web-src.xml", WebApp.class);
+        EJBAnnotationHelper.processAnnotations(webApp, classFinder);
         URL expectedXML = classLoader.getResource("annotation/ejb-expected.xml");
         XmlObject expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[@EJB Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[@EJB Expected XML]" + '\n' + expected.toString() + '\n');
+//        log.debug("[@EJB Source XML] " + '\n' + webApp.toString() + '\n');
+//        log.debug("[@EJB Expected XML]" + '\n' + expected.toString() + '\n');
         List problems = new ArrayList();
         boolean ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
@@ -150,16 +151,17 @@ public class AnnotationHelperTest extend
         //-------------------------------------------------
         // Ensure annotations are processed correctly
         //-------------------------------------------------
-        URL srcXML = classLoader.getResource("annotation/handler-chain-src.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
-        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        WebAppType webApp = webAppDoc.getWebApp();
-        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
-        HandlerChainAnnotationHelper.processAnnotations(annotatedWebApp, classFinder);
+//        URL srcXML = classLoader.getResource("annotation/handler-chain-src.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+//        WebAppType webApp = webAppDoc.getWebApp();
+//        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
+        WebApp webApp = load("annotation/handler-chain-src.xml", WebApp.class);
+        HandlerChainAnnotationHelper.processAnnotations(webApp, classFinder);
         URL expectedXML = classLoader.getResource("annotation/handler-chain-expected.xml");
         XmlObject expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[@HandlerChain Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[@HandlerChain Expected XML]" + '\n' + expected.toString() + '\n');
+//        log.debug("[@HandlerChain Source XML] " + '\n' + webApp.toString() + '\n');
+//        log.debug("[@HandlerChain Expected XML]" + '\n' + expected.toString() + '\n');
         List problems = new ArrayList();
         boolean ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
@@ -191,16 +193,17 @@ public class AnnotationHelperTest extend
         //-------------------------------------------------
         // Ensure annotations are processed correctly
         //-------------------------------------------------
-        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
-        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        WebAppType webApp = webAppDoc.getWebApp();
-        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
-        PersistenceContextAnnotationHelper.processAnnotations(annotatedWebApp, classFinder);
+//        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+//        WebAppType webApp = webAppDoc.getWebApp();
+//        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
+        WebApp webApp = load("annotation/empty-web-src.xml", WebApp.class);
+        PersistenceContextAnnotationHelper.processAnnotations(webApp, classFinder);
         URL expectedXML = classLoader.getResource("annotation/persistence-context-expected.xml");
         XmlObject expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[@PersistenceContext Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[@PersistenceContext Expected XML]" + '\n' + expected.toString() + '\n');
+//        log.debug("[@PersistenceContext Source XML] " + '\n' + webApp.toString() + '\n');
+//        log.debug("[@PersistenceContext Expected XML]" + '\n' + expected.toString() + '\n');
         List problems = new ArrayList();
         boolean ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
@@ -229,16 +232,17 @@ public class AnnotationHelperTest extend
         //-------------------------------------------------
         // Ensure annotations are processed correctly
         //-------------------------------------------------
-        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
-        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        WebAppType webApp = webAppDoc.getWebApp();
-        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
-        PersistenceUnitAnnotationHelper.processAnnotations(annotatedWebApp, classFinder);
+//        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+//        WebAppType webApp = webAppDoc.getWebApp();
+//        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
+        WebApp webApp = load("annotation/empty-web-src.xml", WebApp.class);
+        PersistenceUnitAnnotationHelper.processAnnotations(webApp, classFinder);
         URL expectedXML = classLoader.getResource("annotation/persistence-unit-expected.xml");
         XmlObject expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[@PersistenceUnit Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[@PersistenceUnit Expected XML]" + '\n' + expected.toString() + '\n');
+//        log.debug("[@PersistenceUnit Source XML] " + '\n' + webApp.toString() + '\n');
+//        log.debug("[@PersistenceUnit Expected XML]" + '\n' + expected.toString() + '\n');
         List problems = new ArrayList();
         boolean ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
@@ -274,16 +278,17 @@ public class AnnotationHelperTest extend
         //-------------------------------------------------
         // Ensure annotations are processed correctly
         //-------------------------------------------------
-        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
-        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        WebAppType webApp = webAppDoc.getWebApp();
-        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
-        WebServiceRefAnnotationHelper.processAnnotations(annotatedWebApp, classFinder);
+//        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+//        WebAppType webApp = webAppDoc.getWebApp();
+//        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
+        WebApp webApp = load("annotation/empty-web-src.xml", WebApp.class);
+        WebServiceRefAnnotationHelper.processAnnotations(webApp, classFinder);
         URL expectedXML = classLoader.getResource("annotation/webservice-ref-expected.xml");
         XmlObject expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[@WebServiceRef Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[@WebServiceRef Expected XML]" + '\n' + expected.toString() + '\n');
+//        log.debug("[@WebServiceRef Source XML] " + '\n' + webApp.toString() + '\n');
+//        log.debug("[@WebServiceRef Expected XML]" + '\n' + expected.toString() + '\n');
         List problems = new ArrayList();
         boolean ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
@@ -309,30 +314,49 @@ public class AnnotationHelperTest extend
         //-------------------------------------------------
         // Ensure annotations are processed correctly
         //-------------------------------------------------
-        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
-        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        WebAppType webApp = webAppDoc.getWebApp();
+//        URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
+//        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+//        WebAppType webApp = webAppDoc.getWebApp();
+        WebApp webApp = load("annotation/empty-web-src.xml", WebApp.class);
         SecurityAnnotationHelper.processAnnotations(webApp, classFinder);
         URL expectedXML = classLoader.getResource("annotation/security-expected.xml");
         XmlObject expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[Security Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[Security Expected XML]" + '\n' + expected.toString() + '\n');
         List problems = new ArrayList();
         boolean ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
 
-        srcXML = classLoader.getResource("annotation/security-src.xml");
-        xmlObject = XmlObject.Factory.parse(srcXML, options);
-        webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
-        webApp = webAppDoc.getWebApp();
+//        srcXML = classLoader.getResource("annotation/security-src.xml");
+//        xmlObject = XmlObject.Factory.parse(srcXML, options);
+//        webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
+//        webApp = webAppDoc.getWebApp();
+        webApp = load("annotation/security-src.xml", WebApp.class);
         SecurityAnnotationHelper.processAnnotations(webApp, classFinder);
         expectedXML = classLoader.getResource("annotation/security-expected-1.xml");
         expected = XmlObject.Factory.parse(expectedXML);
-        log.debug("[Security Source XML] " + '\n' + webApp.toString() + '\n');
-        log.debug("[Security Expected XML]" + '\n' + expected.toString() + '\n');
+//        log.debug("[Security Source XML] " + '\n' + webApp.toString() + '\n');
+//        log.debug("[Security Expected XML]" + '\n' + expected.toString() + '\n');
         problems = new ArrayList();
         ok = compareXmlObjects(webApp, expected, problems);
         assertTrue("Differences: " + problems, ok);
     }
+
+    private boolean compareXmlObjects(WebApp webApp, XmlObject expected, List problems) throws JAXBException, XmlException {
+        String xml = JaxbJavaee.marshal(WebApp.class, webApp);
+        log.debug("[Source XML] " + '\n' + xml + '\n');
+        log.debug("[Expected XML]" + '\n' + expected.toString() + '\n');
+        XmlObject actual = XmlObject.Factory.parse(xml);
+        return compareXmlObjects(actual, expected, problems);
+    }
+
+    private <T> T load(String url, Class<T> clazz) throws Exception {
+        URL srcXml = classLoader.getResource(url);
+        InputStream in = srcXml.openStream();
+        try {
+            return (T) JaxbJavaee.unmarshal(clazz, in);
+        } finally {
+            in.close();
+        }
+    }
+
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/ejb-expected.xml Thu Jun 24 18:06:24 2010
@@ -21,8 +21,8 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>Empty web application</display-name>
     <description>Empty web application</description>
+    <display-name>Empty web application</display-name>
     <ejb-ref>
         <description>description1</description>
         <ejb-ref-name>EJB1</ejb-ref-name>
@@ -30,6 +30,25 @@
         <ejb-link>beanName1</ejb-link>
         <mapped-name>mappedName1</mapped-name>
     </ejb-ref>
+    <ejb-ref>
+        <description>description5</description>
+        <ejb-ref-name>EJB5</ejb-ref-name>
+        <remote>javax.ejb.EJBHome</remote>
+        <ejb-link>beanName5</ejb-link>
+        <mapped-name>mappedName5</mapped-name>
+    </ejb-ref>
+    <ejb-ref>
+        <ejb-ref-name>myejb2</ejb-ref-name>
+        <remote>javax.ejb.EJBHome</remote>
+        <injection-target>
+            <injection-target-class>org.apache.geronimo.j2ee.deployment.annotation.EJBAnnotationExample</injection-target-class>
+            <injection-target-name>annotatedField5</injection-target-name>
+        </injection-target>
+        <injection-target>
+            <injection-target-class>org.apache.geronimo.j2ee.deployment.annotation.EJBAnnotationExample</injection-target-class>
+            <injection-target-name>annotatedField6</injection-target-name>
+        </injection-target>
+    </ejb-ref>
     <ejb-local-ref>
         <description>description2</description>
         <ejb-ref-name>EJB2</ejb-ref-name>
@@ -44,13 +63,6 @@
         <ejb-link>beanName4</ejb-link>
         <mapped-name>mappedName4</mapped-name>
     </ejb-local-ref>
-    <ejb-ref>
-        <description>description5</description>
-        <ejb-ref-name>EJB5</ejb-ref-name>
-        <remote>javax.ejb.EJBHome</remote>
-        <ejb-link>beanName5</ejb-link>
-        <mapped-name>mappedName5</mapped-name>
-    </ejb-ref>
     <ejb-local-ref>
         <description>description6</description>
         <ejb-ref-name>EJB6</ejb-ref-name>
@@ -80,17 +92,5 @@
             <injection-target-name>annotatedField4</injection-target-name>
         </injection-target>
     </ejb-local-ref>
-    <ejb-ref>
-        <ejb-ref-name>myejb2</ejb-ref-name>
-        <remote>javax.ejb.EJBHome</remote>
-        <injection-target>
-            <injection-target-class>org.apache.geronimo.j2ee.deployment.annotation.EJBAnnotationExample</injection-target-class>
-            <injection-target-name>annotatedField5</injection-target-name>
-        </injection-target>
-        <injection-target>
-            <injection-target-class>org.apache.geronimo.j2ee.deployment.annotation.EJBAnnotationExample</injection-target-class>
-            <injection-target-name>annotatedField6</injection-target-name>
-        </injection-target>
-    </ejb-ref>
 
 </web-app>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/handler-chain-expected.xml Thu Jun 24 18:06:24 2010
@@ -21,8 +21,8 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>HandlerChain web application</display-name>
     <description>HandlerChain web application</description>
+    <display-name>HandlerChain web application</display-name>
     <service-ref>
         <service-ref-name>WebServiceRef1</service-ref-name>
         <service-interface>javax.xml.ws.Service</service-interface>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-context-expected.xml Thu Jun 24 18:06:24 2010
@@ -21,11 +21,11 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>Empty web application</display-name>
     <description>Empty web application</description>
+    <display-name>Empty web application</display-name>
     <persistence-context-ref>
         <persistence-context-ref-name>PersistenceContext1</persistence-context-ref-name>
-        <persistence-context-type>Transaction</persistence-context-type>
+        <persistence-context-type>Transactional</persistence-context-type>
         <persistence-property>
             <name>property1</name>
             <value>value1</value>
@@ -51,7 +51,7 @@
     <persistence-context-ref>
         <persistence-context-ref-name>PersistenceContext4</persistence-context-ref-name>
         <persistence-unit-name>unitName5</persistence-unit-name>
-        <persistence-context-type>Transaction</persistence-context-type>
+        <persistence-context-type>Transactional</persistence-context-type>
         <persistence-property>
             <name>property9</name>
             <value>value9</value>
@@ -75,7 +75,7 @@
     </persistence-context-ref>
     <persistence-context-ref>
         <persistence-context-ref-name>PersistenceContext3</persistence-context-ref-name>
-        <persistence-context-type>Transaction</persistence-context-type>
+        <persistence-context-type>Transactional</persistence-context-type>
         <persistence-property>
             <name>property5</name>
             <value>value5</value>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/persistence-unit-expected.xml Thu Jun 24 18:06:24 2010
@@ -21,8 +21,8 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>Empty web application</display-name>
     <description>Empty web application</description>
+    <display-name>Empty web application</display-name>
     <persistence-unit-ref>
         <persistence-unit-ref-name>PersistenceUnit1</persistence-unit-ref-name>
         <persistence-unit-name>unitName1</persistence-unit-name>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected-1.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected-1.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected-1.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected-1.xml Thu Jun 24 18:06:24 2010
@@ -21,8 +21,8 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>Empty web application</display-name>
     <description>Empty web application</description>
+    <display-name>Empty web application</display-name>
     <servlet>
         <servlet-name>SecurityAnnotationTest</servlet-name>
         <servlet-class>org.apache.geronimo.j2ee.deployment.annotation.SecurityAnnotationExample</servlet-class>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/security-expected.xml Thu Jun 24 18:06:24 2010
@@ -21,8 +21,8 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>Empty web application</display-name>
     <description>Empty web application</description>
+    <display-name>Empty web application</display-name>
     <security-role>
         <role-name>securityRole1</role-name>
     </security-role>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/resources/annotation/webservice-ref-expected.xml Thu Jun 24 18:06:24 2010
@@ -21,8 +21,8 @@
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" >
 
-    <display-name>Empty web application</display-name>
     <description>Empty web application</description>
+    <display-name>Empty web application</display-name>
     <service-ref>
         <service-ref-name>WebServiceRef10</service-ref-name>
         <service-interface>javax.xml.ws.Service</service-interface>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/pom.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/pom.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/pom.xml Thu Jun 24 18:06:24 2010
@@ -46,20 +46,20 @@
             <artifactId>org.apache.servicemix.bundles.xmlbeans</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.geronimo.schema</groupId>
-            <artifactId>geronimo-schema-javaee_6</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.schema</groupId>
-            <artifactId>geronimo-schema-jee_5</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.schema</groupId>
-            <artifactId>geronimo-schema-j2ee_1.4</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.schema</groupId>-->
+            <!--<artifactId>geronimo-schema-javaee_6</artifactId>-->
+        <!--</dependency>-->
+
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.schema</groupId>-->
+            <!--<artifactId>geronimo-schema-jee_5</artifactId>-->
+        <!--</dependency>-->
+
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.schema</groupId>-->
+            <!--<artifactId>geronimo-schema-j2ee_1.4</artifactId>-->
+        <!--</dependency>-->
     </dependencies>
 
     <build>
@@ -72,14 +72,6 @@
                         <!--packages containing "impl" or "internal" are excluded by default -->
                         <Import-Package>
                             org.apache.xmlbeans.impl.schema;version="2.4",
-                            org.apache.geronimo.xbeans.j2ee.impl,
-                            org.apache.geronimo.xbeans.j2ee,
-                            org.w3.xml.x1998.namespace.impl,
-                            org.w3.xml.x1998.namespace,
-                            org.apache.geronimo.xbeans.javaee.impl,
-                            org.apache.geronimo.xbeans.javaee,
-                            org.apache.geronimo.xbeans.persistence.impl,
-                            org.apache.geronimo.xbeans.persistence,
                             *
                         </Import-Package>
                         <DynamicImport-Package>schemaorg_apache_xmlbeans.*</DynamicImport-Package>

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/SchemaConversionUtils.java Thu Jun 24 18:06:24 2010
@@ -21,12 +21,9 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.xml.namespace.QName;
-
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.xbeans.javaee6.WebAppDocument;
 import org.apache.xmlbeans.SchemaType;
 import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlDocumentProperties;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 
@@ -35,12 +32,10 @@ import org.apache.xmlbeans.XmlObject;
  */
 public class SchemaConversionUtils {
     public static final String J2EE_NAMESPACE = "http://java.sun.com/xml/ns/j2ee";
-    public static final String JAVAEE_NAMESPACE = "http://java.sun.com/xml/ns/javaee";
 
     static final String GERONIMO_NAMING_NAMESPACE = "http://geronimo.apache.org/xml/ns/naming-1.2";
     private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.2";
     public static final String JPA_PERSISTENCE_NAMESPACE = "http://java.sun.com/xml/ns/persistence";
-    private static final QName TAGLIB = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "taglib");
 
     private static final Map<String, ElementConverter> GERONIMO_SCHEMA_CONVERSIONS = new HashMap<String, ElementConverter>();
 
@@ -126,20 +121,6 @@ public class SchemaConversionUtils {
         }
     }
 
-    public static XmlObject getNestedObject(XmlObject xmlObject, QName desiredElement) {
-        XmlCursor cursor = xmlObject.newCursor();
-        try {
-            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();
-        }
-        throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "/n" + xmlObject);
-    }
-
     public static boolean findNestedElement(XmlCursor cursor, QName desiredElement) {
         while (cursor.hasNextToken()) {
             if (cursor.isStart()) {
@@ -182,66 +163,6 @@ public class SchemaConversionUtils {
         throw new IllegalArgumentException("xmlobject did not have desired element: " + desiredElement + "\n" + xmlObject);
     }
 
-
-    public static boolean convertToSchema(XmlCursor cursor, String namespace, String schemaLocationURL, String version) {
-        //remove dtd
-        XmlDocumentProperties xmlDocumentProperties = cursor.documentProperties();
-        xmlDocumentProperties.remove(XmlDocumentProperties.DOCTYPE_NAME);
-        xmlDocumentProperties.remove(XmlDocumentProperties.DOCTYPE_PUBLIC_ID);
-        xmlDocumentProperties.remove(XmlDocumentProperties.DOCTYPE_SYSTEM_ID);
-        //convert namespace
-        boolean isFirstStart = true;
-        while (cursor.hasNextToken()) {
-            if (cursor.isStart()) {
-                if (namespace.equals(cursor.getName().getNamespaceURI())) {
-                    //already has correct schema, exit
-                    return false;
-                }
-                cursor.setName(new QName(namespace, cursor.getName().getLocalPart()));
-                cursor.toNextToken();
-                if (isFirstStart) {
-                    cursor.insertNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
-                    cursor.insertAttributeWithValue(new QName("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation", "xsi"), namespace + "  " + schemaLocationURL);
-                    cursor.insertAttributeWithValue(new QName("version"), version);
-                    isFirstStart = false;
-                }
-            } else {
-                cursor.toNextToken();
-            }
-        }
-        return true;
-    }
-
-    public static boolean convertSchemaVersion (XmlCursor cursor, String namespace, String schemaLocationURL, String version) {
-        boolean isFirstStart = true;
-
-
-        while (cursor.hasNextToken()) {
-            if (cursor.isStart()) {
-                if (isFirstStart) {
-                    //HACK to work around digester's difficulty with namespaces
-                    if (cursor.getAttributeText(new QName("xmlns")) != null) {
-                        cursor.removeAttribute(new QName("xmlns"));
-                    }
-                    //if we are at the first element in the document, reset the version number ...
-                    cursor.setAttributeText(new QName("version"), version);
-                    //... and also set the xsi:schemaLocation
-                    cursor.setAttributeText(new QName("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation", "xsi"), namespace + "  "+schemaLocationURL);
-                    isFirstStart = false;
-                }
-                //convert namespace of each starting element
-                cursor.setName(new QName(namespace, cursor.getName().getLocalPart()));
-                cursor.toNextToken();
-
-            } else {
-                cursor.toNextToken();
-            }
-        }
-
-
-        return true;
-    }
-
     public static boolean convertSchemaVersion(XmlCursor start, XmlCursor end, String namespace, String schemaLocationURL, String version) {
         boolean isFirstStart = true;
         end.toCursor(start);
@@ -269,8 +190,9 @@ public class SchemaConversionUtils {
     /**
      * Reorders elements to match descriptionGroup
      *
-     * @param namespace
+     * @param namespace new namespace
      * @param cursor XmlCursor positioned at first element of "group" to be reordered
+     * @param moveable XmlCursor to use as a temp pointer
      */
     public static void convertToDescriptionGroup(String namespace, XmlCursor cursor, XmlCursor moveable) {
         moveable.toCursor(cursor);
@@ -279,66 +201,6 @@ public class SchemaConversionUtils {
         moveElements("icon", namespace, moveable, cursor);
     }
 
-    public static void convertToTldTag(String namespace, XmlCursor cursor, XmlCursor moveable) {
-        moveable.toCursor(cursor);
-        moveElements("description", namespace, moveable, cursor);
-        moveElements("display-name", namespace, moveable, cursor);
-        moveElements("icon", namespace, moveable, cursor);
-        moveElements("name", namespace, moveable, cursor);
-        moveElements("tag-class", namespace, moveable, cursor);
-        moveElements("tei-class", namespace, moveable, cursor);
-        moveElements("body-content", namespace, moveable, cursor);
-        moveElements("variable", namespace, moveable, cursor);
-        moveElements("attribute", namespace, moveable, cursor);
-        moveElements("dynamic-attributes", namespace, moveable, cursor);
-        moveElements("example", namespace, moveable, cursor);
-        moveElements("tag-extension", namespace, moveable, cursor);
-    }
-
-    public static void convertToTldAttribute(String namespace, XmlCursor cursor, XmlCursor moveable) {
-        moveable.toCursor(cursor);
-        moveElements("description", namespace, moveable, cursor);
-        moveElements("name", namespace, moveable, cursor);
-        moveElements("required", namespace, moveable, cursor);
-        moveElements("rtexprvalue", namespace, moveable, cursor);
-        moveElements("type", namespace, moveable, cursor);
-        moveElements("fragment", namespace, moveable, cursor);
-    }
-
-    public static void convertToTldInitParam(String namespace, XmlCursor cursor, XmlCursor moveable) {
-        moveable.toCursor(cursor);
-        moveElements("description", namespace, moveable, cursor);
-        moveElements("param-name", namespace, moveable, cursor);
-        moveElements("param-value", namespace, moveable, cursor);
-    }
-
-    public static void convertToTldValidator(String namespace, XmlCursor cursor, XmlCursor moveable) {
-        moveable.toCursor(cursor);
-        moveElements("description", namespace, moveable, cursor);
-        moveElements("validator-class", namespace, moveable, cursor);
-        moveElements("init-param", namespace, moveable, cursor);
-
-        do {
-            String name = cursor.getName().getLocalPart();
-            if ("init-param".equals(name)) {
-                cursor.push();
-                cursor.toFirstChild();
-                convertToTldInitParam(namespace, cursor, moveable);
-                cursor.pop();
-            }
-        } while (cursor.toPrevSibling());
-    }
-
-    public static void convertToTldVariable(String namespace, XmlCursor cursor, XmlCursor moveable) {
-        moveable.toCursor(cursor);
-        moveElements("description", namespace, moveable, cursor);
-        moveElements("name-given", namespace, moveable, cursor);
-        moveElements("name-from-attribute", namespace, moveable, cursor);
-        moveElements("variable-class", namespace, moveable, cursor);
-        moveElements("declare", namespace, moveable, cursor);
-        moveElements("scope", namespace, moveable, cursor);
-    }
-
     public static void convertToJNDIEnvironmentRefsGroup(String namespace, XmlCursor cursor, XmlCursor moveable) {
         moveElements("env-entry", namespace, moveable, cursor);
         moveElements("ejb-ref", namespace, moveable, cursor);
@@ -365,88 +227,6 @@ public class SchemaConversionUtils {
         moveElements("env-entry-value", namespace, moveable, cursor);
     }
 
-    public static  WebAppDocument convertToServletSchema(XmlObject xmlObject) throws XmlException {
-        String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
-        String version = "3.0";
-        XmlCursor cursor = xmlObject.newCursor();
-        try {
-            cursor.toStartDoc();
-            cursor.toFirstChild();
-            String nameSpaceURI = cursor.getName().getNamespaceURI();
-            if ("http://java.sun.com/xml/ns/javaee".equals(nameSpaceURI) || "http://java.sun.com/xml/ns/j2ee".equals(nameSpaceURI)) {
-                SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version);
-                XmlObject result = xmlObject.changeType(WebAppDocument.type);
-                XmlBeansUtil.validateDD(result);
-                return (WebAppDocument) result;
-            }
-            //otherwise assume DTD
-            XmlDocumentProperties xmlDocumentProperties = cursor.documentProperties();
-            String publicId = xmlDocumentProperties.getDoctypePublicId();
-            boolean is22 = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN".equals(publicId);
-            if ("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".equals(publicId) || is22) {
-                XmlCursor moveable = xmlObject.newCursor();
-                try {
-                    moveable.toStartDoc();
-                    moveable.toFirstChild();
-                    SchemaConversionUtils.convertToSchema(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version);
-                    cursor.toStartDoc();
-                    cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "web-app");
-                    cursor.toFirstChild();
-                    SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
-                    SchemaConversionUtils.convertToJNDIEnvironmentRefsGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
-                    cursor.push();
-                    if (cursor.toNextSibling(TAGLIB)) {
-                        cursor.toPrevSibling();
-                        moveable.toCursor(cursor);
-                        cursor.beginElement("jsp-config", SchemaConversionUtils.JAVAEE_NAMESPACE);
-                        while (moveable.toNextSibling(TAGLIB)) {
-                            moveable.moveXml(cursor);
-                        }
-                    }
-                    cursor.pop();
-                    do {
-                        String name = cursor.getName().getLocalPart();
-                        if ("filter".equals(name) || "servlet".equals(name) || "context-param".equals(name)) {
-                            cursor.push();
-                            cursor.toFirstChild();
-                            SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
-                            while (cursor.toNextSibling(SchemaConversionUtils.JAVAEE_NAMESPACE, "init-param")) {
-                                cursor.push();
-                                cursor.toFirstChild();
-                                SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
-                                cursor.pop();
-                            }
-                            cursor.pop();
-                            cursor.push();
-                            if (cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "jsp-file")) {
-                                String jspFile = cursor.getTextValue();
-                                if (!jspFile.startsWith("/")) {
-                                    if (is22) {
-                                        cursor.setTextValue("/" + jspFile);
-                                    } else {
-                                        throw new XmlException("jsp-file does not start with / and this is not a 2.2 web app: " + jspFile);
-                                    }
-                                }
-                            }
-                            cursor.pop();
-                        }
-                    } while (cursor.toNextSibling());
-                } finally {
-                    moveable.dispose();
-                }
-            }
-        } finally {
-            cursor.dispose();
-        }
-        XmlObject result = xmlObject.changeType(WebAppDocument.type);
-        if (result != null) {
-            XmlBeansUtil.validateDD(result);
-            return (WebAppDocument) result;
-        }
-        XmlBeansUtil.validateDD(xmlObject);
-        return (WebAppDocument) xmlObject;
-    }
-
     private static void moveElements(String localName, String namespace, XmlCursor moveable, XmlCursor toHere) {
         QName name = new QName(namespace, localName);
         //skip elements already in the correct order.

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/test/java/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/test/java/org/apache/geronimo/schema/SchemaConversionUtilsTest.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/test/java/org/apache/geronimo/schema/SchemaConversionUtilsTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-schema/src/test/java/org/apache/geronimo/schema/SchemaConversionUtilsTest.java Thu Jun 24 18:06:24 2010
@@ -21,11 +21,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.net.URL;
 
-import javax.xml.namespace.QName;
-
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlObject;
-import org.apache.geronimo.xbeans.javaee6.EjbJarType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.testsupport.XmlBeansTestSupport;
 
@@ -134,14 +131,6 @@ public class SchemaConversionUtilsTest e
         }
     }
     
-    public void testGetNestedObjectAsType() throws Exception {
-        URL srcXml = classLoader.getResource("geronimo/ejb-naming-pre.xml");
-//        URL expectedOutputXml = classLoader.getResource("geronimo/ejb-naming-post.xml");
-        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
-        //this is not a usable type, we'll see what happens though
-        xmlObject = SchemaConversionUtils.getNestedObjectAsType(xmlObject, new QName("http://openejb.apache.org/xml/ns/openejb-jar-2.3", "openejb-jar"), EjbJarType.type);
-    }
-
     public void testSecurityElementConverter() throws Exception {
         URL srcXml = classLoader.getResource("geronimo/security-pre.xml");
         URL expectedOutputXml = classLoader.getResource("geronimo/security-post.xml");

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/pom.xml?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/pom.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/pom.xml Thu Jun 24 18:06:24 2010
@@ -42,6 +42,10 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-jee</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.geronimo.framework</groupId>
             <artifactId>geronimo-service-builder</artifactId>
             <version>${project.version}</version>
@@ -81,14 +85,6 @@
                     <instructions>
                         <!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
                         <Import-Package>
-                            org.apache.geronimo.xbeans.javaee.impl,
-                            org.apache.geronimo.xbeans.javaee,
-                            org.apache.geronimo.xbeans.persistence.impl,
-                            org.apache.geronimo.xbeans.persistence,
-                            org.apache.geronimo.xbeans.j2ee.impl,
-                            org.apache.geronimo.xbeans.j2ee,
-                            org.w3.xml.x1998.namespace.impl,
-                            org.w3.xml.x1998.namespace,
                             org.apache.geronimo.deployment.xbeans.impl,
                             org.apache.geronimo.deployment.javabean.xbeans.impl,
                             org.apache.geronimo.deployment.xbeans,

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/AbstractNamingBuilder.java Thu Jun 24 18:06:24 2010
@@ -28,7 +28,6 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.xml.namespace.QName;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
@@ -48,10 +47,10 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.schema.NamespaceElementConverter;
 import org.apache.geronimo.xbeans.geronimo.naming.GerAbstractNamingEntryDocument;
-import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerAbstractNamingEntryType;
-import org.apache.geronimo.xbeans.javaee6.InjectionTargetType;
-import org.apache.geronimo.xbeans.javaee6.XsdStringType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
+import org.apache.openejb.jee.InjectionTarget;
+import org.apache.openejb.jee.JndiConsumer;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.SchemaType;
 import org.apache.xmlbeans.XmlCursor;
@@ -84,7 +83,7 @@ public abstract class AbstractNamingBuil
         return this.defaultEnvironment;
     }
 
-    public void buildEnvironment(XmlObject specDD, XmlObject plan, Environment environment) throws DeploymentException {
+    public void buildEnvironment(JndiConsumer specDD, XmlObject plan, Environment environment) throws DeploymentException {
         // TODO Currently this method is called before the xml is metadata complete, so will not contain all refs
         // Just always call mergeEnvironment until this is fixed
         //
@@ -93,7 +92,7 @@ public abstract class AbstractNamingBuil
         // }
     }
 
-    protected boolean willMergeEnvironment(XmlObject specDD, XmlObject plan) throws DeploymentException {
+    protected boolean willMergeEnvironment(JndiConsumer specDD, XmlObject plan) throws DeploymentException {
         return false;
     }
 
@@ -124,7 +123,7 @@ public abstract class AbstractNamingBuil
         return false;
     }
 
-    public void initContext(XmlObject specDD, XmlObject plan, Module module) throws DeploymentException {
+    public void initContext(JndiConsumer specDD, XmlObject plan, Module module) throws DeploymentException {
     }
     
     public int getPriority() {
@@ -269,35 +268,10 @@ public abstract class AbstractNamingBuil
         return xmlObject;
     }
 
-    protected static String getStringValue(org.apache.geronimo.xbeans.javaee6.String string) {
-        if (string == null) {
-            return null;
-        }
-        String s = string.getStringValue();
-        return s == null ? null : s.trim();
-    }
-
-    protected static String getUntrimmedStringValue(org.apache.geronimo.xbeans.javaee6.String string) {
-        if (string == null) {
-            return null;
-        }
-        return string.getStringValue();
-    }
-
-    protected static String getStringValue(XsdStringType string) {
-        if (string == null) {
-            return null;
-        }
-        String s = string.getStringValue();
+    protected static String getStringValue(String s) {
         return s == null ? null : s.trim();
     }
     
-    protected static String getUntrimmedStringValue(XsdStringType string) {
-        if (string == null) {
-            return null;
-        }
-        return string.getStringValue();
-    }
 
     public static AbstractNameQuery buildAbstractNameQuery(GerPatternType pattern, String type, String moduleType, Set interfaceTypes) {
         return ENCConfigBuilder.buildAbstractNameQueryFromPattern(pattern, null, type, moduleType, interfaceTypes);
@@ -333,11 +307,11 @@ public abstract class AbstractNamingBuil
     }
 
 
-    protected void addInjections(String jndiName, InjectionTargetType[] injectionTargetArray, Map<EARContext.Key, Object> sharedContext) {
+    protected void addInjections(String jndiName, List<InjectionTarget> injectionTargetArray, Map<EARContext.Key, Object> sharedContext) {
         Holder holder = NamingBuilder.INJECTION_KEY.get(sharedContext);
-        for (InjectionTargetType injectionTarget : injectionTargetArray) {
-            String targetName = injectionTarget.getInjectionTargetName().getStringValue().trim();
-            String targetClassName = injectionTarget.getInjectionTargetClass().getStringValue().trim();
+        for (InjectionTarget injectionTarget : injectionTargetArray) {
+            String targetName = injectionTarget.getInjectionTargetName().trim();
+            String targetClassName = injectionTarget.getInjectionTargetClass().trim();
             holder.addInjection(targetClassName, new Injection(targetClassName, targetName, jndiName));
         }
     }
@@ -354,7 +328,7 @@ public abstract class AbstractNamingBuil
         return BASE_NAMING_QNAME;
     }
 
-    protected String inferAndCheckType(Module module, Bundle bundle, InjectionTargetType[] injectionTargets, String name, String typeName) throws DeploymentException {
+    protected String inferAndCheckType(Module module, Bundle bundle, List<InjectionTarget> injectionTargets, String name, String typeName) throws DeploymentException {
         Class<?> type = null;
         if (typeName != null) {
             try {
@@ -363,14 +337,13 @@ public abstract class AbstractNamingBuil
                 throw new DeploymentException("could not load type class for env entry named: " + name, e);
             }
         }
-        for (InjectionTargetType injectionTarget : injectionTargets) {
+        for (InjectionTarget injectionTarget : injectionTargets) {
             String className = getStringValue(injectionTarget.getInjectionTargetClass());
             try {
                 Class<?> clazz = bundle.loadClass(className);
                 String fieldName = getStringValue(injectionTarget.getInjectionTargetName());
                 Field field = getField(clazz, fieldName);
-                Class<?> fieldType = field.getType();
-                fieldType = fieldType.isPrimitive()? primitives.get(fieldType): fieldType;
+                Class<?> fieldType = deprimitivize(field.getType());
                 if (type == null) {
                     type = fieldType;
                 } else if (!fieldType.equals(type)) {
@@ -389,11 +362,16 @@ public abstract class AbstractNamingBuil
             }
         }
         if (type == null) {
-            throw new DeploymentException("No way to determine type of env-entry " + name + " in component " + module.getAnnotatedApp().toString());
+            throw new DeploymentException("No way to determine type of env-entry " + name + " in component " + module.toString());
         }
         return type.getName();
     }
 
+    //duplicated in ResourceAnnotationHelper
+    private static Class<?> deprimitivize(Class<?> fieldType) {
+        return fieldType = fieldType.isPrimitive()? primitives.get(fieldType): fieldType;
+    }
+
     private static final Map<Class<?>, Class<?>> primitives = new HashMap<Class<?>, Class<?>>();
 
     static {



Mime
View raw message