Oracle GlassFish Server 3.1 Section 1: asadmin Utility Subcommands
create-connector-connection-pool(1)
create-connector-security-map(1)
create-connector-work-security-map(1)
create-jdbc-connection-pool(1)
create-message-security-provider(1)
create-resource-adapter-config(1)
delete-connector-connection-pool(1)
delete-connector-security-map(1)
delete-connector-work-security-map(1)
delete-jdbc-connection-pool(1)
delete-message-security-provider(1)
delete-resource-adapter-config(1)
disable-http-lb-application(1)
disable-secure-admin-internal-user(1)
disable-secure-admin-principal(1)
enable-secure-admin-internal-user(1)
enable-secure-admin-principal(1)
list-connector-connection-pools(1)
list-connector-security-maps(1)
list-connector-work-security-maps(1)
list-message-security-providers(1)
list-resource-adapter-configs(1)
list-secure-admin-internal-users(1)
list-secure-admin-principals(1)
list-supported-cipher-suites(1)
unfreeze-transaction-service(1)
update-admin-server-coordinates(1)
update-admin-server-local-coordinates(1)
update-connector-security-map(1)
update-connector-work-security-map(1)
Oracle GlassFish Server 3.1 Section 1M: Utility Commands
Oracle GlassFish Server 3.1 Section 5ASC: GlassFish Server Concepts
- creates the resources specified in an XML file
add-resources [--help] [--target target] [--upload={false|true}] xml-file-name
The add-resources subcommand creates the resources named in the specified XML file. The resources that can be created with this subcommand are listed in See Also in this help page.
The --target option specifies the target for which you are creating the resources. If this option specifies the domain, the resources are added only to the configuration of the domain administration server (DAS). If this option specifies any other target, the resources are added to the configuration of the DAS and references are added to the resources from the specified target.
The xml-file-name operand is the path to the XML file that contains the resources to be created. The DOCTYPE must be specified as http://glassfish.org/dtds/glassfish-resources_1_5.dtd in the resources.xml file.
This subcommand is supported in remote mode only.
Displays the help text for the subcommand.
Specifies the target for which you are creating the resources.
Valid values are as follows:
Creates the resources for the default server instance server and is the default value.
Creates the resources for the domain.
Creates the resources for every server instance in the cluster.
Creates the resources for a particular GlassFish Server instance.
Specifies whether the subcommand uploads the file to the DAS. In most situations, this option can be omitted.
Valid values are as follows:
The subcommand does not upload the file and attempts to access the file through the specified file name. If the DAS cannot access the file, the subcommand fails.
For example, the DAS might be running as a different user than the administration user and does not have read access to the file. In this situation, the subcommand fails if the --upload option is false.
The subcommand uploads the file to the DAS over the network connection.
The default value depends on whether the DAS is on the host where the subcommand is run or is on a remote host.
If the DAS is on the host where the subcommand is run, the default is false.
If the DAS is on a remote host, the default is true.
The path to the XML file that contains the resources that are to be created. You can specify an absolute path, only the file name, or a relative path.
If you specify an absolute path, the XML file can be anywhere.
If you specify only the file name, the XML file must reside in the as-install/domains/domain1/config directory on the DAS host. This requirement must be met even if you run the subcommand from another host.
If you specify a relative path, the XML file must be in the relative directory.
An example XML file follows.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions //EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> <resources> <jdbc-connection-pool name="SPECjPool" steady-pool-size="100" max-pool-size="150" max-wait-time-in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isolation-level-guaranteed="true" is-connection-validation-required="false" connection-validation-method="auto-commit" fail-all-connections="false" datasource-classname="oracle.jdbc.pool.OracleDataSource"> <property name="URL" value="jdbc:oracle:thin:@iasperfsol12:1521:specdb"/> <property name="User" value="spec"/> <property name="Password" value="spec"/> <property name="MaxStatements" value="200"/> <property name="ImplicitCachingEnabled" value="true"/> </jdbc-connection-pool> <jdbc-resource enabled="true" pool-name="SPECjPool" jndi-name="jdbc/SPECjDB"/> </resources>
Example 1 Adding Resources
This example creates resources using the contents of the XML file resource.xml.
asadmin> add-resources resource.xml Command : Connector connection pool jms/testQFactoryPool created. Command : Administered object jms/testQ created. Command : Connector resource jms/testQFactory created. Command : Resource adapter config myResAdapterConfig created successfully Command : JDBC connection pool DerbyPoolA created successfully. Command : JDBC resource jdbc/__defaultA created successfully. Command add-resources executed successfully.
subcommand executed successfully
error in executing the subcommand
create-jdbc-connection-pool(1), create-jdbc-resource(1), create-jms-resource(1), create-jndi-resource(1), create-javamail-resource(1), create-custom-resource(1), create-connector-resource(1), create-connector-work-security-map(1), create-admin-object(1), create-resource-adapter-config(1)