This section contains instructions for integrating resources into the GlassFish Server environment. Information about administering specific resources, such as JDBC, is contained in other chapters.
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.
Ensure that the server is running.
Remote subcommands require a running server.
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.
Restart GlassFish Server.
See To Restart a Domain.
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. |
You can also view the full syntax and options of the subcommand by typing asadmin help add-resources at the command line.