2.15.1 add-resources
Creates the resources named in a specified XML file.
Synopsis
asadmin [asadmin-options] add-resources [--help] [--target target] [--upload={false|true}] xml-file-name
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The add-resources subcommand creates the resources named in a specified XML file. The DOCTYPE has to 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.
Precondition
DAS has to be in a running state.
Files
Specify an XML file in any location by using an absolute path.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --target target
-
Specifies the target for which you are creating the resources.
Type: String
-
server
Creates resources for the default server instance. This is the default value.
-
domain
Creates resources for a domain.
-
cluster-name
Creates resources for every server instance in a cluster.
-
instance-name
Creates resources for a specific server instance.
Default value: server
-
- --upload={false|true}
-
Specifies whether the subcommand uploads the file to the DAS
Type: Boolean
The following values can be specified:
-
true
The subcommand uploads the file to the DAS over a 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.
-
false
The subcommand does not upload the file and attempts to access the file through a specified file name. If the DAS cannot access the file, the subcommand fails. For example, the DAS may 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.
Default value:
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.
-
- xml-file-name
-
Specifies the name of the xml file that contains the resources.
Type: String
The following values can be specified:
-
Name of the .xml file
Default value: N/A
-
Examples
The following example creates resources using the contents of the XML file resource.xml on the server instance instance1.
asadmin add-resources --target instance1 domain-dir/domain_name/config/resource.xml
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
1 |
error in executing the command. |