Sun GlassFish Enterprise Server v3 Administration Guide

ProcedureTo Add Resources From an XML File

Use the add-resources subcommand in remote mode to create the resources named in the specified XML file. The following resources are supported: JDBC connection pool and resource, JMS, JNDI, and JavaMail resources, custom resource, connector resource and work security map, admin object, and resource adapter configuration.

The XML file must reside in the as-install/domains/domain1/config directory. If you specify a relative path or simply provide the name of the XML file, this subcommand will prepend as-install/domains/domain1/config to this operand.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Add resources from an XML file by using the add-resources(1) subcommand.

    Information about properties for the subcommand is included in this help page.

  3. Restart Enterprise Server.

    See To Restart a Domain.


Example 2–13 Adding Resources

This example creates resources using the contents of the resource.xml file on localhost.


asadmin> add-resources c:\tmp\resource.xml
Command : JDBC resource jdbc1 created successfully.
Command : JDBC connection pool poolA created successfully.
Command add-resources executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help add-resources at the command line.