Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Plugin - An archive file (.car or .war) that can be installed into Geronimo to install a specific new service, such as ActiveMQ. For more about plugins, or to look at available plugins, check out geronimoplugins.com or geronimoplugincentral.org.
.CAR file (Configuration ARchive) - An archive file that stores Geronimo-specific configurations, as well as the classes, libraries, web pages, and other information associated with an application.
.WAR file (Web ARchive)- An archive file that contains a web application, including all of its classes, libraries, HTML and JSP pages, and other information. It can be deployed on any Java Enterprise compatible servlet container.
ACE (Administration Console Extension) - An archive file (either a .car or a .war), that includes Administration Console portlets. These portlets will be added to the Extensible Administration Console when the ACE is activated.
Extensible Administration console - A flexible version of Geronimo's original administration console. Once installed it is available at http://localhost:8080/consoleImage Removed, and includes some portlets that correspond to the currently activated services in Geronimo.
Service - a component or set of functionality for Geronimo - it may be pre-installed, such as the Tomcat or Jetty web container, or it may be installed as a plugin.
Minimal console - The administration console as it is first installed - with only the services necessary for basic functionality.
Portlet - A web user interface component that can be assembled together with other similar components to create a web (portal) page. See the Portlet Specification JSR 286.

...

  1. Installing the extensible administration console into a Geronimo minimal assembly
  2. Installing an ACE in the .war format from disk
  3. Installing an ACE in the .car format from an online repository
    Noteinfo
    titleWhich kind of file format do I want ?
    • Need console extensions for a component you already have? If you are planning to add Administration Console portlets for a component that is already installed on your server, a .war file is simplest. A .war-format ACE has only the needed portlets, and is dependent on the component already being installed.
    • Need the component and its extensions? If you need to install both a new component and its associated Admin Console portlets, a .car file is the right choice. This will look up and download all the necessary components and dependencies, and will also install the new ACE file. A .car file can also be used if the component is already installed.
    • Not sure? If you aren't sure that you have all the pre-requisites installed, a .car is the safest option. This will work regardless of whether the component is pre-installed or not.
    Noteinfo
    titleWhat about installing a .car file from disk?

    Unfortunately, it is not possible to install a .car file from disk with the current Geronimo Administration Console. However you can still use the "You can use the deploy install-plugin" tool from the command line. For more information, read up on the deployer tool at httpsee https://cwiki.apache.org/GMOxDOC11GMOxDOC30/deployer-tooldeploy.html

Installing the Extensible Administration Console

...

  1. Start Geronimo
  2. Use the deploy : list-plugins command to download and install the administration console from the online plugin repository. Depending on the web container support in your minimal server, choose:
    No Format
     deploy: list-plugins -r http://geronimo.apache.org/plugins/geronimo-3.0/ org.apache.geronimo.plugins/console-tomcat/3.0/car
    or
    No Format
    deploy: list-plugins -r http://geronimo.apache.org/plugins/geronimo-3.0/ org.apache.geronimo.plugins/console-jetty/3.0/car

Once updated, we need to verify this (and subsequent) steps.

...

Now you can point your web browser to http://localhost:8080/console and see the newly installed console.

Installing an ACE in .war format from an archive file

An ACE in .war format will install only the console extension. Its pre-requisite must already be installed on your system. For example, if you were installing a console extension to monitor a Derby database, Derby would need to be pre-installed on your server.
Prerequisites

  1. You have a .war-format ACE to be installed.
  2. The Extensible Administration Console is already deployed, as described above.
  3. Any pre-requisites for the ACE are already installed.
    Instructions
  4. Open the administrative console in an internet browser at address http://localhost:8080/console.
  5. Select Deployer on the left navigation bar.
  6. Click Browse and navigate to the ACE file.
  7. Click Install.
  8. Refresh your browser. Your new component will show up on the left side navigation menu.

Installing an Administration Console Extension in .car format from a repository

An ACE in the .car format installs a component and adds its configuration portlets to the Extensible Administration Console.
Prerequisites

  1. Your plugin provider already has specified a repository URL. For a larger selection of available plugins, checking http://geronimo.apache.org/plugins/geronimo-3.0/ is a good place to start.
  2. The Extensible Administration Console already installed, as described in the previous section.

Instructions

  1. Access the Extensible Administration Console by pointing a web browser to the following address http://localhost:8080/console.
  2. Select Plugins on the left navigation bar.
  3. Under Install Geronimo Plugins, click Update Repository List to add the default plugin repositories of Geronimo 3.0 into the repository list.
    • If the correct address does not appear in the Repository list, select Add Repository.
    • Type the repository's address in the New Repository textbox. Make sure to include the forward-slash( / ) at the end of the address. Select Add Repository.
    • Click Update Repository List. The new address will now appear in the Repository list.
  4. With the correct repository displayed in the Repository box, select Show Plugins in selected repository.
  5. Choose the plugin from the Available Plugins list by clicking directly on the plugin name.
    • If the Installable field of the desired plugin is marked as a red-cross, the plugin may already be installed on your server. Check for its name on the System Modules tab to make sure it is running, and to start or uninstall it if necessary.
    • If the list of Available Plugins does not display, or the desired plugin is not listed, you may have entered the wrong repository address. Try entering it again. If problems continue, contact the plugin provider or email the user mailing list at user@geronimo.apache.org.
      6. Select the plugins to be added and then click *Install at the bottom of the page.
      7. When the plugin installation is complete, refresh your browser. A new menu item will appear on the left. You can now configure this plugin's settings from the newly installed portlets.

...

Class/Dependency Structure

note
Panel
title
Dependency relationship of the pieces
PortalContainer
indent
PortalContainerServiceGBean
0
AdminConsoleExtensionGBean
0
Pluto Portal Administration Console New Portlet
PortalContainer 
indent
1
1
\|\_PortalContainerServiceGBean 
indent
2
2
\|\_AdminConsoleExtensionGBean 
indent
1
1
\|\_Pluto Portal 
indent
2
2
\|\_Administration Console 
indent
3
3
\|\_New Portlet 

The PortalContainer is the base requirement for the administration console. The Pluto Portal and the PortalContainerServiceGBean are the base requirements to install anything into the framework of the console. The administration console and the AdminConsoleExtensionGBean depends on the PortalContainerServiceGBean and the Pluto Portal. In order to add new console extensions, all of the described components must be in place.

...

  1. Declare a dependency on the pluto-porta plugin XML
    Code Block
    XML
    borderStylesolid
    <dependencies>
        ...
    <dependency>
        <groupId>org.apache.geronimo.plugins</groupId>
        <artifactId>pluto-support</artifactId>
    </dependency>
    </dependencies>
    
  2. Define an AdminConsoleExtensionGBean
    Code Block
    XML
    borderStyleXMLborderStylesolid
    <gbean name="example" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
        <attribute name="pageTitle">Testing</attribute>
        <attribute name="portletContext">/HelloWorldPortlet</attribute>
        <attribute name="portletList">[HelloWorldPortlet]</attribute>
    </gbean>
    
    where the attributes are defined as follows:
  • pageTitle is the name of the page to add these portlets to (new or existing)
  • portletContext is the context of where the portlets are installed.
  • portletList is a comma-delimited list of the portlets to be added to this page.
Code Block
XMLXML
borderStylesolid
titleSample geronimo-web.xml
borderStylesolid
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
    <environment>
        <moduleId>
            <groupId>org.apache.geronimo.portals</groupId>
            <artifactId>pluto-example</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>war</type>
        </moduleId>
        
        <dependencies>
            <dependency> <!-- Put a dependancy on the hosting portal (pluto) -->
                <groupId>org.apache.geronimo.plugins</groupId>
                <artifactId>pluto-support</artifactId>
            </dependency>
        </dependencies>
    </environment>
    
    <!-- This is where the files are accessed from. (aka - portletContext) -->
    <context-root>/HelloWorldPortlet</context-root>
    
    <!-- Start off a ACEGBean, this is the lifecycle for the portlet -->
    <gbean name="PlutoTest" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
        <attribute name="pageTitle">Hello</attribute>
        <attribute name="portletContext">/HelloWorldPortlet</attribute>
        <attribute name="portletList">[HelloWorldPortlet]</attribute>
        <reference name="PortalContainerServices">
            <name>PlutoPortalServices</name>
        </reference>
    </gbean>
</web-app>

...

HelloWorldPortlet.war

Panel
titlesample structure for a simple war?
Wiki Markup
indent
1
1
 \|\_
{indent:1} |-WEB-INF/{indent}
{indent:2} |-classes/{indent}
{indent:3} |-
indent
2
2
 \|\_classes/
indent
3
3
 \|\_(portlet class files){indent}
{indeng:2} |-
indent
2
2
 \|\_geronimo-web.xml{indent}
{indent:2} |-
indent
2
2
 \|\_portlet.xml
indent
2
2
 \|\_{indent}
{indent:2} |-web.xml{indent}

Deploying the application

...

  1. Command Line:
    Example:
    No Format
     deploy: deploy c:/HelloWorldPortlet.war
  2. Using the Admin Console:
    Center

Verifying installation

Go to http://localhost:8080/console/Image Removed to verify that the portlets were added to the correct page. (You may need to refresh the browser if you deployed the application from the command line.)

...

This is a working simple example of an Administration Console Extension.
Download the example WAR

Code Block
JAVA
JAVAborderStylesolid
titleHelloWorldPortlet.java
borderStylesolid
package org.apache.pluto.examples;

import java.io.IOException; 
import java.io.PrintWriter;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

/**
 * A very simple portlet example.
 * This portlet displays 'Hello World' to the end user
 */
public class HelloWorldPortlet extends GenericPortlet {

    // This function is called when a user requests to view this portlet (by
    // navigating to the webpage in Pluto)
    public void doView(RenderRequest request, RenderResponse response)
            throws PortletException, IOException {

        // Set the response to read HTML
        response.setContentType("text/html;charset=UTF-8");

        // Required call for use of getWriter() and getPortletOutputStream()
        PrintWriter out = response.getWriter();
        // Write content to the portlet
        out.println("<h1>Hello World</h1>");
    }
}