geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r413779 - in /geronimo/trunk/modules: j2ee-schema/src/java/org/apache/geronimo/schema/ j2ee-schema/src/test-data/geronimo/ j2ee-schema/src/test/org/apache/geronimo/schema/ web-builder/src/test-resources/plans/ web-builder/src/test/org/apach...
Date Tue, 13 Jun 2006 01:11:57 GMT
Author: djencks
Date: Mon Jun 12 18:11:57 2006
New Revision: 413779

URL: http://svn.apache.org/viewvc?rev=413779&view=rev
Log:
GERONIMO-2108 Add message-destination to the tags we convert to naming schema

Added:
    geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml   (with props)
    geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml   (with props)
    geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml   (with props)
    geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml   (with props)
Modified:
    geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
    geronimo/trunk/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
    geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java

Modified: geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=413779&r1=413778&r2=413779&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
(original)
+++ geronimo/trunk/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
Mon Jun 12 18:11:57 2006
@@ -59,6 +59,7 @@
         GERONIMO_SCHEMA_CONVERSIONS.put("service-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("resource-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("resource-env-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
+        GERONIMO_SCHEMA_CONVERSIONS.put("message-destination", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("cmp-connection-factory", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("workmanager", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("resource-adapter", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));

Added: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml?rev=413779&view=auto
==============================================================================
--- geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml (added)
+++ geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml Mon Jun 12 18:11:57
2006
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+       xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
+   xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+   <dep:environment>
+       <dep:moduleId>
+      <dep:groupId>geronimo</dep:groupId>
+      <dep:artifactId>wtf</dep:artifactId>
+      <dep:version>1.1</dep:version>
+      <dep:type>war</dep:type>
+       </dep:moduleId>
+   </dep:environment>
+
+   <nam:message-destination>
+       <nam:message-destination-name>
+           x
+       </nam:message-destination-name>
+       <nam:admin-object-link>
+           y
+       </nam:admin-object-link>
+   </nam:message-destination>
+</web-app>

Propchange: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-post.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml?rev=413779&view=auto
==============================================================================
--- geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml (added)
+++ geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml Mon Jun 12 18:11:57
2006
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+       xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
+   xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+   <dep:environment>
+       <dep:moduleId>
+      <dep:groupId>geronimo</dep:groupId>
+      <dep:artifactId>wtf</dep:artifactId>
+      <dep:version>1.1</dep:version>
+      <dep:type>war</dep:type>
+       </dep:moduleId>
+   </dep:environment>
+
+   <nam:message-destination>
+       <nam:message-destination-name>
+           x
+       </nam:message-destination-name>
+       <nam:admin-object-link>
+           y
+       </nam:admin-object-link>
+   </nam:message-destination>
+</web-app>

Propchange: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/trunk/modules/j2ee-schema/src/test-data/geronimo/web-md-pre.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/trunk/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java?rev=413779&r1=413778&r2=413779&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
(original)
+++ geronimo/trunk/modules/j2ee-schema/src/test/org/apache/geronimo/schema/SchemaConversionUtilsTest.java
Mon Jun 12 18:11:57 2006
@@ -516,6 +516,27 @@
         }
 
     }
+    public void testWebMessageDestination1() throws Exception {
+        URL srcXml = classLoader.getResource("geronimo/web-md-pre.xml");
+        URL expectedOutputXml = classLoader.getResource("geronimo/web-md-post.xml");
+        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);
+        XmlCursor cursor = xmlObject.newCursor();
+        try {
+            SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+                    System.out.println(xmlObject.toString());
+            XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);
+            System.out.println(expected.toString());
+            List problems = new ArrayList();
+            boolean ok = compareXmlObjects(xmlObject, expected, problems);
+            assertTrue("Differences: " + problems, ok);
+            SchemaConversionUtils.convertToGeronimoSubSchemas(cursor);
+            boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+            assertTrue("Differences: " + problems, ok2);
+        } finally {
+            cursor.dispose();
+        }
+
+    }
 
     private boolean compareXmlObjects(XmlObject xmlObject, XmlObject expectedObject, List
problems) {
         XmlCursor test = xmlObject.newCursor();

Added: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml?rev=413779&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml (added)
+++ geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml Mon Jun 12
18:11:57 2006
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xml-fragment xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+  <dep:environment>
+    <dep:moduleId>
+      <dep:groupId>geronimo</dep:groupId>
+      <dep:artifactId>wtf</dep:artifactId>
+      <dep:version>1.1</dep:version>
+      <dep:type>war</dep:type>
+    </dep:moduleId>
+  </dep:environment>
+  <nam:message-destination>
+    <nam:message-destination-name>x</nam:message-destination-name>
+    <nam:admin-object-link>y</nam:admin-object-link>
+  </nam:message-destination>
+</xml-fragment>
\ No newline at end of file

Propchange: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-post.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml?rev=413779&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml (added)
+++ geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml Mon Jun 12
18:11:57 2006
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+       xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
+   xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+   <dep:environment>
+       <dep:moduleId>
+      <dep:groupId>geronimo</dep:groupId>
+      <dep:artifactId>wtf</dep:artifactId>
+      <dep:version>1.1</dep:version>
+      <dep:type>war</dep:type>
+       </dep:moduleId>
+   </dep:environment>
+
+   <nam:message-destination>
+       <nam:message-destination-name>
+           x
+       </nam:message-destination-name>
+       <nam:admin-object-link>
+           y
+       </nam:admin-object-link>
+   </nam:message-destination>
+</web-app>

Propchange: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/trunk/modules/web-builder/src/test-resources/plans/web-md-pre.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java?rev=413779&r1=413778&r2=413779&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
(original)
+++ geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/GenericToSpecificPlanConverterTest.java
Mon Jun 12 18:11:57 2006
@@ -34,18 +34,21 @@
     private ClassLoader classLoader = this.getClass().getClassLoader();
 
     public void testConvertPlan1() throws Exception {
-        testConvertPlan("plans/tomcat-pre.xml");
+        testConvertPlan("plans/tomcat-pre.xml", "plans/tomcat-post.xml");
     }
     public void testConvertPlan2() throws Exception {
-        testConvertPlan("plans/tomcat-pre2.xml");
+        testConvertPlan("plans/tomcat-pre2.xml", "plans/tomcat-post.xml");
     }
     public void testConvertPlan3() throws Exception {
-        testConvertPlan("plans/tomcat-pre3.xml");
+        testConvertPlan("plans/tomcat-pre3.xml", "plans/tomcat-post.xml");
+    }
+    public void testConvertPlanMessageDestination1() throws Exception {
+        testConvertPlan("plans/web-md-pre.xml", "plans/web-md-post.xml");
     }
 
-    public void testConvertPlan(String prePlanName) throws Exception {
+    public void testConvertPlan(String prePlanName, String postPlanName) throws Exception
{
         URL srcXml = classLoader.getResource(prePlanName);
-        URL expectedOutputXml = classLoader.getResource("plans/tomcat-post.xml");
+        URL expectedOutputXml = classLoader.getResource(postPlanName);
         XmlObject rawPlan = XmlBeansUtil.parse(srcXml);
         System.out.println("RAW PLAN " + rawPlan.toString());
         XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);



Mime
View raw message