Exit Print View

Sun GlassFish Enterprise Server v3 Administration Guide

  This Document Entire Library
Print View

Document Information

Preface

1.  Overview of Enterprise Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering Enterprise Server

Part I Runtime Administration

2.  General Administration

Using the asadmin Utility

Path to the asadmin Utility

asadmin Utility Syntax

Subcommands of the asadmin Utility

asadmin Utility Options and Subcommand Options

Operands of asadmin Utility Subcommands

To Run an asadmin Utility Subcommand in Single Mode

To Display Help Information for the asadmin Utility or a Subcommand

To Start a Multimode Session

To End a Multimode Session

To Run a Set of asadmin Subcommands From a File

Administering System Properties

To Create System Properties

To List System Properties

To Delete a System Property

Administering Resources

To Add Resources From an XML File

Listing Various System Elements

To Display the Enterprise Server Version

To List Applications

To List Containers

To List Modules

To List Subcommands

To List Timers

To Show Component Status

Using REST Interfaces to Administer Enterprise Server

Using REST URLs to Administer Enterprise Server

Using REST Resource Methods to Administer Enterprise Server

To Determine the Methods and Method Parameters That a Node in the Tree Supports

To Retrieve Data for a Node in the Tree

To Add a Node to the Tree

To Update a Node in the Tree

To Delete a Node From the Tree

Child Resources for Non-CRUD Operations

Securing Enterprise Server REST Interfaces

Formats for Resource Representation

JSON Resource Representation

XML Resource Representation

HTML Resource Representation

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Administering Life Cycle Modules

10.  Extending Enterprise Server

Part II Security Administration

11.  Administering System Security

12.  Administering User Security

13.  Administering Message Security

Part III Resources and Services Administration

14.  Administering Database Connectivity

15.  Administering EIS Connectivity

16.  Administering Internet Connectivity

17.  Administering the Object Request Broker (ORB)

18.  Administering the JavaMail Service

19.  Administering the Java Message Service (JMS)

20.  Administering the Java Naming and Directory Interface (JNDI) Service

21.  Administering Transactions

Part IV Appendixes

A.  Subcommands for the asadmin Utility

Index

Using REST Interfaces to Administer Enterprise Server

Enterprise Server provides representational state transfer (REST) interfaces to enable you to access monitoring and configuration data for Enterprise Server, including data that is provided by newly installed add-on components.

You can access the Enterprise Server REST interfaces through client applications such as:

You can also use the Enterprise Server REST interfaces in REST client applications that are developed in languages such as:

The implementation of the Enterprise Server REST interfaces is based on project Jersey. Project Jersey is the reference implementation of Java Specification Request (JSR) 311: JAX-RS: The Java API for RESTful Web Services. Information about JSR 311 is also available from the JSR 311 project home page.

The following topics are addressed here:

Using REST URLs to Administer Enterprise Server

Each node in the configuration and monitoring object trees is represented as a REST resource that is accessible through an HTTP uniform resource locator (URL). Access to REST resources for Enterprise Server monitoring and configuration data requires a running DAS.

The formats of the URLs to resources that represent nodes in the configuration and monitoring object trees are as follows:

The replaceable items in these URLs are as follows:

host

The host where the DAS is running.

port

The HTTP port or HTTPS port for administration.

path

The path to the node. The path is the dotted name of the node in which each dot (.) is replaced with a slash (/). For more information, see the following documentation:

If the URL to a REST resource for Enterprise Server monitoring or configuration data is opened in a web browser, the browser displays a web page that contains the following information about the resource:

The following figure shows the web page for the REST resource for managing a domain.

Web Page for the REST Resource for Managing a Domain
Screen capture showing the web page for the REST resource for managing a domain.

Using REST Resource Methods to Administer Enterprise Server

The Enterprise Server REST interfaces support methods for accessing nodes in the monitoring and configuration object trees.

The following table shows the REST methods for administering monitoring and configuration data and the tasks that you can perform with each method. These methods are HTTP 1.1 primitives. For the detailed specification of these primitives, see Hypertext Transfer Protocol -- HTTP/1.1.

REST Resource Methods for Administering Monitoring and Configuration Data
Task
REST Method
Determine the methods and method parameters that a node in the tree supports
OPTIONS or GET
Retrieve data for a node in the tree
GET
Add a node to the tree
POST
Update a node in the tree
POST
Delete a node from the tree
DELETE

Note - The GET method can be used instead of the OPTIONS method to determine the methods and method parameters that a node in the tree supports. The GET method also provides additional information about the node. For details, see To Retrieve Data for a Node in the Tree.


To Determine the Methods and Method Parameters That a Node in the Tree Supports

The methods and method parameters that a node in the tree supports depend on the REST resource that represents the node:

Before performing any operations on a node in the tree, determine the methods and method parameters that the node supports.

You can specify the format in which this information is presented. For more information, see Formats for Resource Representation.

  1. Ensure that the server is running.

    Operations on REST resources for Enterprise Server data require a running server.

  2. Use the appropriate method on the REST resource that represents the node.

    • If the node is in the monitoring object tree, use the GET method.

    • If the node is in the configuration object tree, use the OPTIONS method or the GET method.

    The GET method and the OPTIONS method return the list of methods that the resource supports. For each method, the list of acceptable message parameters or the list of acceptable query parameters are returned.

Determining the Methods and Method Parameters That a Node in the Tree Supports

This example uses the cURL utility to determine the methods and method parameters that the resource for the domain supports. The example uses the following options of the cURL utility:

In this example, the DAS is running on the local host and the HTTP port for administration is 4848. In addition to the OPTIONS method, the resource supports the POST method and the GET method.

curl -X OPTIONS -H "Accept: application/json" http://localhost:4848/management/domain
{"Domain":
  {
    "Method":{
      "Name":"POST",
      "Message Parameters":{
        "log-root":{"Key":"false", "Type":"string", "Optional":"true"},
        "application-root":{"Key":"false", "Type":"string", "Optional":"true"},
        "locale":{"Key":"false", "Type":"string", "Optional":"true"},
        "version":{"Key":"false", "Type":"string", "Optional":"true"}
      }
    },
    "Method":{
      "Name":"GET"
    }
  }
}

To Retrieve Data for a Node in the Tree

Retrieving data for a node in the tree obtains the following information about the REST resource that represents the node:

You can specify the format in which this information is presented. For more information, see Formats for Resource Representation.

  1. Ensure that the server is running.

    Operations on REST resources for Enterprise Server data require a running server.

  2. Use the GET method on the REST resource that represents the node.

Retrieving Data for a Node in the Tree

This example uses the cURL utility to retrieve data for the resource for a domain. The example uses the following options of the cURL utility:

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.

Line breaks are added to enhance readability.

curl -X GET -H "Accept: application/json" http://localhost:4848/management/domain
{

  "Domain":{"log-root":"${com.sun.aas.instanceRoot}/logs", 
"application-root":"${com.sun.aas.instanceRoot}/applications", 
"locale":"", "version":"74.1"},

  "Methods":{
    "Method":{
      "Name":"POST",
      "Message Parameters":{
        "log-root":{"Key":"false", "Type":"string", "Optional":"true"},
        "application-root":{"Key":"false", "Type":"string", "Optional":"true"},
        "locale":{"Key":"false", "Type":"string", "Optional":"true"},
        "version":{"Key":"false", "Type":"string", "Optional":"true"}
      }
    },
    "Method":{
      "Name":"GET"
    }
  },

  "Child Resources":[
    "http://localhost:4848/management/domain/configs",
    "http://localhost:4848/management/domain/resources",
    "http://localhost:4848/management/domain/servers",
    "http://localhost:4848/management/domain/property",
    "http://localhost:4848/management/domain/applications",
    "http://localhost:4848/management/domain/system-applications",
    "http://localhost:4848/management/domain/stop",
    "http://localhost:4848/management/domain/restart",
    "http://localhost:4848/management/domain/uptime",
    "http://localhost:4848/management/domain/version",
    "http://localhost:4848/management/domain/rotate-log",
    "http://localhost:4848/management/domain/host-port"
  ]

To Add a Node to the Tree

  1. Ensure that the server is running.

    Operations on REST resources for Enterprise Server data require a running server.

  2. Determine the acceptable message parameters for the POST method of the resource that represents the parent of the node.

    For information about how to perform this step, see To Determine the Methods and Method Parameters That a Node in the Tree Supports.

  3. Use the POST method on the REST resource that represents the parent of the node that you are adding.

  4. Confirm that the node has been added.

    Perform this step on the resource that represents the node that you have just added, not the parent. For information about how to perform this step, see To Retrieve Data for a Node in the Tree.

Adding a Node to the Tree

This example uses the cURL utility to add a JDBC resource node to the tree by creating a REST resource to represent the JDBC resource.

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.

Line breaks are added to enhance readability.

  1. This step determines the acceptable message parameters for the POST method of the resource jdbc-resource.

    curl -X OPTIONS -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/jdbc-resource
    {"JdbcResource":
      {
        "Method":{
          "Name":"POST",
          "Message Parameters":{
            "id":{"Acceptable Values":"", "Default Value":"", "Type":"string", 
                "Optional":"false"},
            "enabled":{"Acceptable Values":"", "Default Value":"true", 
                "Type":"boolean", "Optional":"true"},
            "description":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"},
            "target":{"Acceptable Values":"", "Default Value":"", "Type":"string", 
                "Optional":"true"},
            "property":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"},
            "connectionpoolid":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"false"}
          }
        },
        "Method":{
          "Name":"GET"
        }
      }
    }
  2. This step adds a resource as a child of the jdbc-resource resource. The -d option of the cURL utility sets the required message parameters as follows:

    • id is set to jdbc/myjdbcresource.

    • connectionpoolid is set to DerbyPool.

    curl -X POST -d "id=jdbc/myjdbcresource&connectionpoolid=DerbyPool" 
    http://localhost:4848/management/domain/resources/jdbc-resource
    "http://localhost:4848/management/domain/resources/jdbc-resource/
    jdbc/myjdbcresource" created successfully.
  3. This step confirms that the node has been added by retrieving data for the REST resource that represents the node.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
    {
    
      "JdbcMyjdbcresource":{"enabled":"true", "pool-name":"DerbyPool", 
          "description":"", "jndi-name":"jdbc/myjdbcresource", "object-type":"user"},
    
      "Methods":{
        "Method":{
          "Name":"POST",
          "Message Parameters":{
            "enabled":{"Key":"false", "Default Value":"true", 
                "Type":"boolean", "Optional":"true"},
            "pool-name":{"Key":"false", "Type":"string", "Optional":"true"},
            "description":{"Key":"false", "Type":"string", "Optional":"true"},
            "jndi-name":{"Key":"true", "Type":"string", "Optional":"true"},
            "object-type":{"Key":"false", "Default Value":"user", 
                "Type":"string", "Optional":"true"}
          }
        },
        "Method":{
          "Name":"GET"
        },
        "Method":{
          "Name":"DELETE",
          "Message Parameters":{
            "target":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"}
          }
        }
      }
    
    }

To Update a Node in the Tree

  1. Ensure that the server is running.

    Operations on REST resources for Enterprise Server data require a running server.

  2. Determine the acceptable message parameters for the POST method of the resource that represents the node.

    For information about how to perform this step, see To Determine the Methods and Method Parameters That a Node in the Tree Supports.

  3. Use the POST method on the REST resource that represents the node that you are updating.

  4. Confirm that the node has been updated.

    For information about how to perform this step, see To Retrieve Data for a Node in the Tree.

Updating a Node in the Tree

This example uses the cURL utility to update a JDBC resource in the tree by modifying the REST resource that represents the JDBC resource.

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.

Line breaks are added to enhance readability.

  1. This step determines the acceptable message parameters for the POST method of the resource jdbc-myjdbcresource.

    curl -X OPTIONS -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
    {"JdbcMyjdbcresource":
      {
        "Method":{
          "Name":"POST",
          "Message Parameters":{
            "enabled":{"Key":"false", "Default Value":"true", 
                "Type":"boolean", "Optional":"true"},
            "pool-name":{"Key":"false", "Type":"string", "Optional":"true"},
            "description":{"Key":"false", "Type":"string", "Optional":"true"},
            "jndi-name":{"Key":"true", "Type":"string", "Optional":"true"},
            "object-type":{"Key":"false", "Default Value":"user", 
                "Type":"string", "Optional":"true"}
          }
        },
        "Method":{
          "Name":"GET"
        },
        "Method":{
          "Name":"DELETE",
          "Message Parameters":{
            "target":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"}
          }
        }
      }
    }
  2. This step updates the REST resource jdbc-myjdbcresource to disable the JDBC resource that jdbc-myjdbcresource represents. The -d option of the cURL utility sets the enabled message parameter to disabled.

    curl -X POST -d "enabled=false" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
    "http://localhost:4848/management/domain/resources/jdbc-resource/
    jdbc-myjdbcresource" updated successfully.
  3. This step confirms that the node has been updated by retrieving data for the REST resource that represents the node.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
    {
    
      "JdbcMyjdbcresource":{"enabled":"false", "pool-name":"DerbyPool", 
           "description":"", "jndi-name":"jdbc/myjdbcresource", "object-type":"user"},
    
      "Methods":{
        "Method":{
          "Name":"POST",
          "Message Parameters":{
            "enabled":{"Key":"false", "Default Value":"true", 
                "Type":"boolean", "Optional":"true"},
            "pool-name":{"Key":"false", "Type":"string", "Optional":"true"},
            "description":{"Key":"false", "Type":"string", "Optional":"true"},
            "jndi-name":{"Key":"true", "Type":"string", "Optional":"true"},
            "object-type":{"Key":"false", "Default Value":"user", 
                "Type":"string", "Optional":"true"}
          }
        },
        "Method":{
          "Name":"GET"
        },
        "Method":{
          "Name":"DELETE",
          "Message Parameters":{
            "target":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"}
          }
        }
      }
    
    }

To Delete a Node From the Tree

  1. Ensure that the server is running.

    Operations on REST resources for Enterprise Server data require a running server.

  2. Confirm that the node can be deleted.

    For information about how to perform this step, see To Determine the Methods and Method Parameters That a Node in the Tree Supports.

  3. Confirm that the node has been deleted.

    Perform this step on the resource that represents the parent of the node that you have just deleted. For information about how to perform this step, see To Retrieve Data for a Node in the Tree.

Deleting a Node From the Tree

This example uses the cURL utility to delete a JDBC resource from the tree by deleting the REST resource that represents the JDBC resource.

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.

Line breaks are added to enhance readability.

  1. This step confirms that the node can be deleted by retrieving the REST methods that the resource jdbc-myjdbcresource supports.

    curl -X OPTIONS -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
    {"JdbcMyjdbcresource":
      {
        "Method":{
          "Name":"POST",
          "Message Parameters":{
            "enabled":{"Key":"false", "Default Value":"true", 
                "Type":"boolean", "Optional":"true"},
            "pool-name":{"Key":"false", "Type":"string", "Optional":"true"},
            "description":{"Key":"false", "Type":"string", "Optional":"true"},
            "jndi-name":{"Key":"true", "Type":"string", "Optional":"true"},
            "object-type":{"Key":"false", "Default Value":"user", 
                "Type":"string", "Optional":"true"}
          }
        },
        "Method":{
          "Name":"GET"
        },
        "Method":{
          "Name":"DELETE",
          "Message Parameters":{
            "target":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"}
          }
        }
      }
    }
  2. This step deletes the jdbc-myjdbcresource resource.

    curl -X DELETE http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
  3. This step confirms that the node has been deleted by retrieving data for the REST resource that represents the parent of the node.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/jdbc-resource/
    {
    
      "JdbcResource":{},
    
      "Methods":{
        "Method":{
          "Name":"POST",
          "Message Parameters":{
            "id":{"Acceptable Values":"", "Default Value":"", "Type":"string", 
                "Optional":"false"},
            "enabled":{"Acceptable Values":"", "Default Value":"true", 
                "Type":"boolean", "Optional":"true"},
            "description":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"true"},
            "target":{"Acceptable Values":"", "Default Value":"", "Type":"string", 
                "Optional":"true"},
            "property":{"Acceptable Values":"", "Default Value":"", "Type":"string",
                "Optional":"true"},
            "connectionpoolid":{"Acceptable Values":"", "Default Value":"", 
                "Type":"string", "Optional":"false"}
          }
        },
        "Method":{
          "Name":"GET"
        }
      },
    
      "Child Resources":[
        "http://localhost:4848/management/domain/resources/jdbc-resource/
            jdbc-__TimerPool",
        "http://localhost:4848/management/domain/resources/jdbc-resource/
            jdbc-__default"
      ]

Child Resources for Non-CRUD Operations

The Enterprise Server REST interfaces also support operations other than create, read, update, and delete (CRUD) operations, for example:

These operations are supported through child resources of the resource on which the operation is performed. The child resources do not represent nodes in the configuration object tree.

For example, the resource for managing a domain provides child resources for non-CRUD operations as shown in the following table.

Child Resources for Non-CRUD Operations on a Domain
Resource
Action
host-port
Displays the host on which the DAS is running and the port on which the DAS listens for HTTP requests.
restart
Stops and then restarts the DAS of the domain.
rotate-log
Rotates the server log file by renaming the file with a timestamp name in the format server.log_date-and-time, and creating an empty log file.
stop
Stops the DAS of the domain.
uptime
Displays the length of time that the DAS has been running since it was last restarted.
version
Displays version information for Enterprise Server.

Securing Enterprise Server REST Interfaces

The Enterprise Server REST interfaces support basic authentication over a secure connection. When security is enabled, you must specify https as the protocol in the URLs to REST resources and provide a username and password.

Securing Enterprise Server REST Interfaces involves the following sequence of tasks:

  1. Adding an admin-realm user to the asadmin user group

  2. Enabling Secure Sockets Layer (SSL)

For information about how to perform these tasks from the command line, see the following documentation:

For information about how to perform these tasks by using the Administration Console, see the following topics in the Administration Console online help:

Formats for Resource Representation

The Enterprise Server REST interfaces represent resources in the following formats:

How to specify the resource representation depends on how you are accessing the Enterprise Server REST interfaces. For example, if you are using the cURL utility, specify the resource representation through the -H option as follows:

JSON Resource Representation

The general format for the JSON representation of a resource is as follows:

{
    "resource":{attributes},

    "Methods": {
        method-list
    }

    "Child Resources":[urls]
} 

The replaceable items in this format are as follows:

resource

The name of the resource.

attributes

Zero or more name-value pairs separated by a comma (,). Each name-value pair is specified as "name":value.

method-list

One or more metadata sets separated by a comma (,) that represent the methods that the resource supports. For the format of each metadata set, see JSON Representation of a Method in a Method List.

urls

Zero or more URLs to child resources separated by a comma (,).

JSON Representation of a Method in a Method List

The JSON representation of a method in a method list is as follows:

Method":{
    "Name":"method-name",

    "Message Parameters":{
        message-parameter-list
    }

    "Query Parameters":{
        queryparameter- list
    }
}

The replaceable items in this format are as follows:

method-name

The name of the method, which is GET, POST, or DELETE.

message-parameter-list

Zero or more metadata sets separated by a comma (,) that represent the message parameters that are allowed for the method. For the format of each metadata set, see JSON Representation of a Message Parameter or a Query Parameter.

query-parameter-list

Zero or more metadata sets separated by a comma (,) that represent the query parameters that are allowed for the method. For the format of each metadata set, see JSON Representation of a Message Parameter or a Query Parameter.

JSON Representation of a Message Parameter or a Query Parameter

The JSON representation of a message parameter or a query parameter is as follows:

"parameter-name":{attribute-list}

The replaceable items in this format are as follows:

parameter-name

The name of the parameter.

attribute-list

A comma-separated list of name-value pairs of attributes for the parameter. Each pair is in the following format:

"name":"value"

Possible attributes are as follows:

Default Value

The default value of the parameter.

Acceptable Values

The set or range of acceptable values for the parameter.

Type

The data type of the parameter, which is one of the following types:

  • boolean

  • int

  • string

Optional

Indicates whether the parameter is optional. If true, the parameter is optional. If false, the parameter is required.

Key

Indicates whether the parameter is key. If true, the parameter is key. If false, the parameter is not key.

Example JSON Resource Representation

This example shows the JSON representation of the resource for managing a domain. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain.

Line breaks are added to enhance readability.

{

  "Domain":{"log-root":"${com.sun.aas.instanceRoot}/logs", 
       "application-root":"${com.sun.aas.instanceRoot}/applications", 
       "locale":"", "version":"73"},

  "Methods":{
    "Method":{
      "Name":"POST",
      "Message Parameters":{
        "log-root":{"Key":"false", "Type":"string", "Optional":"true"},
        "application-root":{"Key":"false", "Type":"string", "Optional":"true"},
        "locale":{"Key":"false", "Type":"string", "Optional":"true"},
        "version":{"Key":"false", "Type":"string", "Optional":"true"}
      }
    },
    "Method":{
      "Name":"GET"
    }
  },

  "Child Resources":[
    "http://localhost:4848/management/domain/configs",
    "http://localhost:4848/management/domain/resources",
    "http://localhost:4848/management/domain/servers",
    "http://localhost:4848/management/domain/property",
    "http://localhost:4848/management/domain/applications",
    "http://localhost:4848/management/domain/system-applications",
    "http://localhost:4848/management/domain/stop",
    "http://localhost:4848/management/domain/restart",
    "http://localhost:4848/management/domain/uptime",
    "http://localhost:4848/management/domain/version",
    "http://localhost:4848/management/domain/rotate-log",
    "http://localhost:4848/management/domain/host-port"
  ]

}
XML Resource Representation

The general format for the XML representation of a resource is as follows:

<resource attributes>

    <Methods>
        method-list
    </Methods>
children
</type>

The replaceable items in this format are as follows:

resource

The name of the resource.

attributes

Zero or more name-value pairs separated by a space. Each name-value pair is specified as name="value".

method-list

One or more XML elements that represent the methods that the resource supports. For the format of each element, see XML Representation of a Resource Method.

children

Zero or more XML elements that specify the URLs of child resources. Each element is specified as <child-resource>url</child-resource>, where child-resource is the name of the child resource and url is the URL to the child resource.

XML Representation of a Resource Method

The XML representation of a method in a method list is as follows:

<Method name="method-name">
    <Message-Parameters>
        message-parameter-list
    </Message-Parameters>
    <Query-Parameters>
        query-parameter-list
    </Query-Parameters>
</Method>

The replaceable items in this format are as follows:

method-name

The name of the method, which is GET, POST, or DELETE.

message-parameter-list

Zero or more XML elements separated by a line feed that represent the message parameters that are allowed for the method. For the format of each element, see XML Representation of a Message Parameter or a Query Parameter.

query-parameter-list

Zero or more XML elements separated by a line feed that represent the query parameters that are allowed for the method. For the format of each element, see XML Representation of a Message Parameter or a Query Parameter.

XML Representation of a Message Parameter or a Query Parameter

The XML representation of a message parameter or a query parameter is as follows:

<parameter-name attribute-list/>

The replaceable items in this format are as follows:

parameter-name

The name of the parameter.

attribute-list

A space-separated list of name-value pairs of attributes for the parameter. Each pair is in the following format:

name="value"

Possible attributes are as follows:

Default Value

The default value of the parameter.

Acceptable Values

The set or range of acceptable values for the parameter.

Type

The data type of the parameter, which is one of the following types:

  • boolean

  • int

  • string

Optional

Indicates whether the parameter is optional. If true, the parameter is optional. If false, the parameter is required.

Key

Indicates whether the parameter is key. If true, the parameter is key. If false, the parameter is not key.

Example XML Resource Representation

This example shows the XML representation of the resource for managing a domain. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain.

Line breaks are added to enhance readability.

<Domain log-root="${com.sun.aas.instanceRoot}/logs" 
application-root="${com.sun.aas.instanceRoot}/applications" locale="" version="73">

  <Methods>
    <Method name="POST">
      <Message-Parameters>
        <log-root Key="false" Type="string" Optional="true"/>
        <application-root Key="false" Type="string" Optional="true"/>
        <locale Key="false" Type="string" Optional="true"/>
        <version Key="false" Type="string" Optional="true"/>
      </Message-Parameters>
    </Method>
    <Method name="GET">
    </Method>
  </Methods>

  <Child-Resources>
    <Child-Resource>http://localhost:4848/management/domain/configs</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/resources</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/servers</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/property</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/applications</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/system-applications</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/stop</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/restart</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/uptime</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/version</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/rotate-log</Child-Resource>
    <Child-Resource>http://localhost:4848/management/domain/host-port</Child-Resource>
  </Child-Resources>

</Domain>
HTML Resource Representation

The format for the HTML representation of a resource is a web page that provides the following information about the resource:

For a sample web page, see Figure 2-1. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain.