From scm-return-34733-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Sun Jan 04 04:19:31 2009 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 37315 invoked from network); 4 Jan 2009 04:19:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2009 04:19:31 -0000 Received: (qmail 53128 invoked by uid 500); 4 Jan 2009 04:19:30 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 53086 invoked by uid 500); 4 Jan 2009 04:19:30 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 53077 invoked by uid 99); 4 Jan 2009 04:19:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jan 2009 20:19:30 -0800 X-ASF-Spam-Status: No, hits=-1994.1 required=10.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY,OBFUSCATING_COMMENT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jan 2009 04:19:24 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 27AB2234C4B2 for ; Sat, 3 Jan 2009 20:19:04 -0800 (PST) Message-ID: <879479981.1231042744161.JavaMail.www-data@brutus> Date: Sat, 3 Jan 2009 20:19:04 -0800 (PST) From: confluence@apache.org To: scm@geronimo.apache.org Subject: [CONF] Apache Geronimo v2.2: Converting applications into plugins using the Administrative Console (page edited) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org

Convert= ing applications into plugins using the Administrative Console has been edited by Runhua Chi (Jan 03, 2009).

=20

(View changes)

Content:

This topic will take you through plugin export and import using Apache G= eronimo.

We are using Apache Geronimo V2.1.1 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 from Apache Geronimo administration console.

3D""Clarification

Application client referred in this tutorial is actually a Web Applicati= on Client.

Exporting the application as a plu= gin

    =09
  1. Launch the Administrative console and Select Plugin portlet u= nder Applications.





  2. =09
  3. Under Create Geronimo Plugin select jdbc/userds databa= se pool from the drop down menu as shown in the figure.
    =




  4. =09
  5. Once done select Export Plugin.





  6. =09
  7. On the next page keep all the values default and Select Saving Pl= ugin Data.





  8. =09
  9. On the next screen select Export Plugin.
    =




    3D""Starting from Geronimo V2.1.3, you can also choose to c= onvert your applications within Geronimo with one-click instead of manual i= mport and export. To do so, just click Done to convert the applicati= on into plugin directly.
  10. =09
  11. A window will pop-up suggesting to save the plugin. Select Ok.





  12. =09
  13. Similarly export ApplicationClient and StatelessSessionEJB= as a plugin.








Create a c= ustom repository from Geronimo Administrative Console

    =09
  1. Create a folder say myplugins in your hard drive.
  2. =09
  3. Copy the exported plugins to this directory.
  4. =09
  5. Next create a geronimo-plugins.xml which will enlist all the plugins= in our repository.
    geronimo-plugins.xml
    =
    <?xml version=3D"1.0=
    " encoding=3D"UTF-8" standalone=3D=
    "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 u=
    nder 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 la=
    nguage governing permissions and
        limitations under the License.
    -->
    <geronimo-plugin-list xmlns:ns2=3D"http://geronimo.apache.org/xml/ns/attributes-1.2"=
     xmlns=3D"http://geronimo.apache.org/xml/ns/plug=
    ins-1.3">
                <plugin>
            <name>DBPool Database Plugin</name>
            <category>Sample</category>
            <description>This plugin sets up a Derby database pool</de=
    scription>
            <url>http://www.apache.org</u=
    rl>
            <author>Ashish Jain</author>
            <license osi-approved=3D"true">The Apache Software License, Versi=
    on 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>
    =09<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</descripti=
    on>
            <url>http://www.apache.org</u=
    rl>
            <author>Ashish Jain</author>
            <license osi-approved=3D"true">The Apache Software License, Versi=
    on 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>
    =09    <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>
    =09<source-repository>file:/C:/myplugins</source-repository>
    =09<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</de=
    scription>
            <url>http://www.apache.org</u=
    rl>
            <author>Ashish Jain</author>
            <license osi-approved=3D"true">The Apache Software License, Versi=
    on 2.0</license>
    =09<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>
    =09<source-repository>file:/C:/myplugins</source-repository>
    =09<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>
  6. =09
  7. Once this is done place the plugins in the myplugins reposito= ry similar to geronimo repository. For example place jdbc%2Fuserds-1.0.r= ar in C:\myplugins\console\dbpool\jdbc%2Fuserds\1.0, ApplicationClie= nt-1.0.car in C:\myplugins\default\ApplicationClient\1.0 and StatelessS= essionEJB-1.0.car in C:\myplugins\default\StatelessSessionEJB\1.0
  8. =09
  9. This completes our initial set up to create a custom repository usin= g Geronimo Administrative console. Next Select the Plugin portlet an= d Select Add Repository as shown in the figure.
    =




  10. =09
  11. Name the repository as myplugins and give the complete name as file:/C:/myplugins/*3D"". Select= *Add Repository.





    This completes the addition of repository in geronimo.

Importing the plugin

    =09
  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 as shown in the subsequent figures.











  2. =09
  3. Once done select myplugins repository from the drop down list= .





  4. =09
  5. Select Show plugins in selected repository.





  6. =09
  7. Now if we have observerd earlier that Application Client has Statele= ssSessionEJB as a dependency which in turn has a dependency on the database= pool. So if we import our Application Client plugin. All the plugin= s should be imported automatically. Check the Application Client plu= gin and Select Install.




  8. =09
  9. Next screen will suggest the various artifacts associated with our A= pplication Client plugin. Select Install.





  10. =09
  11. Once done the acknowledgement suggests that Databasepool as well as = Stateless session EJB has been successfully installed.
    =




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