You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by pm...@apache.org on 2007/06/28 16:14:56 UTC

svn commit: r551566 [3/7] - in /geronimo/sandbox/j2g: configurator/ plugins/ plugins/org.apache.geronimo.j2g.common/ plugins/org.apache.geronimo.j2g.descriptors.app/ plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/ plugins/org.apache.geronimo....

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.classpath Thu Jun 28 07:14:50 2007
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="test"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.apache.geronimo.j2g.descriptors.web</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/META-INF/MANIFEST.MF Thu Jun 28 07:14:50 2007
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: J2G Web Migration Plugin
-Bundle-SymbolicName: org.apache.geronimo.j2g.descriptors.web; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Apache.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.apache.geronimo.j2g.common,
- org.apache.geronimo.j2g.descriptors,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.descriptors.web

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/build.properties Thu Jun 28 07:14:50 2007
@@ -1,21 +0,0 @@
-/**
- *  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.
- */
- source.. = src/
-output.. = classes/
-bin.includes = plugin.xml,\
-               META-INF/,\
-               .,\

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/plugin.xml Thu Jun 28 07:14:50 2007
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-  ~ 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.
-  -->
-<plugin>
- 	<extension point="org.apache.geronimo.j2g.descriptors.migrations">
-      	<migration class="org.apache.geronimo.j2g.descriptors.web.WebDescriptorTool"/>
-   	</extension>
-</plugin>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/pom.xml Thu Jun 28 07:14:50 2007
@@ -60,3 +60,65 @@
         </dependency>
     </dependencies>
 </project>
+<?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$ -->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.geronimo.tools</groupId>
+    <artifactId>org.apache.geronimo.j2g.descriptors.web</artifactId>
+    <packaging>jar</packaging>
+    <name>${artifactId}</name>
+    <parent>
+        <groupId>org.apache.geronimo.tools</groupId>
+        <artifactId>j2g-plugins</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.devtools</groupId>
+                <artifactId>maven-eclipsepde-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+       <dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.descriptors</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.util</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.common</artifactId>
+            <version>${version}</version>
+        </dependency>
+    </dependencies>
+</project>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/commons-logging.properties Thu Jun 28 07:14:50 2007
@@ -1,30 +0,0 @@
-/**
- *  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.
- */
- # Set root logger level to DEBUG and its only appender to console.
-log4j.rootLogger=INFO
-
-#define loggers
-#pluging logger
-log4j.logger.com.ibm.j2g= DEBUG,console
-
-# console is set to be a ConsoleAppender.
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-
-# console uses PatternLayout.
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern=[%t] %-5p %l - %m%n
-log4j.appender.console.layout.ConversionPattern=[%t] %-5p - %m%n
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java Thu Jun 28 07:14:50 2007
@@ -1,154 +0,0 @@
-/**
- *  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.
- */
-package org.apache.geronimo.j2g.descriptors.web;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.j2g.common.ConsoleOutput;
-import org.apache.geronimo.j2g.common.IFileMigration;
-import org.apache.geronimo.j2g.common.IOutput;
-import org.apache.geronimo.j2g.common.Tool;
-import org.apache.geronimo.j2g.util.descriptors.Constants;
-import org.apache.geronimo.j2g.util.descriptors.env.EnvirionmentElementProcessor;
-import org.apache.geronimo.j2g.util.descriptors.naming.NamingElementProcessor;
-import org.apache.geronimo.j2g.util.descriptors.security.SecurityElementProcessor;
-import org.apache.geronimo.j2g.util.descriptors.xml.XMLConversionHelper;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.QName;
-
-public class WebDescriptorTool implements IFileMigration {
-
-    private IOutput out;
-
-    private static Log logger = LogFactory.getLog(WebDescriptorTool.class);
-
-    private EnvirionmentElementProcessor envirionmentElementProcessor;
-
-    private SecurityElementProcessor securityElementProcessor;
-
-    private NamingElementProcessor namingElementProcessor;
-
-    public WebDescriptorTool() {
-    	
-    	Tool currentTool = Tool.getCurrent();
-    	if (currentTool != null) {
-    		out = currentTool.getOutput();
-    	} else {
-    		out = new ConsoleOutput();
-    	}
-        envirionmentElementProcessor = new EnvirionmentElementProcessor();
-        securityElementProcessor = new SecurityElementProcessor();
-        namingElementProcessor = new NamingElementProcessor(envirionmentElementProcessor);
-    }
-
-    public boolean migrate(File file) {
-
-        boolean migrated = false;
-            String directoryName = file.getParent();
-            String jbossFileName = file.getName();
-            logger.debug("Directory Name ==> " + directoryName + " jboss file Name ==> "
-                    + jbossFileName);
-            if (jbossFileName.equals(Constants.JBOSS_WEB_XML_FILE)) {
-                out.info("Converting Jboss-web.xml file in " + directoryName);
-                try {
-                    Document jbossDocument = XMLConversionHelper.getDocument(file);
-                    Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
-                            Constants.WEB_NAME_SPACE, Constants.GERONIMO_WEB_XML_ROOT_NODE);
-                    migrate(jbossDocument.getRootElement(), geronimoDocument.getRootElement());
-                    String geronimoWebFileName = directoryName + File.separator
-                            + Constants.GERONIMO_WEB_XML_FILE;
-                    XMLConversionHelper.saveGeronimoDocument(geronimoWebFileName, geronimoDocument);
-                    migrated = true;
-                    out.info("Successfully migrated the jboss-web.xml file in "
-                            + directoryName + ", with the error and warning messages as shown");
-                } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
-    						+ file.getAbsolutePath()
-    						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
-    						+ e.getMessage());
-                } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
-                }
-            } else if (jbossFileName.equals(Constants.WEB_XML_FILE)){
-                out.info("Converting web.xml file in " + directoryName);
-                out.info("Nothing to convert. Keep the file as it is");
-            }
-        return migrated;
-    }
-
-    private void migrate(Element jbossRootElement, Element geronimoRootElement) {
-
-        // migrate the web descriptor componets here
-        Element jbossRootChildElement;
-        for (Iterator iter = jbossRootElement.elements().iterator(); iter.hasNext();) {
-            jbossRootChildElement = (Element) iter.next();
-            if (jbossRootChildElement.getName().equals("context-root")) {
-                QName qname = new QName("context-root", geronimoRootElement.getNamespace());
-                Element contextRootElement = geronimoRootElement.addElement(qname);
-                contextRootElement.setText(jbossRootChildElement.getText());
-            } else if (jbossRootChildElement.getName().equals("security-domain")) {
-                QName qname = new QName("security-realm-name", geronimoRootElement.getNamespace());
-                Element realmNameElement = geronimoRootElement.addElement(qname);
-                realmNameElement.setText(jbossRootChildElement.getText());
-                securityElementProcessor.setSecurityDomain(jbossRootChildElement.getText());
-            } else if (jbossRootChildElement.getName().equals("security-role")) {
-                Element geronimoRoleMapping = securityElementProcessor
-                        .getGeronimoSecurityRoleElement(geronimoRootElement);
-                securityElementProcessor.migrateSecurityRole(jbossRootChildElement,
-                        geronimoRoleMapping);
-            } else if (jbossRootChildElement.getName().equals("resource-ref")) {
-                QName qname = new QName("resource-ref", geronimoRootElement
-                        .getNamespaceForPrefix(Constants.NAMING_NAME_SPACE_PREFIX));
-                Element geronimoResourceRef = geronimoRootElement.addElement(qname);
-                namingElementProcessor.migrateResourceRef(jbossRootChildElement,
-                        geronimoResourceRef);
-            } else if (jbossRootChildElement.getName().equals("ejb-ref")) {
-                out.error(
-                        "The Element 'ejb-ref' is not supported. It is not possible to determine the EJB name "
-                                + "from the jndi name. Please migrate this element manually",
-                        XMLConversionHelper.getLineNumber(jbossRootChildElement),
-                        XMLConversionHelper.getColumnNumber(jbossRootChildElement));
-                logger
-                        .debug("The Element 'ejb-ref' is not supported. It is not possible to determine the EJB name "
-                                + "from the jndi name. Please migrate this element manually");
-            } else if (jbossRootChildElement.getName().equals("ejb-local-ref")) {
-                out.error(
-                        "The Element 'ejb-local-ref' is not supported. It is not possible to determine the EJB name "
-                                + "from the jndi name. Please migrate this element manually",
-                        XMLConversionHelper.getLineNumber(jbossRootChildElement),
-                        XMLConversionHelper.getColumnNumber(jbossRootChildElement));
-                logger
-                        .debug("The Element 'ejb-local-ref' is not supported. It is not possible to determine the EJB name "
-                                + "from the jndi name. Please migrate this element manually");
-            } else {
-                out.warn(
-                        "The Element '" + jbossRootChildElement.getName() + "' is not supported. ",
-                        XMLConversionHelper.getLineNumber(jbossRootChildElement),
-                        XMLConversionHelper.getColumnNumber(jbossRootChildElement));
-                logger.debug("The Element '" + jbossRootChildElement.getName()
-                        + "' is not supported. ");
-            }
-        }
-    }
-
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test-resources/jboss-web.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test-resources/jboss-web.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test-resources/jboss-web.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test-resources/jboss-web.xml Thu Jun 28 07:14:50 2007
@@ -1,48 +0,0 @@
-<?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. -->
-  
-<!--DOCTYPE ejb-jar PUBLIC
-      "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
-      "http://java.sun.com/dtd/ejb-jar_2_0.dtd" -->
-
-<jboss-web>
-    <security-domain>securityDomation</security-domain>
-    <context-root>/myApp</context-root>
-    <resource-env-ref>
-        <resource-env-ref-name>envResource1</resource-env-ref-name>
-        <jndi-name>jdbc/TestDB</jndi-name>
-    </resource-env-ref>
-     <resource-ref>
-        <res-ref-name>resource1</res-ref-name>
-        <jndi-name>jdbc/TestDB</jndi-name>
-    </resource-ref>
-    <security-role>
-        <role-name>amila1</role-name>
-        <principal-name>amila1</principal-name>
-    </security-role>
-     <security-role>
-        <role-name>amila2</role-name>
-        <principal-name>amila2</principal-name>
-    </security-role>
-    <ejb-ref>
-        <ejb-ref-name>ejb/TestEJB</ejb-ref-name>
-        <jndi-name>ejb/TestEJB</jndi-name>
-    </ejb-ref>
-    <ejb-local-ref>
-        <ejb-ref-name>ejb/LocalTestEJB</ejb-ref-name>
-        <local-jndi-name>ejb/LocalEJB</local-jndi-name>
-    </ejb-local-ref>
-</jboss-web>
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test/org/apache/geronimo/j2g/descriptors/web/test/TestWebDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test/org/apache/geronimo/j2g/descriptors/web/test/TestWebDescriptorTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test/org/apache/geronimo/j2g/descriptors/web/test/TestWebDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test/org/apache/geronimo/j2g/descriptors/web/test/TestWebDescriptorTool.java Thu Jun 28 07:14:50 2007
@@ -1,33 +0,0 @@
-/**
- *  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.
- */
- package org.apache.geronimo.j2g.descriptors.web.test;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.geronimo.j2g.descriptors.web.WebDescriptorTool;
-
-public class TestWebDescriptorTool extends TestCase {
-
-    public void testMigration() {
-        File file = new File("test-resources/jboss-web.xml");
-        WebDescriptorTool webMigrationTool = new WebDescriptorTool();
-        webMigrationTool.migrate(file);
-    }
-
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.classpath Thu Jun 28 07:14:50 2007
@@ -1,7 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="test"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="/org.apache.geronimo.j2g.common"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>org.apache.geronimo.j2g.descriptors</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
+  <name>org.apache.geronimo.j2g.descriptors</name>
+  <comment>JBoss to Geronimo Conversion Tool</comment>
+  <projects>
+    <project>org.apache.geronimo.j2g.common</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.ManifestBuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.SchemaBuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.pde.PluginNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/META-INF/MANIFEST.MF Thu Jun 28 07:14:50 2007
@@ -6,6 +6,7 @@
 Bundle-Vendor: Apache.org
 Bundle-Localization: plugin
 Require-Bundle: org.apache.geronimo.j2g.common,
+ org.apache.geronimo.j2g.util,
  org.eclipse.core.runtime,
  org.eclipse.jdt.core
-Export-Package: org.apache.geronimo.j2g.descriptors
+Bundle-ClassPath: .

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/plugin.xml Thu Jun 28 07:14:50 2007
@@ -26,5 +26,29 @@
          <run class="org.apache.geronimo.j2g.descriptors.DescriptorsTool"/>
       </application>
    </extension>
+   <extension
+         point="org.apache.geronimo.j2g.descriptors.migrations">
+      <migration
+            class="org.apache.geronimo.j2g.descriptors.app.ApplicationDescriptorTool">
+      </migration>
+   </extension>
+   <extension
+         point="org.apache.geronimo.j2g.descriptors.migrations">
+      <migration
+            class="org.apache.geronimo.j2g.descriptors.comp.CMPDescriptorTool">
+      </migration>
+   </extension>
+   <extension
+         point="org.apache.geronimo.j2g.descriptors.migrations">
+      <migration
+            class="org.apache.geronimo.j2g.descriptors.ejb.EJBDescriptorTool">
+      </migration>
+   </extension>
+   <extension
+         point="org.apache.geronimo.j2g.descriptors.migrations">
+      <migration
+            class="org.apache.geronimo.j2g.descriptors.web.WebDescriptorTool">
+      </migration>
+   </extension>
 
 </plugin>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/pom.xml Thu Jun 28 07:14:50 2007
@@ -48,5 +48,10 @@
             <artifactId>org.apache.geronimo.j2g.common</artifactId>
             <version>${version}</version>
         </dependency>
+       	<dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.util</artifactId>
+           	<version>${version}</version>
+       	</dependency>
     </dependencies>
 </project>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.classpath Thu Jun 28 07:14:50 2007
@@ -1,14 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry exported="true" kind="lib" path="lib/commons-el-1.0.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-jsp_2.0_spec-1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-servlet_2.4_spec-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/jasper-compiler-5.5.15.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/jasper-compiler-jdt-5.5.15.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/jasper-runtime-5.5.15.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="." including="plugin.xml" excluding="**/*.java"/>
+  <classpathentry kind="src" path="lib" including="*.jar" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jsp_2.0_spec/1.1/geronimo-jsp_2.0_spec-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler/5.5.15/jasper-compiler-5.5.15.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/tomcat/jasper-runtime/5.5.15/jasper-runtime-5.5.15.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler-jdt/5.5.15/jasper-compiler-jdt-5.5.15.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar"/>
+  <classpathentry kind="src" path="/org.apache.geronimo.j2g.common"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-servlet_2.4_spec/1.1.1/geronimo-servlet_2.4_spec-1.1.1.jar"/>
+</classpath>
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>org.apache.geronimo.j2g.jasper</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
+  <name>org.apache.geronimo.j2g.jasper</name>
+  <comment>JBoss to Geronimo Conversion Tool</comment>
+  <projects>
+    <project>org.apache.geronimo.j2g.common</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.ManifestBuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.SchemaBuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+      <arguments>
+        <dictionary>
+          <key>LaunchConfigHandle</key>
+          <value>&lt;project&gt;/.externalToolBuilders/Maven_Ant_Builder.launch</value>
+        </dictionary>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.pde.PluginNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.classpath Thu Jun 28 07:14:50 2007
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="test"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.apache.geronimo.j2g.resources.datasource</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/META-INF/MANIFEST.MF Thu Jun 28 07:14:50 2007
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: J2G Data Source Plug-in
-Bundle-SymbolicName: org.apache.geronimo.j2g.resources.datasource;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Apache.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.apache.geronimo.j2g.resources,
- org.apache.geronimo.j2g.common,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.resources.datasource

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/build.properties Thu Jun 28 07:14:50 2007
@@ -1,21 +0,0 @@
-/**
- *  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.
- */
- source.. = src/
-output.. = classes/
-bin.includes = plugin.xml,\
-               META-INF/,\
-               .,\

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/plugin.xml Thu Jun 28 07:14:50 2007
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-  ~ 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.
-  -->
-<plugin>
-    <extension point="org.apache.geronimo.j2g.resources.migrations">
-      	<migration class="org.apache.geronimo.j2g.resources.ds.DSResourcesTool"/>
-   </extension>
-</plugin>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/pom.xml Thu Jun 28 07:14:50 2007
@@ -60,3 +60,65 @@
        	</dependency>
     </dependencies>
 </project>
+<?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$ -->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.geronimo.tools</groupId>
+    <artifactId>org.apache.geronimo.j2g.resources.datasource</artifactId>
+    <packaging>jar</packaging>
+    <name>${artifactId}</name>
+    <parent>
+        <groupId>org.apache.geronimo.tools</groupId>
+        <artifactId>j2g-plugins</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.devtools</groupId>
+                <artifactId>maven-eclipsepde-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+		<dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.resources</artifactId>
+            <version>${version}</version>
+       	</dependency>
+       	<dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.util</artifactId>
+           	<version>${version}</version>
+       	</dependency>
+       	<dependency>
+            <groupId>org.apache.geronimo.tools</groupId>
+            <artifactId>org.apache.geronimo.j2g.common</artifactId>
+           	<version>${version}</version>
+       	</dependency>
+    </dependencies>
+</project>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/commons-logging.properties Thu Jun 28 07:14:50 2007
@@ -1,30 +0,0 @@
-/**
- *  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.
- */
- # Set root logger level to DEBUG and its only appender to console.
-commons-logging.rootLogger=INFO
-
-#define loggers
-#pluging logger
-lcommons-logging.logger.com.ibm.j2g= DEBUG,console
-
-# console is set to be a ConsoleAppender.
-commons-logging.appender.console=org.apache.log4j.ConsoleAppender
-
-# console uses PatternLayout.
-commons-logging.appender.console.layout=org.apache.log4j.PatternLayout
-#commons-logging.appender.console.layout.ConversionPattern=[%t] %-5p %l - %m%n
-commons-logging.appender.console.layout.ConversionPattern=[%t] %-5p - %m%n
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java Thu Jun 28 07:14:50 2007
@@ -1,355 +0,0 @@
-/**
- *  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.
- */
-package org.apache.geronimo.j2g.resources.datasource;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.j2g.common.IFileMigration;
-import org.apache.geronimo.j2g.common.IOutput;
-import org.apache.geronimo.j2g.common.Tool;
-import org.apache.geronimo.j2g.util.resources.Constants;
-import org.apache.geronimo.j2g.util.resources.xml.XMLConversionHelper;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.dom4j.QName;
-
-/**
- * Class which implement the Data Source File Migration 
- */
-public class DSResourcesTool implements IFileMigration {
-
-    // Initialization of the IOutput for DSResourcesTool class
-    IOutput out = Tool.getCurrent().getOutput();
-    // Initialization of the logger for DSResourcesTool class
-    Log logger = LogFactory.getLog(DSResourcesTool.class);
-
-    /**
-     * mgration method from data source jboss discripters to geronimo
-     * discriptors
-     * 
-     * @param sourceFile :data source jboss discriptor file
-     * @return status of the migration
-     */
-    public boolean migrate(File sourceFile) {
-        boolean migrated = false;
-            String directoryName = sourceFile.getParent();
-            String jbossDSFileName = sourceFile.getName();
-            logger.debug("Directory Name ==> " + directoryName
-                    + " jboss data source file Name ==> " + jbossDSFileName);
-
-            if (jbossDSFileName.endsWith(Constants.JBOSS_VALID_DS_XML_FILE)) {
-                // Checking wether file is a valid *-ds.xml file
-                String driverType = jbossDSFileName.substring(0, jbossDSFileName.lastIndexOf("-"));
-                out.info("Converting Jboss datasource xml file in " + directoryName);
-                try {
-                    Document jbossDocument = XMLConversionHelper.getJbossDocument(sourceFile);
-                    Document geronimoDocument = migrationFromJboss2Geronimo(jbossDocument
-                            .getRootElement());
-                    String geronimoDSFileName = directoryName + File.separator + driverType
-                            + Constants.GERONIMO_PLAN_FILE;
-                    // Check whether the file already exists if so
-                    // back up at and save that or check the req
-                    // This was done in upper level of the tool
-                    XMLConversionHelper.saveGeronimoDocument(geronimoDSFileName, geronimoDocument);
-                    migrated = true;
-                    out.info("The Datasource Resource File Migration Complete !!!\n");
-                } catch (DocumentException e) {
-                    out.error("Errors occurs while reading xml descriptor "
-    								+ sourceFile.getAbsolutePath()
-    								+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
-    								+ e.getMessage());
-                } catch (IOException e) {
-                    out.error("IO exception " + e.getMessage());
-                }
-            }
-        return migrated;
-    }
-
-    /**
-     * Accepts the jboss side Elements that holdes the discripter infomation and
-     * return the geronimo discripter
-     * 
-     * @param jbossRootElement
-     * @return geronimo plan
-     */
-    private Document migrationFromJboss2Geronimo(Element jbossRootElement) {
-        Document geronimo_ds_plan = createNewGeronimoDocument(jbossRootElement);
-        return geronimo_ds_plan;
-    }
-
-    /**
-     * Createt the new geronimo document from the given namesppace and the root
-     * elament with default elements
-     * 
-     * @param namespaceName
-     *            String of the namespace
-     * @param rootName
-     *            String root Element name
-     * @return a new dom4j document for geronimo-ds-plan.xml
-     */
-    public Document createNewGeronimoDocument(Element jbossRootElement) {
-        Namespace connectorNamespace = new Namespace("", Constants.NAMESPACE_CONNECTOR);
-        Namespace environmentNamespace = new Namespace(Constants.ENV_NAMESPACE_PREFIX,
-                Constants.NAMESPACE_ENV);
-
-        Element local_tx_datasurceElement = XMLConversionHelper.obtainSubElement(jbossRootElement,
-                "local-tx-datasource");
-        Element jndi_name = XMLConversionHelper.obtainSubElement(local_tx_datasurceElement,
-                "jndi-name");
-        Element connection_url = XMLConversionHelper.obtainSubElement(local_tx_datasurceElement,
-                "connection-url");
-        Element driver_class = XMLConversionHelper.obtainSubElement(local_tx_datasurceElement,
-                "driver-class");
-        Element user_name = XMLConversionHelper.obtainSubElement(local_tx_datasurceElement,
-                "user-name");
-        Element password = XMLConversionHelper.obtainSubElement(local_tx_datasurceElement,
-                "password");
-        Element dependenciesElement = createDependenciesElement(driver_class.getStringValue(),
-                environmentNamespace);
-        Element connectiondefinition_instanceElement = DocumentHelper.createElement(new QName(
-                "connectiondefinition-instance", connectorNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSibling("name",
-                XMLConversionHelper.obtainNameFromJNDINAME(XMLConversionHelper
-                        .readElementValue(jndi_name)), connectorNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", XMLConversionHelper.readElementValue(user_name), "name",
-                "UserName", connectorNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", XMLConversionHelper.readElementValue(password), "name",
-                "Password", connectorNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", XMLConversionHelper.readElementValue(driver_class),
-                "name", "Driver", connectorNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", XMLConversionHelper.readElementValue(connection_url),
-                "name", "ConnectionURL", connectorNamespace));
-        Element connection_managerElement = null;
-        if (checkForConnectionMangerDetails(local_tx_datasurceElement)) {
-            connection_managerElement = createConnectionManagerElement(local_tx_datasurceElement,
-                    connectorNamespace);
-        } else {
-            connection_managerElement = createDefaultConnectionManagerElement(connectorNamespace);
-        }
-        connectiondefinition_instanceElement.add(connection_managerElement);
-        QName connectorQName = new QName("connector", connectorNamespace);
-        QName environmentQName = new QName("environment", environmentNamespace);
-        Element artifactIdElement = DocumentHelper.createElement((new QName("artifactId",
-                environmentNamespace)));
-        artifactIdElement.addText(XMLConversionHelper.obtainNameFromJNDINAME(XMLConversionHelper
-                .readElementValue(jndi_name)));
-        Element moduleIdElement = DocumentHelper.createElement((new QName("moduleId",
-                environmentNamespace)));
-        moduleIdElement.add(artifactIdElement);
-        Element conenctorElement = DocumentHelper.createElement(connectorQName);
-        dependenciesElement.add(environmentNamespace);
-        Element environmentElement = conenctorElement.addElement(environmentQName);
-        environmentElement.add(moduleIdElement);
-        environmentElement.add(dependenciesElement);
-        QName resourceadapterQName = new QName("resourceadapter", connectorNamespace);
-        Element resourceadapterElement = conenctorElement.addElement(resourceadapterQName);
-        Element outbound_resourceadapterElement = DocumentHelper.createElement(new QName(
-                "outbound-resourceadapter", connectorNamespace));
-        Element connector_definitionElement = DocumentHelper.createElement(new QName(
-                "connection-definition", connectorNamespace));
-        Element connecttionfactory_interfaceElement = DocumentHelper.createElement(new QName(
-                "connectionfactory-interface", connectorNamespace));
-        connecttionfactory_interfaceElement.addText(Constants.CONNECTION_FACTORY_INTERFACE);
-        connector_definitionElement.add(connecttionfactory_interfaceElement);
-        connector_definitionElement.add(connectiondefinition_instanceElement);
-        resourceadapterElement.add(outbound_resourceadapterElement);
-        outbound_resourceadapterElement.add(connector_definitionElement);
-        Document document = DocumentHelper.createDocument();
-        document.add(conenctorElement);
-        out.warn("The JAR holding the " + driver_class.getStringValue()
-                + " JDBC Driver should be installed " + "under <GERONIMO_HOME>/repository/");
-        return document;
-    }
-
-    /**
-     * creates the connection manager element by refereing the jboss side
-     * localtxelement
-     * 
-     * @param local_tx_datasurceElement
-     * @param environmentNamespace
-     * @return the connection manager element for geronimo ds plan
-     */
-    public Element createConnectionManagerElement(Element local_tx_datasurceElement,
-            Namespace environmentNamespace) {
-        Element connectionmanagerElement = DocumentHelper.createElement(new QName(
-                "connectionmanager", environmentNamespace));
-        Element local_transactionElement = DocumentHelper.createElement(new QName(
-                "local-transaction", environmentNamespace));
-        Element single_poolElement = DocumentHelper.createElement(new QName("single-pool",
-                environmentNamespace));
-        Element max_sizeElement = DocumentHelper.createElement(new QName("max-size",
-                environmentNamespace));
-        Element min_sizeElement = DocumentHelper.createElement(new QName("min-size",
-                environmentNamespace));
-        Element blocking_timeout_millisecondsElement = DocumentHelper.createElement(new QName(
-                "blocking-timeout-milliseconds", environmentNamespace));
-        Element idle_timeout_minutesElement = DocumentHelper.createElement(new QName(
-                "idle-timeout-minutes", environmentNamespace));
-        Element match_oneElement = DocumentHelper.createElement(new QName("match-one",
-                environmentNamespace));
-        if (XMLConversionHelper.containSubElement(local_tx_datasurceElement, "max-pool-size")) {
-            Element max_sizeElement_jboss = XMLConversionHelper.obtainSubElement(
-                    local_tx_datasurceElement, "max-pool-size");
-            max_sizeElement.addText(XMLConversionHelper.readElementValue(max_sizeElement_jboss));
-        } else {
-            max_sizeElement.addText("10");
-        }
-        if (XMLConversionHelper.containSubElement(local_tx_datasurceElement, "min-pool-size")) {
-            Element min_sizeElement_jboss = XMLConversionHelper.obtainSubElement(
-                    local_tx_datasurceElement, "min-pool-size");
-            min_sizeElement.addText(XMLConversionHelper.readElementValue(min_sizeElement_jboss));
-        } else {
-            min_sizeElement.addText("0");
-        }
-        if (XMLConversionHelper.containSubElement(local_tx_datasurceElement,
-                "blocking-timeout-milliseconds")) {
-            Element blocking_timeout_millisecondsElement_jboss = XMLConversionHelper
-                    .obtainSubElement(local_tx_datasurceElement, "blocking-timeout-milliseconds");
-            blocking_timeout_millisecondsElement.addText(XMLConversionHelper
-                    .readElementValue(blocking_timeout_millisecondsElement_jboss));
-        } else {
-            blocking_timeout_millisecondsElement.addText("5000");
-        }
-        if (XMLConversionHelper
-                .containSubElement(local_tx_datasurceElement, "idle-timeout-minutes")) {
-            Element idle_timeout_minutesElement_jboss = XMLConversionHelper.obtainSubElement(
-                    local_tx_datasurceElement, "idle-timeout-minutes");
-            idle_timeout_minutesElement.addText(XMLConversionHelper
-                    .readElementValue(idle_timeout_minutesElement_jboss));
-        } else {
-            idle_timeout_minutesElement.addText("30");
-        }
-        single_poolElement.add(max_sizeElement);
-        single_poolElement.add(min_sizeElement);
-        single_poolElement.add(blocking_timeout_millisecondsElement);
-        single_poolElement.add(idle_timeout_minutesElement);
-        single_poolElement.add(match_oneElement);
-        connectionmanagerElement.add(local_transactionElement);
-        connectionmanagerElement.add(single_poolElement);
-        return connectionmanagerElement;
-    }
-
-    /**
-     * create the dependencies element by refering the driver class string
-     * 
-     * @param driver_class
-     * @return dependencies element
-     */
-    private Element createDependenciesElement(String driver_class, Namespace environmentNamespace) {
-        String id_combination = null;
-        String groupId = null;
-        String artifactId = null;
-        logger.debug("The input driver class to the Dependancy element : " + driver_class);
-        HashMap driverMap = XMLConversionHelper.createDriverStoreHashMap();
-        // if the driver is already in the driver map or else
-        if (driverMap.containsKey(driver_class)) {
-            id_combination = (String) driverMap.get(driver_class);
-        } else {
-            id_combination = XMLConversionHelper
-                    .createIdConbinationWhenDriverMapRetrnsEmpty(driver_class);
-        }
-        groupId = id_combination.substring(0, id_combination.indexOf("/"));
-        artifactId = id_combination.substring(id_combination.indexOf("/") + 1, id_combination
-                .length());
-        QName groupIdQName = new QName("groupId", environmentNamespace);
-        Element groupIdElement = DocumentHelper.createElement(groupIdQName);
-        groupIdElement.addText(groupId);
-        QName artifactIdQName = new QName("artifactId", environmentNamespace);
-        Element artifactIdElement = DocumentHelper.createElement(artifactIdQName);
-        artifactIdElement.addText(artifactId);
-        QName typeQName = new QName("type", environmentNamespace);
-        Element typeElement = DocumentHelper.createElement(typeQName);
-        typeElement.addText("jar");
-        QName dependenciesQName = new QName("dependencies", environmentNamespace);
-        Element dependenciesElement = DocumentHelper.createElement(dependenciesQName);
-        QName dependencyQName = new QName("dependency", environmentNamespace);
-        Element dependencyElement = DocumentHelper.createElement(dependencyQName);
-        dependencyElement.add(groupIdElement);
-        dependencyElement.add(artifactIdElement);
-        dependencyElement.add(typeElement);
-        dependenciesElement.add(dependencyElement);
-        return dependenciesElement;
-    }
-
-    /**
-     * creates the default connection manager element
-     * 
-     * @param environmentNamespace
-     * @return the connection manager element
-     */
-    public Element createDefaultConnectionManagerElement(Namespace environmentNamespace) {
-        Element connectionmanagerElement = DocumentHelper.createElement(new QName(
-                "connectionmanager", environmentNamespace));
-        Element local_transactionElement = DocumentHelper.createElement(new QName(
-                "local-transaction", environmentNamespace));
-        Element single_poolElement = DocumentHelper.createElement(new QName("single-pool",
-                environmentNamespace));
-        Element max_sizeElement = DocumentHelper.createElement(new QName("max-size",
-                environmentNamespace));
-        Element min_sizeElement = DocumentHelper.createElement(new QName("min-size",
-                environmentNamespace));
-        Element blocking_timeout_millisecondsElement = DocumentHelper.createElement(new QName(
-                "blocking-timeout-milliseconds", environmentNamespace));
-        Element idle_timeout_minutesElement = DocumentHelper.createElement(new QName(
-                "idle-timeout-minutes", environmentNamespace));
-        Element match_oneElement = DocumentHelper.createElement(new QName("match-one",
-                environmentNamespace));
-        max_sizeElement.addText("10");
-        min_sizeElement.addText("0");
-        blocking_timeout_millisecondsElement.addText("5000");
-        idle_timeout_minutesElement.addText("30");
-        single_poolElement.add(max_sizeElement);
-        single_poolElement.add(min_sizeElement);
-        single_poolElement.add(blocking_timeout_millisecondsElement);
-        single_poolElement.add(idle_timeout_minutesElement);
-        single_poolElement.add(match_oneElement);
-        connectionmanagerElement.add(local_transactionElement);
-        connectionmanagerElement.add(single_poolElement);
-        return connectionmanagerElement;
-    }
-
-    /**
-     * retuns true if any of the elements were found on JBoss side
-     * 
-     * @param local_tx_datasurceElement
-     * @return status
-     */
-    private boolean checkForConnectionMangerDetails(Element local_tx_datasurceElement) {
-        if (XMLConversionHelper.containSubElement(local_tx_datasurceElement, "min-pool-size")
-                || XMLConversionHelper
-                        .containSubElement(local_tx_datasurceElement, "max-pool-size")
-                || XMLConversionHelper.containSubElement(local_tx_datasurceElement,
-                        "idle-timeout-minutes")
-                || XMLConversionHelper.containSubElement(local_tx_datasurceElement,
-                        "blocking-timeout-milliseconds")) {
-            return true;
-        }
-        return false;
-    }
-
-}
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-ds.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-ds.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-ds.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-ds.xml Thu Jun 28 07:14:50 2007
@@ -118,3 +118,123 @@
      <attribute name="InProcessMode">true</attribute>
    </mbean>
 </datasources>
+<?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. -->
+
+<!-- The Hypersonic embedded database JCA connection factory config
+$Id$ -->
+
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>DefaultDS</jndi-name>
+
+      <!-- for tcp connection, allowing other processes to use the hsqldb
+      database. This requires the org.jboss.jdbc.HypersonicDatabase mbean.
+      <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
+-->
+      <!-- for totally in-memory db, not saved when jboss stops. 
+      The org.jboss.jdbc.HypersonicDatabase mbean necessary
+      <connection-url>jdbc:hsqldb:.</connection-url>
+-->
+      <!-- for in-process persistent db, saved when jboss stops. The
+      org.jboss.jdbc.HypersonicDatabase mbean is necessary for properly db shutdown
+-->
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+
+      <!--example of how to specify class that determines if exception means connection should be destroyed-->
+      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- The time before an unused connection is destroyed -->
+      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+
+      <!-- sql to call when connection is created
+        <new-connection-sql>some arbitrary sql</new-connection-sql>
+      -->
+
+      <!-- sql to call on an existing pooled connection when it is obtained from pool 
+         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+      -->
+
+      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+      -->
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- Use the getConnection(user, pw) for logins
+        <application-managed-security/>
+      -->
+
+      <!-- Use the security domain defined in conf/login-config.xml -->
+      <security-domain>HsqlDbRealm</security-domain>
+
+      <!-- Use the security domain defined in conf/login-config.xml or the
+           getConnection(user, pw) for logins. The security domain takes precedence.
+        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+      -->
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Hypersonic SQL</type-mapping>
+      </metadata>
+
+      <!-- This mbean can be used when using in process persistent hypersonic -->
+      <depends>jboss:service=Hypersonic,database=localDB</depends>
+   </local-tx-datasource>
+
+   <!-- This mbean should be used only when using tcp connections. Uncomment
+   when the tcp based connection-url is used. 
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+     name="jboss:service=Hypersonic">
+     <attribute name="Port">1701</attribute>
+     <attribute name="Silent">true</attribute>
+     <attribute name="Database">default</attribute>
+     <attribute name="Trace">false</attribute>
+     <attribute name="No_system_exit">true</attribute>
+   </mbean>
+ -->
+
+   <!-- This mbean can be used when using in process persistent db -->
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+     name="jboss:service=Hypersonic,database=localDB">
+     <attribute name="Database">localDB</attribute>
+     <attribute name="InProcessMode">true</attribute>
+   </mbean>
+</datasources>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-geronimo-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-geronimo-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
-  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
-    <dep:moduleId>
-      <dep:artifactId>DefaultDS</dep:artifactId>
-    </dep:moduleId>
-    <dep:dependencies>
-      <dep:dependency>
-        <dep:groupId>hsqldb</dep:groupId>
-        <dep:artifactId>hsqldb</dep:artifactId>
-        <dep:type>jar</dep:type>
-      </dep:dependency>
-    </dep:dependencies>
-  </dep:environment>
-  <resourceadapter>
-    <outbound-resourceadapter>
-      <connection-definition>
-        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
-        <connectiondefinition-instance>
-          <name>DefaultDS</name>
-          <config-property-setting name="UserName">sa</config-property-setting>
-          <config-property-setting name="Password"></config-property-setting>
-          <config-property-setting name="Driver">org.hsqldb.jdbcDriver</config-property-setting>
-          <config-property-setting name="ConnectionURL">jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</config-property-setting>
-          <connectionmanager>
-            <local-transaction/>
-            <single-pool>
-              <max-size>20</max-size>
-              <min-size>5</min-size>
-              <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
-              <idle-timeout-minutes>0</idle-timeout-minutes>
-              <match-one/>
-            </single-pool>
-          </connectionmanager>
-        </connectiondefinition-instance>
-      </connection-definition>
-    </outbound-resourceadapter>
-  </resourceadapter>
-</connector>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-ds.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-ds.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-ds.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-ds.xml Thu Jun 28 07:14:50 2007
@@ -31,3 +31,36 @@
   </local-tx-datasource>
  </datasources>
 
+<?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. -->
+
+<!-- $Id$ -->
+<!--  Datasource config for MySQL using 3.0.9 available from:
+http://www.mysql.com/downloads/api-jdbc-stable.html
+-->
+
+<datasources>
+
+  <local-tx-datasource>
+        <jndi-name>jdbc/TradeDB</jndi-name>
+        <connection-url>jdbc:mysql://localhost:3306/tradedb</connection-url>
+        <driver-class>com.mysql.jdbc.Driver</driver-class>
+        <user-name>root</user-name>
+        <password>password</password>
+        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>        
+  </local-tx-datasource>
+ </datasources>
+

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-geronimo-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-geronimo-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
-  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
-    <dep:moduleId>
-      <dep:artifactId>TradeDB</dep:artifactId>
-    </dep:moduleId>
-    <dep:dependencies>
-      <dep:dependency>
-        <dep:groupId>mysql</dep:groupId>
-        <dep:artifactId>mysql-connector-java</dep:artifactId>
-        <dep:type>jar</dep:type>
-      </dep:dependency>
-    </dep:dependencies>
-  </dep:environment>
-  <resourceadapter>
-    <outbound-resourceadapter>
-      <connection-definition>
-        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
-        <connectiondefinition-instance>
-          <name>TradeDB</name>
-          <config-property-setting name="UserName">root</config-property-setting>
-          <config-property-setting name="Password">password</config-property-setting>
-          <config-property-setting name="Driver">com.mysql.jdbc.Driver</config-property-setting>
-          <config-property-setting name="ConnectionURL">jdbc:mysql://localhost:3306/tradedb</config-property-setting>
-          <connectionmanager>
-            <local-transaction/>
-            <single-pool>
-              <max-size>10</max-size>
-              <min-size>0</min-size>
-              <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
-              <idle-timeout-minutes>30</idle-timeout-minutes>
-              <match-one/>
-            </single-pool>
-          </connectionmanager>
-        </connectiondefinition-instance>
-      </connection-definition>
-    </outbound-resourceadapter>
-  </resourceadapter>
-</connector>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-ds.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-ds.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-ds.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-ds.xml Thu Jun 28 07:14:50 2007
@@ -31,3 +31,36 @@
   </local-tx-datasource>
  </datasources>
 
+<?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. -->
+
+<!-- $Id$ -->
+<!--  Datasource config for MySQL using 3.0.9 available from:
+http://www.mysql.com/downloads/api-jdbc-stable.html
+-->
+
+<datasources>
+
+  <local-tx-datasource>
+        <jndi-name>jdbc/TradeDB</jndi-name>
+        <connection-url>jdbc:oracle://localhost:3306/tradedb</connection-url>
+        <driver-class>oracle.jdbc.OracleDriver</driver-class>
+        <user-name>root</user-name>
+        <password>password</password>
+        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>        
+  </local-tx-datasource>
+ </datasources>
+

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-geronimo-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-geronimo-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
-  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
-    <dep:moduleId>
-      <dep:artifactId>TradeDB</dep:artifactId>
-    </dep:moduleId>
-    <dep:dependencies>
-      <dep:dependency>
-        <dep:groupId>oracle</dep:groupId>
-        <dep:artifactId>oracle-jdbc</dep:artifactId>
-        <dep:type>jar</dep:type>
-      </dep:dependency>
-    </dep:dependencies>
-  </dep:environment>
-  <resourceadapter>
-    <outbound-resourceadapter>
-      <connection-definition>
-        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
-        <connectiondefinition-instance>
-          <name>TradeDB</name>
-          <config-property-setting name="UserName">root</config-property-setting>
-          <config-property-setting name="Password">password</config-property-setting>
-          <config-property-setting name="Driver">oracle.jdbc.OracleDriver</config-property-setting>
-          <config-property-setting name="ConnectionURL">jdbc:oracle://localhost:3306/tradedb</config-property-setting>
-          <connectionmanager>
-            <local-transaction/>
-            <single-pool>
-              <max-size>10</max-size>
-              <min-size>0</min-size>
-              <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
-              <idle-timeout-minutes>30</idle-timeout-minutes>
-              <match-one/>
-            </single-pool>
-          </connectionmanager>
-        </connectiondefinition-instance>
-      </connection-definition>
-    </outbound-resourceadapter>
-  </resourceadapter>
-</connector>