Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server 3.1 Add-On Component Development Guide |
1. Introduction to the Development Environment for GlassFish Server Add-On Components
3. Extending the Administration Console
4. Extending the asadmin Utility
5. Adding Monitoring Capabilities
6. Adding Configuration Data for a Component
How GlassFish Server Stores Configuration Data
Defining an Attribute of an Element
Representing an Attribute of an Element
Specifying the Data Type of an Attribute
Identifying an Attribute of an Element
Specifying the Name of an Attribute
Specifying the Default Value of an Attribute
Specifying Whether an Attribute Is Required or Optional
Example of Defining an Attribute of an Element
Initializing a Component's Configuration Data
To Define a Component's Initial Configuration Data
To Write a Component's Initial Configuration Data to the domain.xml File
Creating a Transaction to Update Configuration Data
To Create a Transaction to Update Configuration Data
Dotted Names and REST URLs of Configuration Attributes
Examples of 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 subelement represents a containment or ownership relationship. For example, GlassFish Server defines the network-listeners element to contain the configuration data for individual network listeners. The configuration data for an individual network listener is represented by the network-listener element, which is a subelement of network-listeners element.
For more information, see Defining an Element.
The interface that represents the subelement must extend the org.jvnet.hk2.config.ConfigBeanProxy interface.
Example 6-3 Declaring an Interface to Represent a Subelement
This example shows the declaration of the WombatElement interface to represent the wombat-element element.
... import org.jvnet.hk2.config.ConfigBeanProxy; import org.jvnet.hk2.config.Configured; ... @Configured public interface WombatElement extends ConfigBeanProxy { ... } ...
Example 6-4 Identifying a Subelement to its Parent Element
This example identifies the wombat-element element as a subelement.
... import org.jvnet.hk2.config.Element; ... import java.beans.PropertyVetoException; ... @Element public WombatElement getElement(); public void setElement(WombatElement element) throws PropertyVetoException; ...