geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r551566 [4/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....
Date Thu, 28 Jun 2007 14:14:56 GMT
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test/org/apache/geronimo/j2g/resources/datasource/test/DSResouresToolTestCase.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test/org/apache/geronimo/j2g/resources/datasource/test/DSResouresToolTestCase.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test/org/apache/geronimo/j2g/resources/datasource/test/DSResouresToolTestCase.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test/org/apache/geronimo/j2g/resources/datasource/test/DSResouresToolTestCase.java Thu Jun 28 07:14:50 2007
@@ -1,72 +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.test;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.geronimo.j2g.resources.ResourcesTool;
-import org.apache.geronimo.j2g.resources.datasource.DSResourcesTool;
-import org.apache.geronimo.j2g.util.resources.Constants;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-
-/**
- * Test Case for the DSResouresTool
- */
-public class DSResouresToolTestCase extends TestCase {
-    
-    
-    protected void setUp() throws Exception {
-        // To set the IOutput intialize the DescripterTool
-        ResourcesTool desTool = new ResourcesTool();
-        super.setUp();
-    }
-
-    // Test for the mysql
-    public void testDSResourcesFileMigration_mysql() {
-        File file = new File("test-apps/ds/mysql-ds.xml");
-        DSResourcesTool dsResourcesTool = new DSResourcesTool();
-        boolean result = dsResourcesTool.migrate(file);
-        assertTrue(result);
-    }
-
-    // Test for the oracle
-    public void testDSResourcesFileMigration_oracle() {
-        File file = new File("test-apps/ds/oracle-ds.xml");
-        DSResourcesTool dsResourcesTool = new DSResourcesTool();
-        boolean result = dsResourcesTool.migrate(file);
-        assertTrue(result);
-    }
-
-    // Test for the hsqldb
-    public void testDSResourcesFileMigration_hsqldb() {
-        File file = new File("test-apps/ds/hsqldb-ds.xml");
-        DSResourcesTool dsResourcesTool = new DSResourcesTool();
-        boolean result = dsResourcesTool.migrate(file);
-        assertTrue(result);
-    }
-
-    public void testMethod_createDefaultConnectionManagerElement() {
-        Namespace connectorNamespace = new Namespace("", Constants.NAMESPACE_CONNECTOR);
-        DSResourcesTool dsResourcesTool = new DSResourcesTool();
-        Element result = dsResourcesTool.createDefaultConnectionManagerElement(connectorNamespace);
-        assertNotNull(result);
-    }
-
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.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.jms/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.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.jms</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.jms/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/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 JMS Plug-in
-Bundle-SymbolicName: org.apache.geronimo.j2g.resources.jms; 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.resources,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.resources.jms

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/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.jms/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/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.jms.JMSResourcesTool"/>
-   </extension>
-</plugin>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/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.jms</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.jms/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/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.jms/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java Thu Jun 28 07:14:50 2007
@@ -1,496 +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.jms;
-
-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.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.Attribute;
-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 JMS Source File Migration 
- */
-public class JMSResourcesTool implements IFileMigration {
-
-    // Initialization of the IOutput for JMSResourcesTool class
-    IOutput out = Tool.getCurrent().getOutput();
-    // Initialization of the logger for JMSResourcesTool class
-    Log logger = LogFactory.getLog(JMSResourcesTool.class);
-
-    /**
-     * mgration method from jms jboss discripters to geronimo discriptors
-     * 
-     * @param sourceFile :
-     *            jms jboss discriptor file
-     * @return status of the migration
-     */
-    public boolean migrate(File sourceFile) {
-        // read any *-servise files and then migrate that to the geronimo jms
-        // resources
-        boolean migrated = false;
-            String directoryName = sourceFile.getParent();
-            String jbossJMSFileName = sourceFile.getName();
-            logger.debug("JMS resources Directory Name ==> " + directoryName);
-            logger.debug("jboss jms file Name ==> " + jbossJMSFileName);
-            // Checking wether file is a valid jbossmq-destinations-service.xml
-            // file
-            if (jbossJMSFileName.equals(Constants.JBOSS_VALID_JMS_DESTINATIONS_SERVICES_XML_FILE)) {
-                logger.debug("Searching for jboss-ds.xml file inside the current directory");
-                if (XMLConversionHelper.isFileExists(directoryName,
-                        Constants.JBOSS_VALID_JMS_CONNECTION_FACTORY_XML_FILE)) {
-                    logger.debug("jboss jms connection factory xml file Name ==> "
-                            + Constants.JBOSS_VALID_JMS_CONNECTION_FACTORY_XML_FILE);
-                    File jbossJMSDestinationServicesFile = new File(directoryName,
-                            Constants.JBOSS_VALID_JMS_CONNECTION_FACTORY_XML_FILE);
-                    logger.debug("Converting Jboss jms files in " + directoryName);
-                    try {
-                        Document jbossJMSConnectioFactoryDocument = null;
-                        try{
-                        jbossJMSConnectioFactoryDocument = XMLConversionHelper
-                                .getJbossDocument(jbossJMSDestinationServicesFile);
-                        } catch (DocumentException e){
-                        	out.error("Errors occurs while reading xml descriptor "
-            						+ jbossJMSDestinationServicesFile.getAbsolutePath()
-            						+ ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
-            						+ e.getMessage());
-                        	throw e;
-                        }
-                        Document jbossJMSDestinationServicesDocument = null;
-                        try {
-                        	jbossJMSDestinationServicesDocument = XMLConversionHelper
-                                .getJbossDocument(sourceFile);
-                        } 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());
-                        	throw e;
-                        }
-                        Document geronimoDocument = migrationFromJboss2Geronimo(
-                                jbossJMSDestinationServicesDocument.getRootElement(),
-                                jbossJMSConnectioFactoryDocument.getRootElement());
-                        String geronimoJMSFileName = directoryName + File.separator
-                                + Constants.GERONIMO_JMS_PLAN_FILE;
-                        // check whether the file already exists if so
-                        // back up that and save that or check the req
-                        // This was done at the upper level of the tool
-                        XMLConversionHelper.saveGeronimoDocument(geronimoJMSFileName,
-                                geronimoDocument);
-                        migrated = true;
-                        out.info("The JMS Resource File Migration Complete !!!\n");
-                    } catch(DocumentException ignore){
-                    } catch (IOException e) {
-                        out.error("IO exception " + e.getMessage());
-                    }
-                } else {
-                    out.error("Inorder to continue the JMS Resources Tool the "
-                            + Constants.JBOSS_VALID_JMS_CONNECTION_FACTORY_XML_FILE
-                            + " need to present in working directory ");
-                }
-            }
-
-        return migrated;
-    }
-
-    /**
-     * Accepts the jboss side Elements that holdes the discripter infomation and
-     * return the geronimo discripter
-     * 
-     * @param jbossJMSDestinationServicesElement
-     * @param jbossJMSConnectioFactoryElement
-     * @return created geronimo Document
-     */
-    private Document migrationFromJboss2Geronimo(Element jbossJMSDestinationServicesElement,
-            Element jbossJMSConnectioFactoryElement) {
-        Document newGeronimoDocument = null;
-        if (XMLConversionHelper.containSubElement(jbossJMSConnectioFactoryElement,
-                "tx-connection-factory")) {
-            Element tx_connection_factoryElement = XMLConversionHelper.obtainSubElement(
-                    jbossJMSConnectioFactoryElement, "tx-connection-factory");
-            Element jndi_nameElement = XMLConversionHelper.obtainSubElement(
-                    tx_connection_factoryElement, "jndi-name");
-            String jndi_nameString = jndi_nameElement.getText();
-            Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
-                    Constants.NAMESPACE_CONNECTOR, "connector", Constants.JMS_RESOURCE_TOOL,
-                    jndi_nameString, Constants.NAMESPACE_ENV);
-            newGeronimoDocument = addResourceAdapterElement(geronimoDocument,
-                    jbossJMSDestinationServicesElement, jbossJMSConnectioFactoryElement);
-
-        } else {
-            out
-               .error("The supplied jboss-ds.xml file does not contain the nessesary tx-connection-factory details");
-        }
-        return newGeronimoDocument;
-    }
-
-    /**
-     * Add the resource adapter element to the geronimodocument
-     * 
-     * @param geronimoDocument
-     * @param jbossJMSDestinationServicesElement
-     * @param jbossJMSConnectioFactoryElement
-     * @return geronimo document with added resource adapter
-     */
-    private Document addResourceAdapterElement(Document geronimoDocument,
-            Element jbossJMSDestinationServicesElement, Element jbossJMSConnectioFactoryElement) {
-        Namespace rootNamespace = geronimoDocument.getRootElement().getNamespace();
-        Element resourceAdapterElement = DocumentHelper.createElement(new QName("resourceadapter",
-                rootNamespace));
-        Element resourceAdapter_instanceElement = DocumentHelper.createElement(new QName(
-                "resourceadapter-instance", rootNamespace));
-        Element resourceAdapter_nameElement = DocumentHelper.createElement(new QName(
-                "resourceadapter-name", rootNamespace));
-        Element tx_connection_factoryElement = XMLConversionHelper.obtainSubElement(
-                jbossJMSConnectioFactoryElement, "tx-connection-factory");
-        if (XMLConversionHelper.containSubElementWithAttribute(tx_connection_factoryElement,
-                "config-property", "name", "JmsProviderAdapterJNDI")) {
-            Element config_propertyElement = XMLConversionHelper.obtainSubElementWithAttribute(
-                    tx_connection_factoryElement, "config-property", "name",
-                    "JmsProviderAdapterJNDI");
-            String name = XMLConversionHelper.obtainNameFromJNDINAME(config_propertyElement
-                    .getText());
-            resourceAdapter_nameElement.addText(name);
-        } else {
-            resourceAdapter_nameElement.addText("MY JMS Resource");
-        }
-        resourceAdapter_instanceElement.add(resourceAdapter_nameElement);
-        resourceAdapter_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", "tcp://localhost:61616", "name", "ServerURL",
-                rootNamespace));
-        resourceAdapter_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", "geronimo", "name", "UserName", rootNamespace));
-        resourceAdapter_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", "geronimo", "name", "Password", rootNamespace));
-        Namespace namingNamespace = new Namespace("naming", Constants.NAMESPACE_GERONIMO_NAMING);
-        Element workmanagerElement = DocumentHelper.createElement(new QName("workmanager",
-                namingNamespace));
-        workmanagerElement.add(XMLConversionHelper.createSibling("gbean-link",
-                "DefaultWorkManager", namingNamespace));
-        resourceAdapter_instanceElement.add(workmanagerElement);
-        resourceAdapterElement.add(resourceAdapter_instanceElement);
-        //Add outboundresource adapters and adminobjects (check what are
-        // the mapping that exist for those things)
-        Element outboundresourceElement = addOutBoundResourcesAdapterElement(geronimoDocument,
-                jbossJMSDestinationServicesElement, jbossJMSConnectioFactoryElement);
-        resourceAdapterElement.add(outboundresourceElement);
-        geronimoDocument.getRootElement().add(resourceAdapterElement);
-        geronimoDocument = addAdminObjectElement(geronimoDocument,
-                jbossJMSDestinationServicesElement, jbossJMSConnectioFactoryElement);
-        return geronimoDocument;
-    }
-
-    /**
-     * Add the outbound resource adapter to the geronimo document
-     * 
-     * @param geronimoDocument
-     * @param jbossJMSDestinationServicesElement
-     * @param jbossJMSConnectioFactoryElement
-     * @return geronimo document with the added outbound resource adapter
-     */
-    private Element addOutBoundResourcesAdapterElement(Document geronimoDocument,
-            Element jbossJMSDestinationServicesElement, Element jbossJMSConnectioFactoryElement) {
-        Namespace rootNamespace = geronimoDocument.getRootElement().getNamespace();
-        Element outbound_resourceAdapterElement = DocumentHelper.createElement(new QName(
-                "outbound-resourceadapter", rootNamespace));
-        Element connection_definitionElement = DocumentHelper.createElement(new QName(
-                "connection-definition", rootNamespace));
-        Element connectionfactory_interfaceElement = DocumentHelper.createElement(new QName(
-                "connectionfactory-interface", rootNamespace));
-        connectionfactory_interfaceElement.addText("javax.jms.ConnectionFactory");
-        Element connectiondefinition_instanceElement = DocumentHelper.createElement(new QName(
-                "connectiondefinition-instance", rootNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSibling("name",
-                "MyConnectionFactory", rootNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSibling(
-                "implemented-interface", "javax.jms.QueueConnectionFactory", rootNamespace));
-        connectiondefinition_instanceElement.add(XMLConversionHelper.createSibling(
-                "implemented-interface", "javax.jms.TopicConnectionFactory", rootNamespace));
-        Element tx_connection_factoryElement = XMLConversionHelper.obtainSubElement(
-                jbossJMSConnectioFactoryElement, "tx-connection-factory");
-        if (checkConnectionMangerDetailsExistsInJboss(tx_connection_factoryElement)) {
-            connectiondefinition_instanceElement.add(connectionMangerDetailsExistsInJboss(
-                    tx_connection_factoryElement, rootNamespace));
-        } else {
-            connectiondefinition_instanceElement
-                    .add(createDefaultConnectionManagerElement(rootNamespace));
-        }
-        connection_definitionElement.add(connectionfactory_interfaceElement);
-        connection_definitionElement.add(connectiondefinition_instanceElement);
-        outbound_resourceAdapterElement.add(connection_definitionElement);
-        return outbound_resourceAdapterElement;
-    }
-
-    /**
-     * add the admin objects to the currently existing geronimo document
-     * 
-     * @param geronimoDocument
-     * @param jbossJMSDestinationServicesElement
-     * @param jbossJMSConnectioFactoryElement
-     * @return return the geronimo document which contains the admin objects
-     */
-    private Document addAdminObjectElement(Document geronimoDocument,
-            Element jbossJMSDestinationServicesElement, Element jbossJMSConnectioFactoryElement) {
-
-        Iterator elementIterator = jbossJMSDestinationServicesElement.elementIterator();
-        while (elementIterator.hasNext()) {
-            Element itElement = (Element) elementIterator.next();
-            if (itElement.getName().equals("mbean")) {
-                String queueOrTopic = null;
-                String queueOrTopicName = null;
-                String newQueueOrTopicName = null;
-                Iterator attribIterator = itElement.attributeIterator();
-                while (attribIterator.hasNext()) {
-                    Attribute itAttribute = (Attribute) attribIterator.next();
-                    if (itAttribute.getName().equals("code")) {
-                        if (itAttribute.getData().equals(Constants.TOPIC_CLASS_JBOSS)) {
-                            queueOrTopic = "topic";
-                        }
-                        if (itAttribute.getData().equals(Constants.QUEUE_CLASS_JBOSS)) {
-                            queueOrTopic = "queue";
-                        }
-                    } else if (itAttribute.getName().equals("name")) {
-                        queueOrTopicName = (String) itAttribute.getData();
-                        newQueueOrTopicName = queueOrTopicName.substring(queueOrTopicName
-                                .indexOf("name=") + 5, queueOrTopicName.length());
-                    }
-                }
-                if (queueOrTopic.equals("queue")) {
-                    geronimoDocument = addTopicElement(geronimoDocument, newQueueOrTopicName);
-                }
-                if (queueOrTopic.equals("topic")) {
-                    geronimoDocument = addQueueElement(geronimoDocument, newQueueOrTopicName);
-                }
-                boolean securityCheck = checkForSecurityConfIndideMBeanElement(itElement);
-                if (securityCheck) {
-                    logger
-                            .warn("destination JBoss descriptor has the SecurityConf attribute inside the MBean Element "
-                                    + "which are decoded");
-                }
-            }
-        }
-        return geronimoDocument;
-    }
-
-    /**
-     * check wether the passed mbean element have any security configuration
-     * details
-     * 
-     * @param itElement
-     *            passesd mbean element
-     * @return boolean wether contains or not
-     */
-    private boolean checkForSecurityConfIndideMBeanElement(Element itElement) {
-        return XMLConversionHelper.containSubElementWithAttribute(itElement, "attribute", "name",
-                "SecurityConf");
-    }
-
-    /**
-     * add the topic element to the existing geronimo document
-     * 
-     * @param geronimoDocument
-     * @param jbossJMSDestinationServicesElement
-     * @param jbossJMSConnectioFactoryElement
-     * @return geronimo document with the topic element added as a admin object
-     */
-    private Document addTopicElement(Document geronimoDocument, String topicName) {
-        Namespace rootNamespace = geronimoDocument.getRootElement().getNamespace();
-        Element adminobjectElement = DocumentHelper.createElement(new QName("adminobject",
-                rootNamespace));
-        adminobjectElement.add(XMLConversionHelper.createSibling("adminobject-interface",
-                "javax.jms.Topic", rootNamespace));
-        adminobjectElement.add(XMLConversionHelper.createSibling("adminobject-class",
-                "org.activemq.message.ActiveMQTopic", rootNamespace));
-        Element adminobject_instanceElement = DocumentHelper.createElement(new QName(
-                "adminobject-instance", rootNamespace));
-        adminobject_instanceElement.add(XMLConversionHelper.createSibling(
-                "message-destination-name", topicName, rootNamespace));
-        adminobject_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", " Mytopic", "name", "PhysicalName", rootNamespace));
-        adminobjectElement.add(adminobject_instanceElement);
-        geronimoDocument.getRootElement().add(adminobjectElement);
-        return geronimoDocument;
-    }
-
-    /**
-     * add queue elament to the geronimo existing document
-     * 
-     * @param geronimoDocument
-     * @param jbossJMSDestinationServicesElement
-     * @param jbossJMSConnectioFactoryElement
-     * @return the geronimo document by adding the Queue as a admin object
-     */
-    private Document addQueueElement(Document geronimoDocument, String queueName) {
-        Namespace rootNamespace = geronimoDocument.getRootElement().getNamespace();
-        Element adminobjectElement = DocumentHelper.createElement(new QName("adminobject",
-                rootNamespace));
-        adminobjectElement.add(XMLConversionHelper.createSibling("adminobject-interface",
-                "javax.jms.Queue", rootNamespace));
-        adminobjectElement.add(XMLConversionHelper.createSibling("adminobject-class",
-                "org.activemq.message.ActiveMQTopic", rootNamespace));
-        Element adminobject_instanceElement = DocumentHelper.createElement(new QName(
-                "adminobject-instance", rootNamespace));
-        adminobject_instanceElement.add(XMLConversionHelper.createSibling(
-                "message-destination-name", queueName, rootNamespace));
-        adminobject_instanceElement.add(XMLConversionHelper.createSiblingWithAttrib(
-                "config-property-setting", " MyQueue", "name", "PhysicalName", rootNamespace));
-        adminobjectElement.add(adminobject_instanceElement);
-        geronimoDocument.getRootElement().add(adminobjectElement);
-        return geronimoDocument;
-    }
-
-    /**
-     * Creates a default connection manager elements with the defaults values
-     * 
-     * @param environmentNamespace
-     * @return default commection manager elament
-     */
-    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;
-    }
-
-    /**
-     * check wether the connection manager details are there at the jboss side
-     * 
-     * @param jbossJMSConnectioFactoryElement
-     * @return boolean check of the existance
-     */
-    private boolean checkConnectionMangerDetailsExistsInJboss(Element tx_connection_factoryElement) {
-        boolean check = false;
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement, "min-pool-size")) {
-            check = true;
-        }
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement, "max-pool-size")) {
-            check = true;
-        }
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement,
-                "blocking-timeout-millis")) {
-            check = true;
-        }
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement,
-                "idle-timeout-minutes")) {
-            check = true;
-        }
-        return check;
-    }
-
-    /**
-     * this method created the connection manager element refering the existing
-     * elements at the jboss side
-     * 
-     * @param jbossJMSConnectioFactoryElement
-     * @return connectionMangerElement
-     */
-    private Element connectionMangerDetailsExistsInJboss(Element tx_connection_factoryElement,
-            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(tx_connection_factoryElement, "max-pool-size")) {
-            String value = XMLConversionHelper.obtainSubElement(tx_connection_factoryElement,
-                    "max-pool-size").getText();
-            max_sizeElement.addText(value);
-        } else {
-            max_sizeElement.addText("10");
-        }
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement, "min-pool-size")) {
-            String value = XMLConversionHelper.obtainSubElement(tx_connection_factoryElement,
-                    "min-pool-size").getText();
-            min_sizeElement.addText(value);
-        } else {
-            min_sizeElement.addText("0");
-        }
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement,
-                "blocking-timeout-millis")) {
-            String value = XMLConversionHelper.obtainSubElement(tx_connection_factoryElement,
-                    "blocking-timeout-millis").getText();
-            blocking_timeout_millisecondsElement.addText(value);
-        } else {
-            blocking_timeout_millisecondsElement.addText("5000");
-        }
-        if (XMLConversionHelper.containSubElement(tx_connection_factoryElement,
-                "idle-timeout-minutes")) {
-            String value = XMLConversionHelper.obtainSubElement(tx_connection_factoryElement,
-                    "idle-timeout-minutes").getText();
-            idle_timeout_minutesElement.addText(value);
-        } 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;
-    }
-
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/geronimo-jms-resource-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/geronimo-jms-resource-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/geronimo-jms-resource-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/geronimo-jms-resource-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,125 +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. -->
-<connector
-    xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
-    <environment
-        xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-        <moduleId>
-            <groupId>console.jms</groupId>
-            <artifactId>SampleResourceGroup</artifactId>
-            <version>1.0</version>
-            <type>rar</type>
-        </moduleId>
-        <dependencies>
-            <dependency>
-                 <groupId>geronimo</groupId>
-                 <artifactId>activemq-broker</artifactId>
-                 <type>car</type>
-            </dependency>
-        </dependencies>
-    </environment>
-  <resourceadapter>
-    <!-- how to connect to the JMS Server -->
-    <resourceadapter-instance>
-      <resourceadapter-name>
-        My JMS Resources
-      </resourceadapter-name>
-      <config-property-setting name="ServerUrl">
-        tcp://localhost:61616
-      </config-property-setting>
-      <config-property-setting name="UserName">
-        geronimo
-      </config-property-setting>
-      <config-property-setting name="Password">
-        geronimo
-      </config-property-setting>
-      <workmanager>
-                               105
-                  JMS Configuration [DRAFT (1.1)]
-      <gbean-link>DefaultWorkManager</gbean-link>
-    </workmanager>
-  </resourceadapter-instance>
-  <!-- defines a ConnectionFactory -->
-  <outbound-resourceadapter>
-    <connection-definition>
-      <connectionfactory-interface>
-        javax.jms.ConnectionFactory
-      </connectionfactory-interface>
-      <connectiondefinition-instance>
-        <name>MyConnectionFactory</name>
-        <implemented-interface>
-          javax.jms.QueueConnectionFactory
-        </implemented-interface>
-        <implemented-interface>
-          javax.jms.TopicConnectionFactory
-        </implemented-interface>
-        <connectionmanager>
-          <xa-transaction>
-            <transaction-caching />
-          </xa-transaction>
-          <single-pool>
-            <max-size>10</max-size>
-            <min-size>0</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>
-<!-- defines a Topic -->
-<adminobject>
-  <adminobject-interface>
-    javax.jms.Topic
-  </adminobject-interface>
-  <adminobject-class>
-    org.activemq.message.ActiveMQTopic
-  </adminobject-class>
-  <adminobject-instance>
-    <message-destination-name>
-      MyTopic
-    </message-destination-name>
-    <config-property-setting name="PhysicalName">
-      MyTopic
-    </config-property-setting>
-  </adminobject-instance>
-</adminobject>
-<!-- defines a Queue -->
-<adminobject>
-  <adminobject-interface>
-    javax.jms.Queue
-  </adminobject-interface>
-  <adminobject-class>
-    org.activemq.message.ActiveMQQueue
-  </adminobject-class>
-  <adminobject-instance>
-    <message-destination-name>
-                               106
-                   JMS Configuration [DRAFT (1.1)]
-        MyQueue
-      </message-destination-name>
-      <config-property-setting name="PhysicalName">
-        MyQueue
-      </config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-</connector>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jbossmq-destinations-service.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jbossmq-destinations-service.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jbossmq-destinations-service.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jbossmq-destinations-service.xml Thu Jun 28 07:14:50 2007
@@ -107,3 +107,112 @@
   </mbean>
 
 </server>
+<?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 server
+    PUBLIC "-//JBoss//DTD MBean Service 4.0//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd"-->
+
+
+<!-- $Id$ -->
+
+<!-- 
+   | This file defines the default Queues and Topics that JBossMQ
+   | ships with.  The default Queues and Topics are used by the 
+   | JBoss test suite and by the sample jms programs.
+   |
+   | You can add other destinations to this file, or you can create other
+   | *-service.xml files to contain your application's destinations.
+ -->
+
+<server>
+  <!-- Destination without a configured SecurityManager or without a 
+       a SecurityConf will default to role guest with read=true, write=true,
+       create=false.
+  -->
+  <mbean code="org.jboss.mq.server.jmx.Topic"
+	 name="jboss.mq.destination:service=Topic,name=testTopic">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true"/>
+        <role name="publisher" read="true" write="true" create="false"/>
+        <role name="durpublisher" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Topic"
+	 name="jboss.mq.destination:service=Topic,name=securedTopic">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="publisher" read="true" write="true" create="false"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Topic"
+	 name="jboss.mq.destination:service=Topic,name=testDurableTopic">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+    <attribute name="SecurityConf">
+       <security>
+         <role name="guest" read="true" write="true"/>
+         <role name="publisher" read="true" write="true" create="false"/>
+         <role name="durpublisher" read="true" write="true" create="true"/>
+      </security>
+    </attribute>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=testQueue">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+    <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+    <attribute name="MessageCounterHistoryDayLimit">-1</attribute>
+    <attribute name="SecurityConf">
+      <security>
+        <role name="guest" read="true" write="true"/>
+        <role name="publisher" read="true" write="true" create="false"/>
+        <role name="noacc" read="false" write="false" create="false"/>
+      </security>
+    </attribute>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=A">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=B">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=C">
+	 <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=D">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=ex">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+  </mbean>
+
+</server>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-ds.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-ds.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-ds.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-ds.xml Thu Jun 28 07:14:50 2007
@@ -1,77 +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 connection-factories
-    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
-    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"-->
-
-
-<connection-factories>
- 
-  <!-- ==================================================================== -->
-  <!-- JMS Stuff                                                            -->
-  <!-- ==================================================================== -->
-
-  <!-- The JMS provider loader -->
-  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
-	 name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
-    <attribute name="ProviderName">DefaultJMSProvider</attribute>
-    <attribute name="ProviderAdapterClass">
-      org.jboss.jms.jndi.JNDIProviderAdapter
-    </attribute>
-    <!-- The combined connection factory -->
-    <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
-    <!-- The queue connection factory -->
-    <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
-    <!-- The topic factory -->
-    <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
-    <!-- Uncomment to use HAJNDI to access JMS
-    <attribute name="Properties">
-       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-       java.naming.provider.url=localhost:1100
-    </attribute>
-    -->
-  </mbean>
-
-  <!-- The server session pool for Message Driven Beans -->
-  <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
-	 name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
-    <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
-    <attribute name="PoolName">StdJMSPool</attribute>
-    <attribute name="PoolFactoryClass">
-      org.jboss.jms.asf.StdServerSessionPoolFactory
-    </attribute>
-  </mbean>
-
-  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
-  <tx-connection-factory>
-    <jndi-name>JmsXA</jndi-name>
-    <xa-transaction/>
-    <rar-name>jms-ra.rar</rar-name>
-    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
-    <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
-    <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
-	<max-pool-size>11</max-pool-size>
-<!--
-	<min-pool-size>1</min-pool-size>
-	<blocking-timeout-millis>5001</blocking-timeout-millis> 
-	<idle-timeout-minutes>31</idle-timeout-minutes>
--->	
-    <security-domain-and-application>JmsXARealm</security-domain-and-application>
-  </tx-connection-factory>
-
-</connection-factories>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-geronimo-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-geronimo-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
-  <sys:environment xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
-    <sys:moduleId>
-      <sys:groupId>j2g</sys:groupId>
-      <sys:artifactId>jms</sys:artifactId>
-      <sys:version>1.0</sys:version>
-      <sys:type>jar</sys:type>
-    </sys:moduleId>
-    <sys:dependencies>
-      <sys:dependency>
-        <sys:groupId>j2g</sys:groupId>
-        <sys:artifactId>jms</sys:artifactId>
-        <sys:version>1.0</sys:version>
-        <sys:type>jar</sys:type>
-      </sys:dependency>
-    </sys:dependencies>
-  </sys:environment>
-  <resourceadapter>
-    <resourceadapter-instance>
-      <resourceadapter-name>DefaultJMSProvider</resourceadapter-name>
-      <config-property-setting name="ServerURL">tcp://localhost:61616</config-property-setting>
-      <config-property-setting name="UserName">geronimo</config-property-setting>
-      <config-property-setting name="Password">geronimo</config-property-setting>
-      <naming:workmanager xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
-        <naming:gbean-link>DefaultWorkManager</naming:gbean-link>
-      </naming:workmanager>
-    </resourceadapter-instance>
-    <outbound-resourceadapter>
-      <connection-definition>
-        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
-        <connectiondefinition-instance>
-          <name>MyConnectionFactory</name>
-          <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
-          <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
-          <connectionmanager>
-            <local-transaction/>
-            <single-pool>
-              <max-size>11</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>
-  <adminobject>
-    <adminobject-interface>javax.jms.Queue</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>testTopic</message-destination-name>
-      <config-property-setting name="PhysicalName">MyQueue</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Queue</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>securedTopic</message-destination-name>
-      <config-property-setting name="PhysicalName">MyQueue</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Queue</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>testDurableTopic</message-destination-name>
-      <config-property-setting name="PhysicalName">MyQueue</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Topic</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>testQueue</message-destination-name>
-      <config-property-setting name="PhysicalName">Mytopic</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Topic</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>A</message-destination-name>
-      <config-property-setting name="PhysicalName">Mytopic</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Topic</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>B</message-destination-name>
-      <config-property-setting name="PhysicalName">Mytopic</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Topic</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>C</message-destination-name>
-      <config-property-setting name="PhysicalName">Mytopic</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Topic</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>D</message-destination-name>
-      <config-property-setting name="PhysicalName">Mytopic</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-  <adminobject>
-    <adminobject-interface>javax.jms.Topic</adminobject-interface>
-    <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-    <adminobject-instance>
-      <message-destination-name>ex</message-destination-name>
-      <config-property-setting name="PhysicalName">Mytopic</config-property-setting>
-    </adminobject-instance>
-  </adminobject>
-</connector>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test/org/apache/geronimo/j2g/resources/jms/test/JMSResouresToolTestCase.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test/org/apache/geronimo/j2g/resources/jms/test/JMSResouresToolTestCase.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test/org/apache/geronimo/j2g/resources/jms/test/JMSResouresToolTestCase.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test/org/apache/geronimo/j2g/resources/jms/test/JMSResouresToolTestCase.java Thu Jun 28 07:14:50 2007
@@ -1,48 +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.jms.test;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.geronimo.j2g.resources.ResourcesTool;
-import org.apache.geronimo.j2g.resources.jms.JMSResourcesTool;
-import org.apache.geronimo.j2g.util.resources.Constants;
-
-/**
- * Test Case for the JMSResouresTool
- */
-public class JMSResouresToolTestCase extends TestCase {
-    
-    @Override //the setup method 
-    protected void setUp() throws Exception {
-        // To set the IOutput intialize the DescripterTool
-        ResourcesTool desTool = new ResourcesTool();
-        super.setUp();
-    }
-    
-    // Test for JMS Resources Migration
-    public void testJMSResourcesFileMigration() {
-        String fileLocation = Constants.TEST_RESOURCES_DIRECTORY + "jms/"
-                + Constants.JBOSS_VALID_JMS_DESTINATIONS_SERVICES_XML_FILE;
-        File file = new File(fileLocation);
-        JMSResourcesTool jmsResourcesTool = new JMSResourcesTool();
-        boolean result = jmsResourcesTool.migrate(file);
-        assertTrue(result);
-    }
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.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.mail/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.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.mail</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.mail/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/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 Mail Plug-in
-Bundle-SymbolicName: org.apache.geronimo.j2g.resources.mail; 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.resources,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.resources.mail

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/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.mail/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/plugin.xml Thu Jun 28 07:14:50 2007
@@ -1,24 +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.mail.MailResourcesTool"/>
-   </extension>
-</plugin>
-

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/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.mail</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.mail/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/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.mail/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java Thu Jun 28 07:14:50 2007
@@ -1,174 +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.mail;
-
-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.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.Attribute;
-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 Mail Source File Migration 
- */
-public class MailResourcesTool implements IFileMigration {
-
-    // Initialization of the IOutput for MailResourcesTool class
-    IOutput out = Tool.getCurrent().getOutput();
-    // Initialization of the logger for MailResourcesTool class
-    Log logger = LogFactory.getLog(MailResourcesTool.class);
-    
-    /**
-     * mgration method from jms jboss discripters to geronimo discriptors
-     * 
-     * @param sourceFile :jms jboss discriptor file
-     * @return status of the migration
-     */
-    public boolean migrate(File sourceFile) {
-        boolean migrated = false;
-            String directoryName = sourceFile.getParent();
-            String mailFilename = sourceFile.getName();
-            logger.debug("Directory Name ==> " + directoryName
-                    + " jboss mail source file Name ==> " + mailFilename);
-            if (mailFilename.equals(Constants.JBOSS_VALID_MAIL_XML_FILE)) {
-                out.info("Converting Jboss mail xml file in " + directoryName);
-                try {
-                    Document jbossDocument = XMLConversionHelper.getJbossDocument(sourceFile);
-                    // check the existance of the plain password
-                    // authentication in the jboss RootElement
-                    if (XMLConversionHelper.containSubElementWithAttribute(XMLConversionHelper
-                            .obtainSubElement(jbossDocument.getRootElement(), "mbean"),
-                            "attribute", "name", "Password")) {
-                        out
-                           .error("The mail discripter file "
-                                   + mailFilename
-                                   + " contains the plain text password authentocation, Aborting the Process !!!");
-                    } else {
-                        Document geronimoDocument = migrationFromJboss2Geronimo(jbossDocument
-                                .getRootElement());
-                        String geronimoMailFileName = directoryName + File.separator
-                                + Constants.GERONIMO_MAIL_PLAN_FILE;
-                        // check whether the file already exists if so
-                        // back up that and save that or check the req
-                        // This being done at upper level
-                        XMLConversionHelper.saveGeronimoDocument(geronimoMailFileName,
-                                geronimoDocument);
-                        migrated = true;
-                        out.info("The Mail 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) {
-        Element gbeanElament = XMLConversionHelper.obtainSubElement(jbossRootElement, "mbean");
-        Element jbossAttributeElement = XMLConversionHelper.obtainSubElementWithAttribute(
-                gbeanElament, "attribute", "name", "JNDIName");
-        Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
-                Constants.NAMESPACE_ENV, "module", Constants.MAIL_RESOURCE_TOOL,
-                jbossAttributeElement.getStringValue(), "");
-        Document newGeronimoDocument = createMailGBean(geronimoDocument, jbossRootElement);
-        return newGeronimoDocument;
-    }
-
-    /**
-     * create the MailGBean element by refering the jboss side mbean elaments
-     * 
-     * @param geronimoDocument
-     * @param jbossRootElement
-     * @return the MailGbean element
-     */
-    private Document createMailGBean(Document geronimoDocument, Element jbossRootElement) {
-        Namespace rootNamespace = geronimoDocument.getRootElement().getNamespace();
-        Element gbeanElement = DocumentHelper.createElement(new QName("gbean", rootNamespace));
-        gbeanElement.add(DocumentHelper.createAttribute(gbeanElement, "name", "mailSession"));
-        gbeanElement.add(DocumentHelper.createAttribute(gbeanElement, "class",
-                "org.apache.geronimo.mail.MailGBean"));
-        Element attributeElement = DocumentHelper.createElement(new QName("attribute",
-                rootNamespace));
-        attributeElement.add(DocumentHelper.createAttribute(gbeanElement, "name", "properties"));
-        Element gbeanElament = XMLConversionHelper.obtainSubElement(jbossRootElement, "mbean");
-        Element jbossAttributeElement = XMLConversionHelper.obtainSubElementWithAttribute(
-                gbeanElament, "attribute", "name", "Configuration");
-        Element configurationelement = XMLConversionHelper.obtainSubElement(jbossAttributeElement,
-                "configuration");
-        attributeElement.add(DocumentHelper
-                .createCDATA(obtainMailConfigurationString(configurationelement)));
-//                .createText(obtainMailConfigurationString(configurationelement)));
-        gbeanElement.add(attributeElement);
-        geronimoDocument.getRootElement().add(gbeanElement);
-        return geronimoDocument;
-    }
-
-    /**
-     * obtain the mail configuration elemant from the configuration element
-     * 
-     * @param configurationElement
-     * @return sring of mail configuration
-     */
-    private String obtainMailConfigurationString(Element configurationElement) {
-        Iterator elementIterator = configurationElement.elementIterator();
-        String configurationString = "";
-        String name = null;
-        String value = null;
-        while (elementIterator.hasNext()) {
-            Element itElement = (Element) elementIterator.next();
-            if (itElement.getName().equals("property")) {
-                Iterator attribIterator = itElement.attributeIterator();
-                while (attribIterator.hasNext()) {
-                    Attribute itAttribute = (Attribute) attribIterator.next();
-                    if (itAttribute.getName().equals("name")) {
-                        name = itAttribute.getText();
-                    } else if (itAttribute.getName().equals("value")) {
-                        value = itAttribute.getText();
-                    }
-                }
-                configurationString += ("\r\n" + name + "=" + value );
-            }
-        }
-        return configurationString;
-    }
-
-}



Mime
View raw message