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

...

Previous versions of Geronimo have included a noncustomizable, static administration console. Often times when a user installs Geronimo, the Administration Console will be the first place the go in order to configure their application server. For this reason, it is important that the administration console be a feature that provides users with the necessary functionality to easily manage plugins and components of the server. This new administration console allows much more dynamic control over administration features. As such, it more closely reflects the highly flexible and pluggable underlying architecture of Geronimo. What we have done here is to provide a framework for plugin developers to include administration console extensions for their plugins. The aim has been to provide an easy and flexible solution with a simple architecture such that users of Geronimo can intuitively configure components, and developers can easily expand upon the foundation laid out here.

...

This document is organized in the following sections:

Table of Contents

Architecture

Below we have a high level view of the interactions between a new plugin and Pluto. This is essentially the 'plumbing' beneath the administration console.

...

...

Image Added
Figure 1 - High level view of Pluto's interaction with a deployable WAR

...

We have a WAR file containing portlet information and the definition of an Administration Console Extension (ACE) GBean on the left. The ACE GBean is the way in which we can invoke operations on Pluto (this will be covered shortly).

...

Image Added
Figure 2 - Use case for adding features to the console

...

Image Added
Figure 3 - Use case for removing features from the console

...

Removing pages (Figure 3) from the console follows a similar process. Because the AdminConsoleExtensionGBean implements the GBeanLifecycle, when the installed component is stopped, its AdminConsoleExtensionGBean will also be stopped. When this happens, we once more ask the kernel for the PortalContainerServiceGBean, which is used to call removePortlet on Pluto through its API. From the view of the administration console, the user will see the page has disappeared from the navigation menu (Figure 4). If the user starts the component again, the GBeanLifecycle's doStart calls addPortlet on Pluto Container, and the administration console extension reappears on the navigation menu (Figure 5).

...

...

Image Added
Figure 4 - We see no administration extensions to the left for the stopped component

Image Added
Figure 5 - We see the administration feature for the HelloWorldPortlet appear in the navigation

...

Class/Dependency Structure

...

Dependency relationship of the pieces

  • PortalContainer
    • PortalContainerServiceGBean
      • AdminConsoleExtensionGBean
    • Pluto Portal
      • Administration Console
        • New Portlet

...

  1. Declare a dependency on the "pluto-portal" Code BlockXMLXMLborderStylesolid <dependencies> ... <dependency> <groupId>org.apache.geronimo.plugins</groupId> <artifactId>pluto-support</artifactId> </dependency> </dependencies>
  2. Define an AdminConsoleExtensionGBean Code BlockXMLXMLborderStylesolid <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: The name of the page to add these portlets to (new or existing)
  • portletContext: The context of where the portlets are installed.
  • portletList: A comma-delimited list of the portlets to be added to this page.

...

Putting it together

Add your modified "geronimo-web.xml" deployment plan to your WAR or CAR in the WEB-INF folder. Also, if you are including portlets, your archive file should contain the appropriate class files as well as the "web.xml" and "portlet.xml" files.

...

  • HelloWorldPortlet.war
    • WEB-INF/
      • classes/
        • (portlet class files)
      • geronimo-web.xml
      • portlet.xml
      • web.xml

...

  1. Command Line: <geronimo bin folder>/deploy.bat deploy <path to war>
    Example:
    cd c:/g/target/geronimo-tomcat6-minimal-2.0-SNAPSHOT/bin/
    deploy.bat deploy c:/HelloWorldPortlet.war
  2. Using the Admin Console:

    center

    Image Added

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 from the command line.)

...

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

...

...