geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r905918 [4/4] - in /geronimo/server/trunk: ./ framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/ framework/configs/geronimo-gbean-deployer/src/main/history/ framework/configs/gshell-geronimo/src/main/history/ framework/co...
Date Wed, 03 Feb 2010 07:26:56 GMT
Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
Wed Feb  3 07:26:50 2010
@@ -42,8 +42,8 @@
 import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbEjbJarDocument;
 import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType;
 import org.apache.geronimo.schema.SchemaConversionUtils;
-import org.apache.geronimo.xbeans.javaee.EjbJarDocument;
-import org.apache.geronimo.xbeans.javaee.EjbJarType;
+import org.apache.geronimo.xbeans.javaee6.EjbJarDocument;
+import org.apache.geronimo.xbeans.javaee6.EjbJarType;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.EnterpriseBean;
 import org.apache.openejb.jee.PersistenceContextRef;
@@ -234,7 +234,7 @@
         return geronimoEjbJarType;
     }
 
-    public static String getJ2eeStringValue(org.apache.geronimo.xbeans.javaee.String string)
{
+    public static String getJ2eeStringValue(org.apache.geronimo.xbeans.javaee6.String string)
{
         if (string == null) {
             return null;
         }

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceContextRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceContextRefBuilder.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceContextRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceContextRefBuilder.java
Wed Feb  3 07:26:50 2010
@@ -49,9 +49,9 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType;
-import org.apache.geronimo.xbeans.javaee.PersistenceContextRefType;
-import org.apache.geronimo.xbeans.javaee.PersistenceContextTypeType;
-import org.apache.geronimo.xbeans.javaee.PropertyType;
+import org.apache.geronimo.xbeans.javaee6.PersistenceContextRefType;
+import org.apache.geronimo.xbeans.javaee6.PersistenceContextTypeType;
+import org.apache.geronimo.xbeans.javaee6.PropertyType;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.XmlObject;
 

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Wed Feb  3 07:26:50 2010
@@ -52,9 +52,11 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.ResourceSource;
 import org.apache.geronimo.persistence.PersistenceUnitGBean;
-import org.apache.geronimo.xbeans.persistence.PersistenceDocument;
+import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.xbeans.persistence20.PersistenceDocument;
 import org.apache.xbean.finder.ResourceFinder;
 import org.apache.xmlbeans.QNameSet;
+import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.osgi.framework.Bundle;
@@ -102,12 +104,15 @@
         XmlObject[] raws = container.selectChildren(PERSISTENCE_QNAME);
 
         Map<String, PersistenceDocument.Persistence.PersistenceUnit> overrides = new
HashMap<String, PersistenceDocument.Persistence.PersistenceUnit>();
-        for (XmlObject raw : raws) {
-            PersistenceDocument.Persistence persistence = (PersistenceDocument.Persistence)
raw.copy().changeType(PersistenceDocument.Persistence.type);
-            for (PersistenceDocument.Persistence.PersistenceUnit unit : persistence.getPersistenceUnitArray())
{
-                overrides.put(unit.getName().trim(), unit);
+        try {
+            for (XmlObject raw : raws) {
+                PersistenceDocument.Persistence persistence = convertToPersistenceUnit(raw.copy());
+                for (PersistenceDocument.Persistence.PersistenceUnit unit : persistence.getPersistenceUnitArray())
{
+                    overrides.put(unit.getName().trim(), unit);
+                }
             }
-//            buildPersistenceUnits(persistence, module, module.getTargetPath());
+        } catch (XmlException e) {
+            throw new DeploymentException("Parse Persistence configuration file failed",
e);
         }
         try {
             File rootBaseFile = module.getRootEarContext().getConfiguration().getConfigurationDir();
@@ -164,7 +169,7 @@
                     PersistenceDocument persistenceDocument;
                     try {
                         XmlObject xmlObject = XmlBeansUtil.parse(persistenceUrl, new BundleClassLoader(moduleContext.getDeploymentBundle()));
-                        persistenceDocument = (PersistenceDocument) xmlObject.changeType(PersistenceDocument.type);
+                        persistenceDocument = convertToPersistenceDocument(xmlObject);
                     } catch (XmlException e) {
                         throw new DeploymentException("Could not parse persistence.xml file:
" + persistenceUrl, e);
                     }
@@ -188,6 +193,46 @@
     public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection
repository) throws DeploymentException {
     }
 
+    protected PersistenceDocument convertToPersistenceDocument(XmlObject xmlObject) throws
XmlException {
+        XmlCursor cursor = null;
+        try {
+            cursor = xmlObject.newCursor();
+            cursor.toStartDoc();
+            cursor.toFirstChild();
+            SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JPA_PERSISTENCE_NAMESPACE,
"http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd", "2.0");
+            XmlObject result = xmlObject.changeType(PersistenceDocument.type);
+            XmlBeansUtil.validateDD(result);
+            return (PersistenceDocument) result;
+        } finally {
+            if (cursor != null) {
+                try {
+                    cursor.dispose();
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
+    protected PersistenceDocument.Persistence convertToPersistenceUnit(XmlObject xmlObject)
throws XmlException {
+        XmlCursor cursor = null;
+        try {
+            cursor = xmlObject.newCursor();
+            cursor.toStartDoc();
+            cursor.toFirstChild();
+            SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JPA_PERSISTENCE_NAMESPACE,
"http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd", "2.0");
+            XmlObject result = xmlObject.changeType(PersistenceDocument.Persistence.type);
+            XmlBeansUtil.validateDD(result);
+            return (PersistenceDocument.Persistence) result;
+        } finally {
+            if (cursor != null) {
+                try {
+                    cursor.dispose();
+                } catch (Exception e) {
+                }
+            }
+        }
+    }
+
     private void buildPersistenceUnits(PersistenceDocument.Persistence persistence, Map<String,
PersistenceDocument.Persistence.PersistenceUnit> overrides, Module module, String persistenceModulePath)
throws DeploymentException {
         PersistenceDocument.Persistence.PersistenceUnit[] persistenceUnits = persistence.getPersistenceUnitArray();
         for (PersistenceDocument.Persistence.PersistenceUnit persistenceUnit : persistenceUnits)
{

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitRefBuilder.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitRefBuilder.java
Wed Feb  3 07:26:50 2010
@@ -46,7 +46,7 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefDocument;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType;
-import org.apache.geronimo.xbeans.javaee.PersistenceUnitRefType;
+import org.apache.geronimo.xbeans.javaee6.PersistenceUnitRefType;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.XmlObject;
 

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
Wed Feb  3 07:26:50 2010
@@ -37,10 +37,10 @@
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.xbeans.javaee.FullyQualifiedClassType;
-import org.apache.geronimo.xbeans.javaee.ListenerType;
-import org.apache.geronimo.xbeans.javaee.ServletType;
-import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.geronimo.xbeans.javaee6.FullyQualifiedClassType;
+import org.apache.geronimo.xbeans.javaee6.ListenerType;
+import org.apache.geronimo.xbeans.javaee6.ServletType;
+import org.apache.geronimo.xbeans.javaee6.WebAppType;
 import org.apache.xbean.finder.ClassFinder;
 import org.apache.xmlbeans.XmlObject;
 import org.slf4j.Logger;

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/JndiRefsConfigData.java
Wed Feb  3 07:26:50 2010
@@ -30,11 +30,11 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
-import org.apache.geronimo.xbeans.javaee.EjbLocalRefType;
-import org.apache.geronimo.xbeans.javaee.EjbRefType;
-import org.apache.geronimo.xbeans.javaee.ResourceEnvRefType;
-import org.apache.geronimo.xbeans.javaee.ResourceRefType;
-import org.apache.geronimo.xbeans.javaee.ServiceRefType;
+import org.apache.geronimo.xbeans.javaee6.EjbLocalRefType;
+import org.apache.geronimo.xbeans.javaee6.EjbRefType;
+import org.apache.geronimo.xbeans.javaee6.ResourceEnvRefType;
+import org.apache.geronimo.xbeans.javaee6.ResourceRefType;
+import org.apache.geronimo.xbeans.javaee6.ServiceRefType;
 
 /**
  * 

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/MessageDestinationConfigData.java
Wed Feb  3 07:26:50 2010
@@ -25,8 +25,8 @@
 import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedWebApp;
 import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
-import org.apache.geronimo.xbeans.javaee.MessageDestinationType;
-import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.geronimo.xbeans.javaee6.MessageDestinationType;
+import org.apache.geronimo.xbeans.javaee6.WebAppType;
 
 /**
  * 

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
(original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/configData/SecurityConfigData.java
Wed Feb  3 07:26:50 2010
@@ -32,8 +32,8 @@
 import org.apache.geronimo.xbeans.geronimo.security.GerRoleType;
 import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
 import org.apache.geronimo.xbeans.geronimo.security.GerSubjectInfoType;
-import org.apache.geronimo.xbeans.javaee.SecurityRoleType;
-import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.geronimo.xbeans.javaee6.SecurityRoleType;
+import org.apache.geronimo.xbeans.javaee6.WebAppType;
 
 /**
  * 

Modified: geronimo/server/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/pom.xml?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/pom.xml (original)
+++ geronimo/server/trunk/plugins/pom.xml Wed Feb  3 07:26:50 2010
@@ -109,7 +109,7 @@
         <module>axis2</module>
         <module>client</module>
         <module>clustering</module>
-        <module>connector-1_6</module>
+        <!--module>connector-1_6</module-->
         <module>console</module>
         <!--<module>corba</module>-->
         <module>cxf</module>

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Wed Feb  3 07:26:50 2010
@@ -85,9 +85,9 @@
 import org.apache.geronimo.xbeans.geronimo.web.tomcat.TomcatWebAppDocument;
 import org.apache.geronimo.xbeans.geronimo.web.tomcat.TomcatWebAppType;
 import org.apache.geronimo.xbeans.geronimo.web.tomcat.config.GerTomcatDocument;
-import org.apache.geronimo.xbeans.javaee.ServletType;
-import org.apache.geronimo.xbeans.javaee.WebAppDocument;
-import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.geronimo.xbeans.javaee6.ServletType;
+import org.apache.geronimo.xbeans.javaee6.WebAppDocument;
+import org.apache.geronimo.xbeans.javaee6.WebAppType;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.osgi.framework.Bundle;

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BundleDirContext.java
Wed Feb  3 07:26:50 2010
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -124,7 +124,7 @@
 
 
     // ------------------------------------------------------------- Properties
-    
+
     /**
      * Add an alias.
      */
@@ -1435,13 +1435,13 @@
         }
         return new URLResource(url);
     }
-    
+
     private String getName(String name) {
         if (name.startsWith("/")) {
             name = name.substring(1);
         }
         if (path != null) {
-            name = path + name;
+            name = path + "/" + name;
         }
         return name;
     }
@@ -1481,7 +1481,7 @@
             return name;
         }
     }
-    
+
     private static String removeSlash(String name) {
         if (name.endsWith("/")) {
             return name.substring(0, name.length() - 1);
@@ -1489,12 +1489,12 @@
             return name;
         }
     }
-    
+
     private static class NameClassPairEnumeration implements NamingEnumeration<NameClassPair>
{
-        
+
         private String basePath;
         private Enumeration entries;
-        
+
         public NameClassPairEnumeration(String basePath, Enumeration entries) {
             this.basePath = getBasePath(basePath);
             this.entries = entries;
@@ -1524,7 +1524,7 @@
                 return new Binding(relativeName, String.class.getName());
             }
         }
-            
+
         private String getRelativeName(String name) {
             if (basePath != null && name.startsWith(basePath)) {
                 return name.substring(basePath.length());
@@ -1533,14 +1533,14 @@
             }
         }
     }
-    
+
     private static class BindingEnumeration implements NamingEnumeration<Binding> {
-        
+
         private Bundle bundle;
         private String basePath;
         private Enumeration entries;
-        
-        public BindingEnumeration(Bundle bundle, String basePath, Enumeration entries) {
          
+
+        public BindingEnumeration(Bundle bundle, String basePath, Enumeration entries) {
             this.bundle = bundle;
             this.basePath = getBasePath(basePath);
             this.entries = entries;
@@ -1570,14 +1570,14 @@
                 return new Binding(relativeName, relativeName);
             }
         }
-        
+
         private String getRelativeName(String name) {
             if (basePath != null && name.startsWith(basePath)) {
                 return name.substring(basePath.length());
             } else {
                 return name;
             }
-        }        
+        }
     }
 
     private static class URLResource extends Resource {

Modified: geronimo/server/trunk/plugins/tomcat/tomcat7-clustering-wadi/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat7-clustering-wadi/src/main/history/dependencies.xml?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat7-clustering-wadi/src/main/history/dependencies.xml
(original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat7-clustering-wadi/src/main/history/dependencies.xml
Wed Feb  3 07:26:50 2010
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
     <module-id>
         <groupId>org.apache.geronimo.configs</groupId>
         <artifactId>tomcat7-clustering-wadi</artifactId>
@@ -28,6 +28,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.schema</groupId>
+        <artifactId>geronimo-schema-javaee_6</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.schema</groupId>
         <artifactId>geronimo-schema-jee_5</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/plugins/wab/web-extender/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/web-extender/src/main/history/dependencies.xml?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/web-extender/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/wab/web-extender/src/main/history/dependencies.xml Wed Feb
 3 07:26:50 2010
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
     <module-id>
         <groupId>org.apache.geronimo.configs</groupId>
         <artifactId>web-extender</artifactId>
@@ -88,6 +88,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.schema</groupId>
+        <artifactId>geronimo-schema-javaee_6</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.schema</groupId>
         <artifactId>geronimo-schema-jee_5</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
(original)
+++ geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
Wed Feb  3 07:26:50 2010
@@ -60,6 +60,7 @@
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.kernel.ClassLoading;
+import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.xbeans.j2ee.ExceptionMappingType;
 import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingDocument;
 import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
@@ -297,14 +298,14 @@
         Map<String,PortInfo> portMap = new HashMap<String, PortInfo>();
         WebserviceDescriptionType[] webserviceDescriptions = webservicesType.getWebserviceDescriptionArray();
         SharedPortInfo sharedPortInfo;
-        for (WebserviceDescriptionType webserviceDescription : webserviceDescriptions) {
           
+        for (WebserviceDescriptionType webserviceDescription : webserviceDescriptions) {
             String wsdlLocation = webserviceDescription.getWsdlFile().getStringValue().trim();
             String jaxrpcMappingFile = webserviceDescription.getJaxrpcMappingFile().getStringValue().trim();
-            
-            sharedPortInfo = new SharedPortInfo(wsdlLocation, 
+
+            sharedPortInfo = new SharedPortInfo(wsdlLocation,
                                                 jaxrpcMappingFile,
                                                 DescriptorVersion.J2EE);
-            
+
             PortComponentType[] portComponents = webserviceDescription.getPortComponentArray();
             for (PortComponentType portComponent : portComponents) {
                 String portComponentName = portComponent.getPortComponentName().getStringValue().trim();
@@ -327,7 +328,7 @@
                     servletLocation = (String) servletLocations.get(linkName);
                 }
                 PortComponentHandlerType[] handlers = portComponent.getHandlerArray();
-                
+
                 PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName,
seiInterfaceName, handlers, servletLocation);
 
                 if (portMap.put(linkName, portInfo) != null) {
@@ -338,11 +339,11 @@
         return portMap;
     }
 
-    public static Map<String,PortInfo> parseWebServiceDescriptor(org.apache.geronimo.xbeans.javaee.WebservicesType
webservicesType, JarFile moduleFile, boolean isEJB, Map servletLocations) throws DeploymentException
{
+    public static Map<String,PortInfo> parseWebServiceDescriptor(org.apache.geronimo.xbeans.javaee6.WebservicesType
webservicesType, JarFile moduleFile, boolean isEJB, Map servletLocations) throws DeploymentException
{
         Map<String,PortInfo> portMap = new HashMap<String, PortInfo>();
-        org.apache.geronimo.xbeans.javaee.WebserviceDescriptionType[] webserviceDescriptions
= webservicesType.getWebserviceDescriptionArray();
+        org.apache.geronimo.xbeans.javaee6.WebserviceDescriptionType[] webserviceDescriptions
= webservicesType.getWebserviceDescriptionArray();
         SharedPortInfo sharedPortInfo;
-        for (org.apache.geronimo.xbeans.javaee.WebserviceDescriptionType webserviceDescription
: webserviceDescriptions) {
+        for (org.apache.geronimo.xbeans.javaee6.WebserviceDescriptionType webserviceDescription
: webserviceDescriptions) {
             String wsdlLocation = null;
             if (webserviceDescription.isSetWsdlFile()) {
                 wsdlLocation = webserviceDescription.getWsdlFile().getStringValue().trim();
@@ -351,13 +352,13 @@
             if (webserviceDescription.isSetJaxrpcMappingFile()) {
                 jaxrpcMappingFile = webserviceDescription.getJaxrpcMappingFile().getStringValue().trim();
             }
-            
-            sharedPortInfo = new SharedPortInfo(wsdlLocation, 
-                                                jaxrpcMappingFile, 
+
+            sharedPortInfo = new SharedPortInfo(wsdlLocation,
+                                                jaxrpcMappingFile,
                                                 DescriptorVersion.JAVAEE);
-            
-            org.apache.geronimo.xbeans.javaee.PortComponentType[] portComponents = webserviceDescription.getPortComponentArray();
-            for (org.apache.geronimo.xbeans.javaee.PortComponentType portComponent : portComponents)
{
+
+            org.apache.geronimo.xbeans.javaee6.PortComponentType[] portComponents = webserviceDescription.getPortComponentArray();
+            for (org.apache.geronimo.xbeans.javaee6.PortComponentType portComponent : portComponents)
{
                 String portComponentName = portComponent.getPortComponentName().getStringValue().trim();
                 QName portQName = null;
                 if (portComponent.isSetWsdlPort()) {
@@ -367,7 +368,7 @@
                 if (portComponent.isSetServiceEndpointInterface()) {
                     seiInterfaceName = portComponent.getServiceEndpointInterface().getStringValue().trim();
                 }
-                org.apache.geronimo.xbeans.javaee.ServiceImplBeanType serviceImplBeanType
= portComponent.getServiceImplBean();
+                org.apache.geronimo.xbeans.javaee6.ServiceImplBeanType serviceImplBeanType
= portComponent.getServiceImplBean();
                 if (isEJB == serviceImplBeanType.isSetServletLink()) {
                     throw new DeploymentException("Wrong kind of web service described in
web service descriptor: expected " + (isEJB ? "EJB" : "POJO(Servlet)"));
                 }
@@ -390,7 +391,7 @@
                         handlers[i] = (PortComponentHandlerType)portComponent.getHandlerArray()[i].changeType(PortComponentHandlerType.type);
                     }
                 }
-                
+
                 PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName,
seiInterfaceName, handlers, servletLocation);
 
                 if (portMap.put(linkName, portInfo) != null) {
@@ -400,20 +401,20 @@
         }
         return portMap;
     }
-    
+
     public static Map<String,PortInfo> parseWebServiceDescriptor(URL wsDDUrl, JarFile
moduleFile, boolean isEJB, Map servletLocations) throws DeploymentException {
         XmlObject webservicesType = getWebservicesType(wsDDUrl);
         if (webservicesType instanceof WebservicesType) {
             WebservicesType webServices = (WebservicesType)webservicesType;
             return parseWebServiceDescriptor(webServices, moduleFile, isEJB, servletLocations);
-        } else if (webservicesType instanceof org.apache.geronimo.xbeans.javaee.WebservicesType)
{
-            org.apache.geronimo.xbeans.javaee.WebservicesType webServices = (org.apache.geronimo.xbeans.javaee.WebservicesType)webservicesType;
+        } else if (webservicesType instanceof org.apache.geronimo.xbeans.javaee6.WebservicesType)
{
+            org.apache.geronimo.xbeans.javaee6.WebservicesType webServices = (org.apache.geronimo.xbeans.javaee6.WebservicesType)webservicesType;
             return parseWebServiceDescriptor(webServices, moduleFile, isEJB, servletLocations);
         } else {
             return null;
         }
     }
-    
+
     static XmlObject getWebservicesType(URL wsDDUrl) throws DeploymentException {
         try {
             XmlObject webservicesDocumentUntyped = XmlObject.Factory.parse(wsDDUrl);
@@ -425,7 +426,7 @@
                 QName qname = cursor.getName();
                 if (WebservicesDocument.type.getDocumentElementName().equals(qname)) {
                     return getJ2EEWebServices(webservicesDocumentUntyped);
-                } else if (org.apache.geronimo.xbeans.javaee.WebservicesDocument.type.getDocumentElementName().equals(qname))
{
+                } else if (org.apache.geronimo.xbeans.javaee6.WebservicesDocument.type.getDocumentElementName().equals(qname))
{
                     return getJavaEEWebServices(webservicesDocumentUntyped);
                 } else {
                     return null;
@@ -450,18 +451,28 @@
         XmlBeansUtil.validateDD(webservicesDocument);
         return webservicesDocument.getWebservices();
     }
-    
+
     private static XmlObject getJavaEEWebServices(XmlObject webservicesDocumentUntyped) throws
XmlException {
-        org.apache.geronimo.xbeans.javaee.WebservicesDocument webservicesDocument;
-        if (webservicesDocumentUntyped instanceof org.apache.geronimo.xbeans.javaee.WebservicesDocument)
{
-            webservicesDocument = (org.apache.geronimo.xbeans.javaee.WebservicesDocument)
webservicesDocumentUntyped;
-        } else {
-            webservicesDocument = (org.apache.geronimo.xbeans.javaee.WebservicesDocument)
webservicesDocumentUntyped.changeType(org.apache.geronimo.xbeans.javaee.WebservicesDocument.type);
+        XmlCursor cursor = null;
+        try {
+            cursor = webservicesDocumentUntyped.newCursor();
+            cursor.toStartDoc();
+            cursor.toFirstChild();
+            SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE,
"http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd", "1.3");
+            XmlObject result = webservicesDocumentUntyped.changeType(org.apache.geronimo.xbeans.javaee6.WebservicesDocument.type);
+            XmlBeansUtil.validateDD(result);
+            org.apache.geronimo.xbeans.javaee6.WebservicesDocument webservicesDocument =
(org.apache.geronimo.xbeans.javaee6.WebservicesDocument) result;
+            return webservicesDocument.getWebservices();
+        } finally {
+            if (cursor != null) {
+                try {
+                    cursor.dispose();
+                } catch (Exception e) {
+                }
+            }
         }
-        XmlBeansUtil.validateDD(webservicesDocument);
-        return webservicesDocument.getWebservices();        
     }
-    
+
     public static List<HandlerInfo> createHandlerInfoList(PortComponentHandlerType[]
handlers, Bundle bundle) throws DeploymentException {
         List<HandlerInfo> list = new ArrayList<HandlerInfo>();
         for (PortComponentHandlerType handler : handlers) {

Modified: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/java/org/apache/geronimo/webservices/builder/ParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/java/org/apache/geronimo/webservices/builder/ParsingTest.java?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/java/org/apache/geronimo/webservices/builder/ParsingTest.java
(original)
+++ geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/java/org/apache/geronimo/webservices/builder/ParsingTest.java
Wed Feb  3 07:26:50 2010
@@ -113,7 +113,7 @@
         log.debug("{}", elements);
         assertEquals(4, elements.size());
     }
-    
+
     public void testWebservicesJ2ee14() throws Exception {
         URL url = getClass().getClassLoader().getResource("webservices-j2ee14.xml");
         assertNotNull(WSDescriptorParser.getWebservicesType(url));
@@ -124,4 +124,8 @@
         assertNotNull(WSDescriptorParser.getWebservicesType(url));
     }
 
+    public void testWebservicesJavaEE6() throws Exception {
+        URL url = getClass().getClassLoader().getResource("webservices-javaee6.xml");
+        assertNotNull(WSDescriptorParser.getWebservicesType(url));
+    }
 }

Added: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml?rev=905918&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml
(added)
+++ geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml
Wed Feb  3 07:26:50 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+		http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd"
+             version="1.3">
+    <webservice-description>
+        <webservice-description-name>cxfPojo</webservice-description-name>
+        <wsdl-file>WEB-INF/wsdl/greeter_control.wsdl</wsdl-file>
+        <port-component>
+            <port-component-name>cxfPojoName</port-component-name>
+            <wsdl-service>webservices</wsdl-service>
+            <enable-mtom>false</enable-mtom>
+            <service-endpoint-interface>org.apache.greeter_control.Greeter</service-endpoint-interface>
+            <service-impl-bean>
+                <servlet-link>cxfPojoServlet</servlet-link>
+            </service-impl-bean>
+        </port-component>
+    </webservice-description>
+
+</webservices>
\ No newline at end of file

Propchange: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/test/resources/webservices-javaee6.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml (original)
+++ geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml Wed Feb  3 07:26:50
2010
@@ -139,6 +139,18 @@
             <version>${version}</version>
             <type>car</type>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>console-tomcat</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+       <dependency>
+            <groupId>org.apache.geronimo.plugins</groupId>
+            <artifactId>plugin-console-tomcat</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
   </dependencies>
   <properties>
     <geronimoVersion>3.0-SNAPSHOT</geronimoVersion>

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=905918&r1=905917&r2=905918&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Wed Feb  3 07:26:50 2010
@@ -300,6 +300,18 @@
                     </exclusion>
                 </exclusions>
             </dependency>
+            
+            <dependency>
+                <groupId>org.apache.geronimo.schema</groupId>
+                <artifactId>geronimo-schema-javaee_6</artifactId>
+                <version>1.0-SNAPSHOT</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.apache.xmlbeans</groupId>
+                        <artifactId>xmlbeans</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
 
             <dependency>
                 <groupId>org.apache.geronimo.components</groupId>



Mime
View raw message