Convert applications into plugins using GEP has been edited by Runhua Chi (Jan 03, 2009).

Change summary:

added the gifs

(View changes)

Content:

This topic will take you through plugin export and import using Apache Geronimo.

We are using Apache Geronimo V2.1.3 for this tutorial.
We have used an existing tutorial from tutorial section. Refer Stateless Session Bean tutorial for application development and deployment. Once done refer the illustration in this tutorial to export and import JEE artifacts using the Geronimo Eclipse Plugin.

Exporting the application as a plugin

  1. Use the running server popup menu to Launch the Plugin Manager.
  2. Browse for a directory and select Create Geronimo Plugin. Go to the next page.


  3. Select the console.dbpool/jdbcuserds/1.0/rar from the drop down list.


  4. On the next two pages keep all the default values.








  5. Do the same for ApplicationClient and StatelessSessionEJB, selecting them from the drop down list.

The above process creates an appropriate directory structure in the directory specified by the Local Plugin Repository field of the first page of the wizard. geronimo-plugin.xml files have been created for each plugin and the top directory includes a geronimo-plugins.xml that keeps track of all the plugins that have been created. The values in these files came from data from the last two pages in the Plugin Manager. If you wish to change values after you have created the plugin, then you can manually update these files with any editor.





geronimo-plugins.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
    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.
-->
<geronimo-plugin-list xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
            <plugin>
        <name>DBPool Database Plugin</name>
        <category>Sample</category>
        <description>This plugin sets up a Derby database pool</description>
        <url>http://www.apache.org</url>
        <author>Ashish Jain</author>
        <license osi-approved="true">The Apache Software License, Version 2.0</license>
        <plugin-artifact>
            <module-id>
                <groupId>console.dbpool</groupId>
                <artifactId>jdbc%2Fuserds</artifactId>
                <version>1.0</version>
                <type>rar</type>
            </module-id>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>system-database</artifactId>
            <version>2.1.1</version>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>transaction</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>j2ee-server</artifactId>
            <type>car</type>
        </dependency>
        <source-repository>http://repo1.maven.org/maven2/</source-repository>
	<source-repository>file:/C:/myplugins</source-repository>
        <obsoletes>
            <groupId>console.dbpool</groupId>
            <artifactId>jdbc%2Fuserds</artifactId>
            <type>rar</type>
        </obsoletes>
        </plugin-artifact>
    </plugin>
<plugin>
        <name>Stateless EJB Sample Plugin</name>
        <category>Sample</category>
        <description>This plugin installs an EJB Sample</description>
        <url>http://www.apache.org</url>
        <author>Ashish Jain</author>
        <license osi-approved="true">The Apache Software License, Version 2.0</license>
    <plugin-artifact>
        <module-id>
            <groupId>default</groupId>
            <artifactId>StatelessSessionEJB</artifactId>
            <version>1.0</version>
            <type>car</type>
        </module-id>
        <dependency>
            <groupId>console.dbpool</groupId>
            <artifactId>jdbc%2Fuserds</artifactId>
	    <type>rar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>openejb</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>system-database</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>tomcat6</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>axis</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>axis2</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>j2ee-corba-yoko</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>openjpa</artifactId>
            <type>car</type>
        </dependency>
	<source-repository>file:/C:/myplugins</source-repository>
	<source-repository>http://repo1.maven.org/maven2/</source-repository>
        <obsoletes>
            <groupId>default</groupId>
            <artifactId>StatelessSessionEJB</artifactId>
            <type>car</type>
        </obsoletes>
    </plugin-artifact>
    </plugin>
<plugin>
        <name>Application Client</name>
        <category>Sample</category>
        <description>This plugin installs an App Client Sample</description>
        <url>http://www.apache.org</url>
        <author>Ashish Jain</author>
        <license osi-approved="true">The Apache Software License, Version 2.0</license>
	<plugin-artifact>
        <module-id>
            <groupId>default</groupId>
            <artifactId>ApplicationClient</artifactId>
            <version>1.0</version>
            <type>car</type>
        </module-id>
        <dependency>
            <groupId>default</groupId>
            <artifactId>StatelessSessionEJB</artifactId>
            <version>1.0</version>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>tomcat6</artifactId>
            <version>2.1.1</version>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>axis</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>axis2</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>openejb</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>j2ee-corba-yoko</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>openjpa</artifactId>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>jasper</artifactId>
            <type>car</type>
        </dependency>
	<source-repository>file:/C:/myplugins</source-repository>
	<source-repository>http://repo1.maven.org/maven2/</source-repository>
        <obsoletes>
            <groupId>default</groupId>
            <artifactId>ApplicationClient</artifactId>
            <type>car</type>
        </obsoletes>
     </plugin-artifact>
</plugin>
    <default-repository>http://geronimo.apache.org/plugins/geronimo-2.1/</default-repository>
</geronimo-plugin-list>

Importing the plugin

  1. Before we start importing our exported plugins we should un-install the EJB jar, Application Client WAR and database pool from server. This can be down by removing the Web and EJB projects from the server and by using the gshell command line to undeploy the database.





  2. Once done, launch the Plugin Manager again and select the "install Geronimo plugins" radio button.
  3. On the next page, select all three items and select next again.





  4. When we click Next, these three plugins will be installed and a confirmation page will be displayed showing what has been installed

Once this is done you can re-test the application functionality as suggested in Deploy and Run section.

Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request

Unsubscribe or edit your notifications preferences