Oracle GlassFish Server 3.0.1 Add-On Component Development Guide

ProcedureTo Define a Component's Initial Configuration Data

  1. Create a plain-text file that contains an XML fragment to represent the configuration data.

    • Ensure that each XML element accurately represents the interface that is defined for the element.

    • Ensure that any subelements that you are initializing are correctly nested.

    • Set attributes of the elements to their required initial values.

  2. When you package the component, include the file that contains the XML fragment in the component's JAR file.

Example 6–7 XML Data Fragment

This example shows the XML data fragment for adding the wombat-container-config element to the domain.xml file. The wombat-container-config element contains the subelement wombat-element. The attributes of wombat-element are initialized as follows:

    <wombat-element foo="something" bar="anything"/>