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
    Info
    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.
    Info
    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.

...

  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.note
  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.

...

Panel
titleDependency relationship of the pieces
indent
0
0
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
    Code Block
    XMLXMLborderStylesolid
    <dependencies>
        ...
    <dependency>
        <groupId>org.apache.geronimo.plugins</groupId>
        <artifactId>pluto-support</artifactId>
    </dependency>
    </dependencies>
    
  2. Define an AdminConsoleExtensionGBean
    Code Block
    XMLXMLborderStylesolid
    <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>

...

Panel
titlesample structure for a simple war

HelloWorldPortlet.war

indent
1
1
 \|\-_WEB-INF/
indent
2
2
 \|\-_classes/
indent
3
3
 \|\-_(portlet class files)
indent
2
2
 \|\-_geronimo-web.xml
indent
2
2
 \|\-_portlet.xml
indent
2
2
 \|\-_web.xml

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
JAVA
borderStylesolid
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>");
    }
}