geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r156464 - geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Date Mon, 07 Mar 2005 23:23:39 GMT
Author: djencks
Date: Mon Mar  7 15:23:37 2005
New Revision: 156464

URL: http://svn.apache.org/viewcvs?view=rev&rev=156464
Log:
fix bug in determining type of xml object.

Modified:
    geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?view=diff&r1=156463&r2=156464
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
(original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Mon Mar  7 15:23:37 2005
@@ -64,6 +64,7 @@
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlOptions;
+import org.apache.xmlbeans.XmlObject;
 
 /**
  * @version $Rev$ $Date$
@@ -103,8 +104,9 @@
         }
 
         try {
-            ConfigurationDocument configurationDoc = ConfigurationDocument.Factory.parse(planFile);
-            XmlCursor cursor = configurationDoc.newCursor();
+            XmlObject xmlObject = XmlObject.Factory.parse(planFile);
+//            ConfigurationDocument configurationDoc = ConfigurationDocument.Factory.parse(planFile);
+            XmlCursor cursor = xmlObject.newCursor();
             try {
                 cursor.toFirstChild();
                 if (!SERVICE_QNAME.equals(cursor.getName())) {
@@ -112,6 +114,12 @@
                 }
             } finally {
                 cursor.dispose();
+            }
+            ConfigurationDocument configurationDoc;
+            if (xmlObject instanceof ConfigurationDocument) {
+                configurationDoc = (ConfigurationDocument) xmlObject;
+            } else {
+                configurationDoc = (ConfigurationDocument) xmlObject.changeType(ConfigurationDocument.type);
             }
             XmlOptions xmlOptions = new XmlOptions();
             xmlOptions.setLoadLineNumbers();



Mime
View raw message