2.15.3 delete-resource-ref
Removes a reference to a resource.
Synopsis
asadmin [asadmin-options] delete-resource-ref [--help] [--target target] reference_name
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The delete-resource-ref subcommand removes from a cluster or an unclustered server instance a reference to a resource (for example, a JDBC resource). This effectively results in the removal of the resource from the JNDI tree of the targeted instance or cluster. The target instance or instances making up the cluster need not be running or available for this subcommand to succeed. If one or more instances are not available, they will no longer load the resource in the JNDI tree the next time they start.
Removal of the reference does not result in removal of the resource from the domain. The resource is removed only by the delete subcommand for that resource (for example, delete-jdbc-resource).
This subcommand is supported in remote mode only.
Precondition
Domain Administration Server (DAS) is running.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --target target
-
Specifies the target from which you are removing the resource reference.
Type: String
The following values can be specified:
-
server
Removes the resource reference from the default server instance server and is the default value.
-
cluster_name
Removes the resource reference from every server instance in the cluster.
-
instance_name
Removes the resource reference from the named unclustered server instance.
Default value: server
-
- reference_name
-
Specifies the name or JNDI name of the resource.
Type: String
The following values can be specified:
-
Name or JNDI name of the resource
Default value: N/A
-
Examples
The following example removes a reference to the JDBC resource named jdbc/DerbyPool on the cluster cluster1.
asadmin delete-resource-ref --target cluster1 jdbc/DerbyPool
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
1 |
error in executing the command. |