JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Add-On Component Development Guide
search filter icon
search icon

Document Information

Preface

1.   Introduction to the Development Environment for GlassFish Server Add-On Components

GlassFish Server Modular Architecture and Add-On Components

OSGi Alliance Module Management Subsystem

Hundred-Kilobyte Kernel

Overview of the Development Process for an Add-On Component

Writing HK2 Components

Extending the Administration Console

Extending the asadmin Utility

Adding Monitoring Capabilities

Adding Configuration Data for a Component

Adding Container Capabilities

Creating a Session Persistence Module

Packaging and Delivering an Add-On Component

2.  Writing HK2 Components

3.  Extending the Administration Console

4.  Extending the asadmin Utility

5.  Adding Monitoring Capabilities

6.  Adding Configuration Data for a Component

7.  Adding Container Capabilities

8.  Creating a Session Persistence Module

9.  Packaging, Integrating, and Delivering an Add-On Component

A.  Integration Point Reference

Index

Overview of the Development Process for an Add-On Component

To ensure that an add-on component behaves identically to components that are supplied in GlassFish Server distributions, the component must meet the following requirements:

To develop add-on components that meet these requirements, follow the development process that is described in the following sections:

Writing HK2 Components

The Hundred-Kilobyte Kernel (HK2) is the lightweight and extensible kernel of GlassFish Server. To interact with GlassFish Server, add-on components plug in to this kernel. In the HK2 component model, the functions of an add-on component are declared through a contract-service implementation paradigm. An HK2 contract identifies and describes the building blocks or the extension points of an application. An HK2 service implements an HK2 contract.

For more information, see Chapter 2, Writing HK2 Components.

Extending the Administration Console

The Administration Console is a browser-based tool for administering GlassFish Server. It features an easy-to-navigate interface and online help. Extending the Administration Console enables you to provide a graphical user interface for administering your add-on component. You can use any of the user interface features of the Administration Console, such as tree nodes, links on the Common Tasks page, tabs and sub-tabs, property sheets, and JavaServer Faces pages. Your add-on component implements a marker interface and provides a configuration file that describes how your customizations integrate with the Administration Console.

For more information, see Chapter 3, Extending the Administration Console.

Extending the asadmin Utility

The asadmin utility is a command-line tool for configuring and administering GlassFish Server. Extending the asadmin utility enables you to provide administrative interfaces for an add-on component that are consistent with the interfaces of other GlassFish Server components. A user can run asadmin subcommands either from a command prompt or from a script. For more information about the asadmin utility, see the asadmin(1M) man page.

For more information, see Chapter 4, Extending the asadmin Utility.

Adding Monitoring Capabilities

Monitoring is the process of reviewing the statistics of a system to improve performance or solve problems. By monitoring the state of components and services that are deployed in the GlassFish Server, system administrators can identify performance bottlenecks, predict failures, perform root cause analysis, and ensure that everything is functioning as expected. Monitoring data can also be useful in performance tuning and capacity planning.

An add-on component typically generates statistics that the GlassFish Server can gather at run time. Adding monitoring capabilities enables an add-on component to provide statistics to GlassFish Server in the same way as components that are supplied in GlassFish Server distributions. As a result, system administrators can use the same administrative interfaces to monitor statistics from any installed GlassFish Server component, regardless of the origin of the component.

For more information, see Chapter 5, Adding Monitoring Capabilities.

Adding Configuration Data for a Component

The configuration data of a component determines the characteristics and runtime behavior of a component. GlassFish Server provides interfaces to enable an add-on component to store its configuration data in the same way as other GlassFish Server components. These interfaces are similar to interfaces that are defined in Java Specification Request (JSR) 222: Java Architecture for XML Binding (JAXB) 2.0. By using these interfaces to store configuration data, you ensure that the add-on component is fully integrated with GlassFish Server. As a result, administrators can configure an add-on component in the same way as they can configure other GlassFish Server components.

For more information, see Chapter 6, Adding Configuration Data for a Component.

Adding Container Capabilities

Applications run on GlassFish Server in containers. GlassFish Server enables you to create containers that extend or replace the existing containers of GlassFish Server. Adding container capabilities enables you to run new types of applications and to deploy new archive types in GlassFish Server.

For more information, see Chapter 7, Adding Container Capabilities.

Creating a Session Persistence Module

GlassFish Server enables you to create a session persistence module in the web container for high availability-related functionality by implementing the PersistenceStrategyBuilder interface . Using the PersistenceStrategyBuilder interface in an HK2 service makes the session manager extensible because you can implement a new persistence type without having to modify the web container code.

For information about other high-availability, session persistence solutions, see Chapter 10, Configuring High Availability Session Persistence and Failover, in Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide.

For more information, see Chapter 8, Creating a Session Persistence Module.

Packaging and Delivering an Add-On Component

Packaging an add-on component enables the component to interact with the GlassFish Server kernel in the same way as other components. Integrating a component with GlassFish Server enables GlassFish Server to discover the component at runtime. If an add-on component is an extension or update to existing installations of GlassFish Server, deliver the component through Update Tool.

For more information, see Chapter 9, Packaging, Integrating, and Delivering an Add-On Component.