Eclipse GlassFish

Reference Manual

Release 7

Contributed 2018 - 2024

This reference manual describes administration commands and utility commands that are available with Eclipse GlassFish 7. This reference manual also describes concepts that are related to Eclipse GlassFish administration.

The available options, arguments, and operands for each command are provided in accordance with standard rules of command syntax, along with availability attributes, diagnostic information, and cross-references to other manual pages and reference material with relevant information.

This reference manual is for all users of Eclipse GlassFish.


Eclipse GlassFish Reference Manual, Release 7

Copyright © 2013, 2019 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at http://www.eclipse.org/legal/epl-2.0.

SPDX-License-Identifier: EPL-2.0

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

Eclipse Logo

Preface

This documentation is part of the Java Enterprise Edition contribution to the Eclipse Foundation and is not intended for use in relation to Java Enterprise Edition or Orace GlassFish. The documentation is in the process of being revised to reflect the new Jakarta EE branding. Additional changes will be made as requirements and procedures evolve for Jakarta EE. Where applicable, references to Jakarta EE or Java Enterprise Edition should be considered references to Jakarta EE.

Please see the Title page for additional license information.

Both novice users and those familiar with Eclipse GlassFish can use online man pages to obtain information about the product and its features. A man page is intended to answer concisely the question "What does it do?" The man pages in general comprise a reference manual. They are not intended to be a tutorial.

Overview

The following contains a brief description of each man page section and the information it references:

  • Section 1 describes, in alphabetical order, the asadmin utility subcommands.

  • Section 1M describes Eclipse GlassFish utility commands.

  • Section 5ASC describes concepts that are related to Eclipse GlassFish administration.

Below is a generic format for man pages. The man pages of each manual section generally follow this order, but include only needed headings. For example, if there are no bugs to report, there is no Bugs section.

Name

This section gives the names of the commands or functions documented, followed by a brief description of what they do.

Synopsis

This section shows the syntax of commands or functions. The following special characters are used in this section:

[ ]

Brackets. The option or argument enclosed in these brackets is optional. If the brackets are omitted, the argument must be specified.

|

Separator. Only one of the arguments separated by this character can be specified at a time.

Description

This section defines the functionality and behavior of the service. Thus it describes concisely what the command does. It does not discuss options or cite examples.

Options

This section lists the command options with a concise summary of what each option does. The options are listed literally and in the order they appear in the Synopsis section. Possible arguments to options are discussed under the option, and where appropriate, default values are supplied.

Operands

This section lists the command operands and describes how they affect the actions of the command.

Examples

This section provides examples of usage or of how to use a command or function. Wherever possible a complete example including command-line entry and machine response is shown. Examples are followed by explanations, variable substitution rules, or returned values. Most examples illustrate concepts from the Synopsis, Description, Options, and Usage sections.

Exit Status

This section lists the values the command returns to the calling program or shell and the conditions that cause these values to be returned. Usually, zero is returned for successful completion, and values other than zero for various error conditions.

See Also

This section lists references to other man pages, in-house documentation, and outside publications.

Notes

This section lists additional information that does not belong anywhere else on the page. It takes the form of an aside to the user, covering points of special interest. Critical information is never covered here.

Bugs

This section describes known bugs and, wherever possible, suggests workarounds.

1 Eclipse GlassFish 7 asadmin Utility Subcommands

This section describes, in alphabetical order, the subcommands of the asadmin(1M) utility.

add-library

Adds one or more library JAR files to Eclipse GlassFish

Synopsis

asadmin [asadmin-options] add-library [--help]
[--type={common|ext|app}] [--upload={false|true}]
library-file-path [library-file-path ... ]

Description

The add-library subcommand adds one or more library archive files to Eclipse GlassFish.

The --type option specifies the library type and the Eclipse GlassFish directory to which the library is added.

The library-file-path operand is the path to the JAR file that contains the library to be added. To specify multiple libraries, specify multiple paths separated by spaces.

The library archive file is added to the DAS. For common and extension libraries, you must restart the DAS so the libraries are picked up by the server runtime. To add the libraries to other server instances, synchronize the instances with the DAS by restarting them.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--type

Specifies the library type and the Eclipse GlassFish directory to which the library is added. Valid values are as follows:

common

Adds the library files to the Common class loader directory, domain-dir/lib. This is the default.

ext

Adds the library files to the Java optional package directory, domain-dir/lib/ext.

app

Adds the library files to the application-specific class loader directory, domain-dir/lib/applibs.

For more information about these directories, see "Class Loaders" in Eclipse GlassFish Application Development Guide.

--upload

Specifies whether the subcommand uploads the file to the DAS. In most situations, this option can be omitted. Valid values are as follows:

false

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.

true

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.

    If a directory filepath is specified, this option is ignored.

Operands

library-file-path

The paths to the archive files that contain the libraries that are to be added. You can specify an absolute path or a relative path.
If the --upload option is set to true, this is the path to the file on the local client machine. If the --upload option is set to false, this is the path to the file on the server machine.

Examples

Example 1   Adding Libraries

This example adds the library in the archive file mylib.jar to the application-specific class loader directory on the default server instance.

asadmin> add-library --type app /tmp/mylib.jar
Command add-library executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

"Class Loaders" in Eclipse GlassFish Application Development Guide

add-resources

Creates the resources specified in an XML file

Synopsis

asadmin [asadmin-options] add-resources [--help]
[--target target]
[--upload={false|true}] xml-file-name

Description

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.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target for which you are creating the resources.
Valid values are as follows:

server

Creates the resources for the default server instance server and is the default value.

domain

Creates the resources for the domain.

cluster-name

Creates the resources for every server instance in the cluster.

instance-name

Creates the resources for a particular Eclipse GlassFish instance.

--upload

Specifies whether the subcommand uploads the file to the DAS. In most situations, this option can be omitted. Valid values are as follows:

false

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.

true

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.

Operands

xml-file-name

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 domain-dir/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>

Examples

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.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

apply-http-lb-changes

Applies load balancer configuration changes to the load balancer

Synopsis

asadmin [asadmin-options] apply-http-lb-changes [--help]
lb-name

Description

Use the apply-http-lb-changes subcommand to apply the changes in the load balancer configuration to the physical load balancer. The load balancer must already exist. To create a physical load balancer, use the create-http-lb subcommand.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Context

The Load Balancer distributes the workload among multiple Eclipse GlassFish instances , increasing the overall throughput of the system. The Load Balancer also enables requests to failover from one server instance to another. For HTTP session information to persist, configure HTTP session persistence.

The Load Balancer Plugin is only available with Eclipse GlassFish, and is not available with Eclipse GlassFish. For Eclipse GlassFish, it is possible to use the mod_jk module to configure load balancing on the Apache HTTP server.

For more information about configuring load balancing with Eclipse GlassFish, refer to the online help in the Eclipse GlassFish Administration Console.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

lb-name

The name of the load balancer to which changes are applied. The load balancer must already exist. You can create it with the create-http-lb subcommand.

Examples

Example 1   Using the apply-http-lb-changes subcommand

This example applies configuration changes to a load balancer named mylb.

asadmin> apply-http-lb-changes mylb
Command apply-http-lb-changes executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

attach

Attaches to subcommands that were started using asadmin --detach or that contain progress information

Synopsis

asadmin [asadmin-options] attach [--help]
job_id

Description

The attach subcommand attaches to subcommands that were started using the asadmin utility option --detach or that contain progress information. The --detach option detaches long-running subcommands and executes them in the background in detach mode.

Job IDs are assigned to the subcommands (jobs), and can be used to view the status of a job and its output. Use the list-jobs(1) subcommand to view the jobs and their job IDs, and the configure-managed-jobs(1) subcommand to configure how long information about the jobs is kept.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

job_id

The ID of the job for which you want to view status and output.

Examples

Example 1   Attaching to a Subcommand and Checking Its Status

This example attaches to the deploy subcommand with a job ID of 20 and shows that the job is finished. If a subcommand is still in progress, the output displays the current status, for example, 64%: Uploading bits.

asadmin> attach 20
Finished execution of deploy
Command attach executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

backup-domain

Performs a backup on the domain

Synopsis

asadmin [asadmin-options] backup-domain [--help]
[--long[={false|true}]]
[--description description-text]
[--domaindir domain-root-dir]
[--backupdir backup-directory]
[--backupconfig backup-config-name]
[domain_name]

Description

The backup-domain subcommand backs up files under the named domain.

This subcommand is supported in local mode only in Eclipse GlassFish, and is supported in local mode and remote mode in Eclipse GlassFish.

In Eclipse GlassFish, the domain to be backed up must be stopped.

In Eclipse GlassFish, the domain to be backed up must be stopped or be suspended using the suspend-domain(1) subcommand.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--long
-l

Displays detailed information about the backup operation.

The default value is `false`.
--description

Specifies a description to store in the backup file. The description is displayed as part of the information about a backup file.
The default value has this form:

domain-name backup created on YYYY_MM_DD by user user-name
--domaindir

Specifies the domain root directory, the parent directory of the domain to back up.
The default value is as-install/domains.

--backupdir

Specifies the directory under which the backup file is to be stored.
The default value is as-install/domains/domain-dir/backups. If the domain is not in the default location, the location is domain-dir/backups.

--backupconfig

(Supported only in Eclipse GlassFish.) The name of the domain backup configuration in the backup directory under which the backup file is to be stored.

Operands

domain-name

Specifies the name of the domain to be backed up.
This operand is optional if only one domain exists in the Eclipse GlassFish installation.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

list-backups(1), restore-domain(1), resume-domain(1), suspend-domain(1)

change-admin-password

Changes the administrator password

Synopsis

asadmin [asadmin-options] change-admin-password [--help]
[--domaindir domain-root-dir [--domain_name domain-name]]

Description

The change-admin-password subcommand modifies the administrator password. The change-admin-password subcommand is interactive because the subcommand prompts the user for the old administrator password, for the new administrator password, and for confirmation of the new administrator password. The new password must contain at least 8 characters.

If the only user is an anonymous user without a password, this subcommand fails.

If a blank password is provided, this subcommand fails if secure administration is enabled.

For security purposes, create a password-protected user account with administrator privileges. To create this account, use the create-file-user(1) or the Administration Console. After creating this user account, remove the anonymous user to restrict access to Eclipse GlassFish settings.

If more than one administrator is configured for Eclipse GlassFish, you must run the asadmin command with the --user option to change the password for that user. For more information, see the examples in this help page.

This subcommand is supported in local mode and remote mode. If the --domaindir or --domain_name option is specified, the change-admin-password subcommand operates in local mode. If neither option is specified, the change-admin-password subcommand first attempts to operate in remote mode. If neither option is specified and the DAS is not running, the change-admin-password subcommand operates in local mode, using the default values for the --domaindir and --domain_name options.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--domaindir

Specifies the parent directory of the domain specified in the --domain_name option. When this option is used, the change-admin-password subcommand operates in local mode.

--domain_name

Specifies the domain of the admin user.
This option is not required if the directory specified by the --domaindir option contains only one domain.

Examples

Example 1   Changing the Administrator Password For a Single User in Multimode

asadmin --user admin
asadmin> change-admin-password
Please enter the old admin password>
Please enter the new admin password>
Please enter the new admin password again>
Command change-admin-password executed successfully.

Example 2   Changing the Administrator Password For a Single User in Single Mode

asadmin --user admin change-admin-password
Please enter the old admin password>
Please enter the new admin password>
Please enter the new admin password again>
Command change-admin-password executed successfully.

Exit Status

0

command executed successfully

1

command failed

change-master-broker

Changes the master broker in a Message Queue cluster providing JMS services for a Eclipse GlassFish cluster.

Synopsis

asadmin [asadmin-options] change-master-broker [--help]
clustered-instance-name

Description

The change-master-broker subcommand changes the master broker in a Message Queue cluster that is the JMS provider for a Eclipse GlassFish cluster. By default, the master broker is the one associated with the first instance configured in the Eclipse GlassFish cluster.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

clustered-instance-name

The name of the server instance whose Message Queue broker is to become the master broker of the Message Queue cluster. This server instance must be an instance in a Eclipse GlassFish cluster.

Examples

Example 1   Changing the master broker

The following subcommand changes the Message Queue master broker to the one for the clustinst3 clustered instance.

asadmin> change-master-broker clustinst3
Command change-master-broker executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

change-master-password

Changes the master password

Synopsis

asadmin [asadmin-options] change-master-password [--help]
[--nodedir node-dir] [--domaindir domain-dir]
[--savemasterpassword={false|true}] [domain-name|node-name]

Description

The change-master-password subcommand is used to modify the master password. The change-master-password subcommand is interactive in that the user is prompted for the old master password, as well as the new master password. This subcommand will not work unless the server is stopped. In a distributed environment, this command must run on each machine in the domain.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--nodedir

The name of the directory containing the node instance for which the password will be changed. If this option is omitted, the change is applied to the entire domain.

--domaindir

The name of the domain directory used for this operation. By default, the --domaindir option is $AS_DEF_DOMAINS_PATH, which is an environment variable defined in the file asenv.bat or asenv.conf.

--savemasterpassword

This option indicates whether the master password should be written to the file system. This is necessary so that the start-domain(1) command can start the server without having to prompt the user.
The default is false.

Saving the master password on disk is extremely insecure and should be avoided.

If the --savemasterpassword option is not set, the master password file, if it exists, will be deleted.

Operands

domain-name|node-name

This name of the domain or node for which the password will be changed. If there is only a single domain, this is optional.

Examples

Example 1   Changing the Master Password

This example shows how to changed the master password for the domain44ps domain.

asadmin>change-master-password domain44ps
Please enter the new master password>
Please enter the new master password again>
Master password changed for domain44ps

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

collect-log-files

Creates a ZIP archive of all available log files

Synopsis

asadmin [asadmin-options] collect-log-files [--help]
[--target target]
[--retrieve={false|true}] [retrievefilepath]]

Description

The collect-log-files subcommand collects all available log files for the domain administration server (DAS), the specified cluster, or the specified Eclipse GlassFish instance and creates a single ZIP archive of the log files. If a cluster is specified, the ZIP archive also contains the log file for the DAS.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--retrieve

Specifies whether the ZIP archive is created in a directory other than the default directory.
By default the ZIP archive is created in the domain-dir`/collected-logs` directory. The ZIP file names are constructed from the specified target and timestamp, as follows:

log_yyyy-mm-dd_hh-min-sec.zip

Possible values are as follows:

false

The ZIP archive will be created in the default directory. If omitted, the --retrieve option defaults to false.

true

The ZIP archive will be created in the directory that the retrievefilepath operand specifies. If retrievefilepath is omitted, the ZIP archive will be created in the default directory.

--target

Specifies the target for which log files will be collected.
Possible values are as follows:

server

The log files will be collected for the DAS (default).

instance-name

The log files will be collected for the specified Eclipse GlassFish instance.

cluster-name

The log files will be collected for the specified cluster and the DAS.

Operands

retrievefilepath

The name of the directory in which the ZIP archive will be created. If this operand is omitted, the ZIP archive will be created in the default directory. If the --retrieve option is false, this operand is ignored.

Examples

Example 1   Collecting Log Files for the Default Server

This example generates a ZIP archive from the log files for the default server.

asadmin> collect-log-files
Created Zip file under /space/gf/glassfish7/glassfish/domains/domain1/\
collected-logs/log_2021-12-15_15-46-23.zip.
Command collect-log-files executed successfully.

Example 2   Collecting Log Files for a Cluster

This example generates a ZIP archive from the log files for a cluster named cluster1 and the two server instances running in the cluster.

asadmin> collect-log-files --target cluster1
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/gfv/glassfish7/glassfish/domains/domain1/\
collected-logs/log_2021-12-15_15-54-06.zip.
Command collect-log-files executed successfully.

Example 3   Collecting Log Files in a Directory Other Than the Default

for a Cluster

This example generates a ZIP archive from the log files for a cluster named cluster1 and its two server instances, and saves the archive in a directory named /space/output.

asadmin> collect-log-files --target cluster1 --retrieve true /space/output
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/output/log_2010-12-15_15-55-54.zip.
Command collect-log-files executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

configure-jms-cluster

Configures the Message Queue cluster providing JMS services to a Eclipse GlassFish cluster

Synopsis

asadmin [asadmin-options] configure-jms-cluster [--help]
[--clustertype={conventional|enhanced}]
[--configstoretype={masterbroker|shareddb}]
[--messagestoretype={file|jdbc}]
[--dbvendor database-vendor]
[--dbuser database-user]
[--dburl database-url]
[--property (name=value)[:name=value]*]
cluster-name

Description

The configure-jms-cluster configures the Message Queue cluster providing JMS services to a Eclipse GlassFish cluster.

This subcommand should be used before the Eclipse GlassFish cluster is started for the first time. Otherwise, follow the instructions in "Administering the Java Message Service (JMS)" in Eclipse GlassFish Administration Guide.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--clustertype

The type of Message Queue cluster to configure. The value conventional specifies a conventional cluster, and the value enhanced specifies an enhanced, high-availability cluster. For information about these cluster types of Message Queue clusters, see "Broker Clusters" in Open Message Queue Technical Overview.
The default value is conventional.
If enhanced is specified, the configstoretype and messagestoretype options are ignored.

--configstoretype

The type of data store for configuration data in a conventional cluster. The value masterbroker specifies the use of a master broker to store and manage the configuration data. The value shareddb specifies the use of a shared database to store the configuration data.
The default value is masterbroker.
This option is ignored if clustertype is set to enhanced.

--messagestoretype

The type of data store for message data in brokers in a conventional cluster. The value file specifies a file store. The value jdbc specifies a JDBC store.
The default value is file.
This option is ignored if clustertype is set to enhanced.

--dbvendor
--dbuser
--dburl

The database vendor, user, and access url of the JDBC database to use in any of these situations:

  • When clustertype is set to enhanced

  • When configstoretype is set to shareddb

  • When messagestoretype is set to jdbc

For information about supported vendors and the formats of access urls for each vendor, see "JDBC-Based Persistence" in Open Message Queue Administration Guide.

To specify the password of the JDBC database user, use the --passwordfile utility option of the asadmin(1M) command after adding the entry AS_ADMIN_JMSDBPASSWORD to the password file.

--property

A list of additional database-vendor-specific properties to configure the JDBC database for use by the Message Queue cluster. Specify properties as a colon (:) separated list of property names and values in the form:

prop1name=prop1value:prop2name=prop2value

Operands

cluster-name

The name of the Eclipse GlassFish cluster for which the Message Queue cluster is to provide JMS services.
Because Eclipse GlassFish uses the cluster name to uniquely identify database tables the Message Queue cluster might require, the length of the name is restricted in the following situations:

  • If clustertype is set to enhanced, the name can be no longer than n–21 characters, where n is the maximum table name length allowed by the database.

  • If configstoretype is set to shareddb, the name can be no longer than n–19 characters, where n is the maximum table name length allowed by the database.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

configure-lb-weight

Sets load balancing weights for clustered instances

Synopsis

asadmin [asadmin-options] configure-lb-weight [--help]
--cluster cluster_name
instance-name=weight[:instance-name=weight]

Description

The configure-lb-weight subcommand assigns weight to the server instances in a cluster. Weights can be used for HTTP, RMI/IIOP and JMS load balancing. For the HTTP load balancer, the weights are used only if the load balancer’s policy is set to weighted-round-robin. The load balancer policy is set in the create-http-lb-ref subcommand or set subcommand.

Use the weight to vary the load going to different instances in the cluster. For example, if an instance is on a machine with more capacity, give it a higher weight so that more requests are sent to that instance by the load balancer. The default weight is 100. If all instances have the default weight, the load balancer performs simple round robin load balancing.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--cluster

The name of the cluster.

Operands

instance-name=weight

The name of the instance and the weight you are assigning it. The weight must be an integer. The pairs of instances and weights are separated by colons. For example instance1=1:instance2=4 means that for every five requests, one goes to instance1 and four go to instance2. A weight of 1 is the default.

Examples

Example 1   Assigning Load Balancer Weights to Cluster Instances

The following subcommand assigns weights of 1, 1, and 2 to instances i1, i2, and i3 in the cluster1 cluster.

asadmin> configure-lb-weight --cluster cluster1 i1=1:i2=1:i3=2
Command configure-lb-weight executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

configure-ldap-for-admin

Configures the authentication realm named admin-realm for the given LDAP

Synopsis

asadmin [asadmin-options] configure-ldap-for-admin [--help]

Description

The configure-ldap-for-admin subcommand configures the authentication realm named admin-realm for the given LDAP. The configure-ldap-for-admin subcommand is interactive. The subcommand prompts the user for the basedn and ldap-group options.

This command is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Examples

Example 1    Configuring the LDAP Authentication Realm

asadmin> configure-ldap-for-admin
Enter the value for the basedn option>
Enter the value for the ldap-group option>
The LDAP Auth Realm admin-realm was configured correctly
in admin server's configuration.

Exit Status

0

command executed successfully

1

error in executing the command

configure-managed-jobs

Configures how long information about subcommands that were started using asadmin --detach or that contain progress information is kept

Synopsis

asadmin [asadmin-options] configure-managed-jobs [--help]
[--in-memory-retention-period in-memory-retention-period]
[--job-retention-period job-retention-period]
[--cleanup-initial-delay cleanup-initial-delay]
[--cleanup-poll-interval cleanup-poll-interval]

Description

The configure-managed-jobs subcommand configures how long information about subcommands (jobs) that were started using the asadmin utility option --detach or that contain progress information is kept. The --detach option detaches long-running subcommands and executes them in the background in detach mode. Job information includes subcommand progress and status.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--in-memory-retention-period

Specifies how long a completed job is kept in memory after the job is finished. The default value is 1 hour.

--job-retention-period

Specifies how long a job is stored. The default value is 24 hours.

--cleanup-initial-delay

After server startup, specifies the initial delay after which the cleanup service starts purging jobs. The default value is 5 minutes.

--cleanup-poll-interval

Specifies the time interval after which the cleanup service polls for expired jobs. The default value is 20 minutes.

Examples

Example 1   Configuring the Job Retention Period

This example sets the job retention period to 36 hours. Time periods can be specified in Hh|Mm|Ss for hours, minutes, or seconds.

asadmin> configure-managed-jobs --job-retention-period=36h
Command configure-managed-jobs executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

copy-config

Copies an existing named configuration to create another configuration

Synopsis

asadmin [asadmin-options] copy-config [--help]
[--systemproperties (name=value)[:name=value]*]
source-configuration-name destination-configuration-name

Description

The copy-config subcommand creates a named configuration in the configuration of the domain administration server (DAS) by copying an existing configuration. The new configuration is identical to the copied configuration, except for any properties that you specify in the --systemproperties option.

The default-config configuration is copied when a standalone sever instance or standalone cluster is created.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--systemproperties

Optional attribute name-value pairs for the configuration. These properties override port settings in the configuration.

The following properties are available:
ASADMIN_LISTENER_PORT

This property specifies the port number of the HTTP port or HTTPS port through which the DAS connects to the instance to manage the instance. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTP requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTPS requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_LISTENER_PORT

This property specifies the port number of the port that is used for IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used for secure IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_MUTUALAUTH_PORT

This property specifies the port number of the port that is used for secure IIOP connections with client authentication. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JAVA_DEBUGGER_PORT

This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMS_PROVIDER_PORT

This property specifies the port number for the Java Message Service provider. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMX_SYSTEM_CONNECTOR_PORT

This property specifies the port number on which the JMX connector listens. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

OSGI_SHELL_TELNET_PORT

This property specifies the port number of the port that is used for connections to the Apache Felix Remote Shell (http://felix.apache.org/site/apache-felix-remote-shell.html). This shell uses the Felix shell service to interact with the OSGi module management subsystem. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

Operands

source-configuration-name

The name of the configuration that you are copying.

destination-configuration-name

The name of the configuration that you are creating by copying the source configuration.

The name must meet the following requirements:
  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of a another named configuration, a cluster, a Eclipse GlassFish instance , or a node.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.

Examples

Example 1   Copying a Configuration

This example copies the default-config configuration to the pmdsaconfig configuration, overriding the settings for the following ports:

  • HTTP listener port

  • HTTPS listener port

asadmin> copy-config
--systemproperties HTTP_LISTENER_PORT=2000:HTTP_SSL_LISTENER_PORT=3000
default-config pmdsaconfig

Command copy-config executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-admin-object

Adds the administered object with the specified JNDI name for a resource adapter

Synopsis

asadmin [asadmin-options] create-admin-object [--help]
[--target target]
--restype restype
[--classname classname]
--raname raname
[--enabled={true|false}]
[--description description]
[--property name=value[:name=value]*]
jndi_name

Description

The create-admin-object subcommand creates the administered object with the specified JNDI name and the interface definition for a resource adapter.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are creating the administered object. Valid values are as follows:

server

Creates the administered object for the default server instance server and is the default value.

configuration_name

Creates the administered object for the named configuration.

cluster_name

Creates the administered object for every server instance in the cluster.

instance_name

Creates the administered object for a particular server instance.

The resource is always created for the domain as a whole, but the resource-ref for the resource is only created for the specified --target. This means that although the resource is defined at the domain level, it is only available at the specified target level. Use the create-resource-ref subcommand to refer to the resource in multiple targets if needed.

--restype

Specifies the interface definition for the administered object. The resource type must be an interface definition that is specified in the ra.xml file of the resource adapter.

--classname

Specifies the class name of the administered object. Required if multiple administered objects use the same interface definition.

--raname

Specifies the name of the resource adapter associated with this administered object.

--enabled

Specifies if this object is enabled. Default is true.

--description

Text string describing the administered object.

--property

Description of the name/values pairs for configuring the resource. Dependent on the resource adapter. For JMS properties, see create-jms-resource(1) for JMS destination resources.

Operands

jndi_name

JNDI name of the administered object to be created.

Examples

Example 1   Creating an Administered Object

In this example, jmsra is a system resource adapter with the admin object interfaces, jakarta.jms.Queue and jakarta.jms.Topic.

asadmin> create-admin-object --restype jakarta.jms.Queue
--raname jmsra --description "sample administered object"
--property Name=sample_jmsqueue jms/samplequeue
Command create-admin-object executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-application-ref

Creates a reference to an application

Synopsis

asadmin [asadmin-options] create-application-ref [--help]
[--target target]
[--virtualservers virtual_servers] [--enabled=true]
[--lbenabled=true] reference_name

Description

The create-application-ref subcommand creates a reference from a cluster or an unclustered server instance to a previously deployed application element (for example, a Jakarta EE application, a Web module, or an enterprise bean module). This effectively results in the application element being deployed and made available on 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 receive the new application element the next time they start.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target for which you are creating the application reference. Valid values are

  • server- Specifies the default server instance as the target for creating the application reference. server is the name of the default server instance and is the default value for this option.

  • cluster_name- Specifies a particular cluster as the target for creating the application reference.

  • instance_name- Specifies a particular stand-alone server instance as the target for creating the application reference.

--virtualservers

Specifies a comma-separated list of virtual server IDs on which to deploy. This option applies only to Web modules (either standalone or in a Jakarta EE application). If this option is not specified, the application is deployed to all virtual servers except the administrative server, __asadmin.

--enabled

Indicates whether the application should be enabled (that is, loaded). This value will take effect only if the application is enabled at the global level. The default is true.

--lbenabled

Controls whether the deployed application is available for load balancing. The default is true.

Operands

reference_name

The name of the application or module, which can be a Jakarta EE application, Web module, EJB module, connector module, application client module, or lifecycle module.
The name can include an optional version identifier, which follows the name and is separated from the name by a colon (:). The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash (-), and period (.) characters. If the --enabled option is set to false, you can create references to multiple disabled versions by using an asterisk (*) as a wildcard character. For more information about module and application versions, see " Module and Application Versions" in Eclipse GlassFish Application Deployment Guide.

Examples

Example 1   Creating an Application Reference

The following example creates a reference to the Web module MyWebApp on the unclustered server instance NewServer.

asadmin> create-application-ref --target NewServer MyWebApp
Command create-application-ref executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-audit-module

Adds an audit module

Synopsis

asadmin [asadmin-options] create-audit-module [--help]
--classname classname
[--property(name=value)[:name=value]*]
[--target target]
audit_module_name

Description

The create-audit-module subcommand adds the named audit module for the Java class that implements the audit capabilities. Audit modules collect and store information on incoming requests (from, for example, servlets and EJB components) and outgoing responses.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--classname

The name of the Java class that implements this audit module. If not specified, this option defaults to com.sun.enterprise.security.Audit.

--help
-?

Displays the help text for the subcommand.

--property

Optional keyword-value pairs that specify additional properties for the audit module.
Audit module properties that are defined by Eclipse GlassFish are as follows:

auditOn

If true, specifies that the audit module is loaded and called by the Eclipse GlassFish audit library at audit points.

Other available properties are determined by the implementation of the audit module.

--target

Specifies the target on which you are creating the audit module. Valid values are as follows:

server

Creates the audit module for the default server instance server and is the default value.

configuration_name

Creates the audit module for the named configuration.

cluster_name

Creates the audit module for every server instance in the cluster.

instance_name

Creates the audit module for a particular server instance.

Operands

audit_module_name

The name of this audit module.

Examples

Example 1   Creating an audit module

asadmin> create-audit-module
--classname com.sun.appserv.auditmodule
--property defaultuser=admin:Password=admin sampleAuditModule
Command create-audit-module executed successfully

Exit Status

0

command executed successfully

1

error in executing the command

create-auth-realm

Adds the named authentication realm

Synopsis

asadmin [asadmin-options] create-auth-realm [--help]
--classname realm_class [--property(name=value)[:name=value]*]
[--target target_name] auth_realm_name

Description

The create-auth-realm subcommand adds the named authentication realm.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are creating the realm. Valid values are

server

Creates the realm on the default server instance. This is the default value.

configuration_name

Creates the realm in the specified configuration.

cluster_name

Creates the realm on all server instances in the specified cluster.

instance_name

Creates the realm on a specified server instance.

--classname

Java class which implements this realm. These include com.sun.enterprise.security.auth.realm.file.FileRealm, com.sun.enterprise.security.auth.realm.certificate.CertificateRealm, com.sun.enterprise.security.ee.authentication.glassfish.jdbc.JDBCRealm, com.sun.enterprise.security.auth.realm.ldap.LDAPRealm, com.sun.enterprise.security.auth.realm.ldap.PamRealm, and com.sun.enterprise.security.auth.realm.solaris.SolarisRealm, or a custom realm.

--property

Optional attribute name-value pairs for configuring the authentication realm. Authentication realms require provider-specific properties, which vary based on implementation.
The following properties are common to all of the supported realms, which include FileRealm, CertificateRealm, JDBCRealm, LDAPRealm, PamRealm, and SolarisRealm.

jaas-context

Specifies the Java Authentication and Authorization Service (JAAS) context.

assign-groups

(Optional) If this property is set, its value is taken to be a comma-separated list of group names. All clients who present valid certificates are assigned membership to these groups for the purposes of authorization decisions in the web and EJB containers.

Specific to each realm, you can specify the following properties.

  • You can specify the following properties for FileRealm:

    file

    Specifies the file that stores user names, passwords, and group names. The default is domain-dir/config/keyfile.

  • You can specify the following properties for CertificateRealm:

    LoginModule

    Specifies the name of a JAAS LoginModule to use for performing authentication. To use a JAAS LoginModule, you must first create an implementation of the javax.security.auth.spi.LoginModule interface, and then plug the module into a jaas-context. For more information, see "Custom Authentication of Client Certificate in SSL Mutual Authentication" in Eclipse GlassFish Security Guide.

  • You can specify the following properties for JDBCRealm:

    datasource-jndi

    Specifies the jndi-name of the jdbc-resource for the database.

    user-table

    Specifies the name of the user table in the database.

    user-name-column

    Specifies the name of the user name column in the database’s user table.

    password-column

    Specifies the name of the password column in the database’s user table.

    group-table

    Specifies the name of the group table in the database.

    group-table

    Specify the group table for an authentication realm of class JDBCRealm.

    group-name-column

    Specifies the name of the group name column in the database’s group table.

    db-user

    (Optional) Allows you to specify the database user name in the realm instead of the jdbc-connection-pool. This prevents other applications from looking up the database, getting a connection, and browsing the user table. By default, the jdbc-connection-pool configuration is used.

    db-password

    (Optional) Allows you to specify the database password in the realm instead of the jdbc-connection-pool. This prevents other applications from looking up the database, getting a connection, and browsing the user table. By default, the jdbc-connection-pool configuration is used.

    group-table

    Specifies the name of the group table in the database.

    digest-algorithm

    (Optional) Specifies the digest algorithm. The default is SHA-256. You can use any algorithm supported in the JDK, or none.

    In versions of Eclipse GlassFish prior to 5.0, the default algorithm was MD5. If you have applications that depend on the MD5 algorithm, you can override the default SHA-25 algorithm by using the asadmin set subcommand:

    asadmin> set server.security-service.property.default-digest-algorithm=MD5

    You can use the asadmin get subcommand to determine what algorithm is currently being used:

    asadmin> get server.security-service.property.default-digest-algorithm

    Also note that, to maintain backward compatibility, if an upgrade is performed from Eclipse GlassFish v2.x or v3.0.x to Eclipse GlassFish 5.0, the default algorithm is automatically set to MD5 in cases where the digest algorithm had not been explicitly set in the older Eclipse GlassFish version.

    digestrealm-password-enc-algorithm

    (Optional) Specifies the algorithm for encrypting passwords stored in the database.

    It is a security risk not to specify a password encryption algorithm.

    encoding

    (Optional) Specifies the encoding. Allowed values are Hex and Base64. If digest-algorithm is specified, the default is Hex. If digest-algorithm is not specified, by default no encoding is specified.

    charset

    (Optional) Specifies the charset for the digest algorithm.

  • You can specify the following properties for LDAPRealm:

    directory

    Specifies the LDAP URL to your server.

    base-dn

    Specifies the LDAP base DN for the location of user data. This base DN can be at any level above the user data, since a tree scope search is performed. The smaller the search tree, the better the performance.

    search-filter

    (Optional) Specifies the search filter to use to find the user. The default is uid=%s (%s expands to the subject name).

    group-base-dn

    (Optional) Specifies the base DN for the location of groups data. By default, it is same as the base-dn, but it can be tuned, if necessary.

    group-search-filter

    (Optional) Specifies the search filter to find group memberships for the user. The default is uniquemember=%d (%d expands to the user elementDN).

    group-target

    (Optional) Specifies the LDAP attribute name that contains group name entries. The default is CN.

    search-bind-dn

    (Optional) Specifies an optional DN used to authenticate to the directory for performing the search-filter lookup. Only required for directories that do not allow anonymous search.

    search-bind-password

    (Optional) Specifies the LDAP password for the DN given in search-bind-dn.

Operands

auth_realm_name

A short name for the realm. This name is used to refer to the realm from, for example, web.xml.

Examples

Example 1   Creating a New Authentication Realm

This example creates a new file realm.

asadmin> create-auth-realm
--classname com.sun.enterprise.security.auth.realm.file.FileRealm
--property file=${com.sun.aas.instanceRoot}/config/
admin-keyfile:jaas-context=fileRealm file
Command create-auth-realm executed successfully

Where file is the authentication realm created.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-cluster

Creates a Eclipse GlassFish cluster

Synopsis

asadmin [asadmin-options] create-cluster [--help]
[--config config-name]
[--systemproperties (name=value)[:name=value]*]
[--properties (name=value)[:name=value]*]
[--gmsenabled={true|false}]
[--multicastport multicast-port]
[--multicastaddress multicast-address]
[--bindaddress bind-address]
[--hosts hadb-host-list]
[--haagentport port-number]
[--haadminpassword password]
[--haadminpasswordfile file-name] [--devicesize devicesize ]
[--haproperty (name=value)[:name=value]*]
[--autohadb=false] [--portbase port-number]
cluster-name

Description

The create-cluster subcommand creates a Eclipse GlassFish cluster. Initially the cluster contains no Eclipse GlassFish instances, applications, or resources.

A cluster requires a reference to the named configuration that defines the configuration of all instances that are added to the cluster. The configuration can be specified in the command to create the cluster, but is not required. If no configuration is specified, the subcommand creates a configuration that is named cluster-name`-config` for the cluster. The cluster that is created is a standalone cluster because the cluster’s configuration is not shared with any other clusters or standalone instances.

To add instances to the cluster, set the --cluster option to the name of the cluster when using either of the following subcommands:

To delete server instances from the cluster at any time, use one of the following subcommands:

To associate applications and resources with all instances in the cluster, set the --target option to the name of the cluster when performing the following operations:

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--config

Specifies the named configuration that the cluster references. The configuration must exist and must not be named default-config or server-config. Specifying the --config option creates a shared cluster. If this option is omitted, a standalone cluster is created.

--systemproperties

Defines system properties for the configuration that is created for the cluster. These properties override the property values in the default-config configuration. The following properties are available:

ASADMIN_LISTENER_PORT

This property specifies the port number of the HTTP port or HTTPS port through which the DAS connects to the instance to manage the instance. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTP requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTPS requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_LISTENER_PORT

This property specifies the port number of the port that is used for IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used for secure IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_MUTUALAUTH_PORT

This property specifies the port number of the port that is used for secure IIOP connections with client authentication. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JAVA_DEBUGGER_PORT

This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMS_PROVIDER_PORT

This property specifies the port number for the Java Message Service provider. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMX_SYSTEM_CONNECTOR_PORT

This property specifies the port number on which the JMX connector listens. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

OSGI_SHELL_TELNET_PORT

This property specifies the port number of the port that is used for connections to the Apache Felix Remote Shell (http://felix.apache.org/site/apache-felix-remote-shell.html). This shell uses the Felix shell service to interact with the OSGi module management subsystem. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

--properties

Defines properties for the cluster. The following properties are available:

GMS_DISCOVERY_URI_LIST

The locations of Eclipse GlassFish instances in the cluster to use for discovering the cluster. This property is required only if the Group Management Service (GMS) is not using multicast for broadcasting messages.
Valid values for this property are as follows:

  • A comma-separated list of uniform resource identifiers (URIs). Each URI must locate a Eclipse GlassFish instance or the DAS. This format is required if multiple Eclipse GlassFish instances are running on the same host.
    The format of each URI in the list is as follows:
    scheme://host-name-or -IP-address:port

    • scheme is the URI scheme, which is tcp.

    • host-name-or -IP-address is the host name or IP address of the host on which the instance is running.

    • port is the port number of the port on which the instance listens for messages from GMS. The system property GMS_LISTENER_PORT-clustername must be set for the instance. For information about how to set this system property for an instance, see "Discovering a Cluster When Multicast Transport Is Unavailable" in Eclipse GlassFish High Availability Administration Guide.

  • A comma-separated list of IP addresses or host names on which the DAS or the instances are running. The list can contain a mixture of IP addresses and host names. This format can be used only if one clustered instance is running on each host. The value of the GMS_LISTENER_PORT property must be unique for each cluster in a domain.

  • The keyword generate. This format can be used only if one instance in a cluster is running on each host and the DAS is running on a separate host. Multiple instances on the same host cannot be members of the same cluster. The value of the GMS_LISTENER_PORT property must be unique for each cluster in a domain.

GMS_LISTENER_PORT

The port number of the port on which the cluster listens for messages from GMS.
The default value is a reference to the GMS_LISTENER_PORT-cluster-name system property. By default, this system property is not set. In this situation, GMS selects a free port from the range that is defined by the properties GMS_TCPSTARTPORT and GMS_TCPENDPORT. By default, this range is 9090-9200. In most situations, the default behavior should suffice.
However, if GMS is not using multicast for broadcasting messages, the GMS_LISTENER_PORT property must specify a port number that is valid for all Eclipse GlassFish instances in the cluster. To use the default value to meet this requirement, use a system property to set the port number individually for each instance.
For example, use the create-system-properties subcommand to create the system property GMS_LISTENER_PORT-cluster-name for the DAS. Then, for each instance in the cluster, set the GMS_LISTENER_PORT-cluster-name system property to the port number on which the instance listens for messages from GMS. The default value of the GMS_LISTENER_PORT property for the cluster references this system property.

GMS_LOOPBACK

Specifies whether an instance may receive from itself application-level messages that the instance broadcasts to the cluster. Possible values are as follows:

  • false The instance may not receive messages from itself (default).

  • true The instance may receive messages from itself. Use this setting for testing an instance when the instance is the only instance in a cluster.

GMS_MULTICAST_TIME_TO_LIVE

The maximum number of iterations or transmissions that a multicast message for the following types of events can experience before the message is discarded:

  • Group discovery

  • Member heartbeats

  • Membership changes

    To match the configuration of the network on which the DAS and clustered instances are deployed, set this value as low as possible. To determine the lowest possible value for your system, use the validate-multicast(1) subcommand.

    • A value of 0 ensures that multicast messages never leave the host from which they are broadcast.

    • A value of 1 might prevent the broadcast of messages between hosts on same subnet that are connected by a switch or a router.

    • The default is 4, which ensures that messages are successfully broadcast to all cluster members in networks where hosts are connected by switches or routers.

GMS_TCPENDPORT

The highest port number in the range from which GMS selects a free port if the GMS_LISTENER_PORT-cluster-name system property is not set. The default is 9200.

GMS_TCPSTARTPORT

The lowest port number in the range from which GMS selects a free port if the GMS_LISTENER_PORT-cluster-name system property is not set. The default is 9090.

--gmsenabled

Specifies whether GMS is enabled for the cluster. Possible values are as follows:

true

GMS is enabled for the cluster (default). When GMS is enabled for a cluster, GMS is started in each server instance in the cluster and in the DAS. The DAS participates in each cluster for which this option is set to true.

false

GMS is disabled for the cluster.

--multicastaddress

The address on which GMS listens for group events. This option must specify a multicast address in the range 224.0.0.0 through 239.255.255.255. The default is 228.9.XX.YY, where XX and YY are automatically generated independent values between 0 and 255.

--multicastport

The port number of communication port on which GMS listens for group events. This option must specify a valid port number in the range 2048-49151. The default is an automatically generated value in this range.

--bindaddress

The Internet Protocol (IP) address of the network interface to which GMS binds. This option must specify the IP address of a local network interface. The default is all public network interface addresses.
On a multihome machine, this option configures the network interface that is used for the GMS. A multihome machine possesses two or more network interfaces.
To specify an address that is valid for all Eclipse GlassFish instances in the cluster, use a system property to set the address individually for each instance.
For example, use the create-system-properties subcommand to create the system property GMS-BIND-INTERFACE-ADDRESS-cluster-name. Then set the --bindaddress option of this subcommand to ${GMS-BIND-INTERFACE-ADDRESS-cluster-name`}` to specify the system property. Finally, for each instance in the cluster, set the GMS-BIND-INTERFACE-ADDRESS-cluster-name system property to the required network interface address on the instance’s machine.

--hosts

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--haagentport

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--haadminpassword

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--haadminpasswordfile

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--devicesize

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--haproperty

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--autohadb

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--portbase

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

cluster-name

The name of the cluster.
The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another cluster, a named configuration, a Eclipse GlassFish instance, or a node.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.
    If the configure-jms-cluster(1) subcommand is to be used to configure a Message Queue cluster to provide JMS services to the Eclipse GlassFish cluster, the length of the Eclipse GlassFish cluster name is might be restricted:

  • If clustertype is set to enhanced in the configure-jms-cluster(1) subcommand, the name can be no longer than n–21 characters, where n is the maximum table name length allowed by the database.

  • If configstoretype is set to shareddb in the configure-jms-cluster(1) subcommand, the name can be no longer than n–19 characters, where n is the maximum table name length allowed by the database.

Examples

Example 1   Creating a Cluster

This example creates a cluster that is named ltscluster for which port 1169 is to be used for secure IIOP connections. Because the --config option is not specified, the cluster references a copy of the named configuration default-config that is named ltscluster-config.

asadmin> create-cluster
--systemproperties IIOP_SSL_LISTENER_PORT=1169
ltscluster
Command create-cluster executed successfully.

Example 2   Creating a Cluster With a List of URIs for Discovering the

Cluster

This example creates a cluster that is named tcpcluster. In this example, GMS is not using multicast for broadcasting messages and multiple instances reside on the same host. Therefore, the GMS_DISCOVERY_URI_LIST property is set to the locations of the Eclipse GlassFish instances to use for discovering the cluster. These instances reside on the host whose IP address is 10.152.23.224 and listen for GMS events on ports 9090, 9091, and 9092.

To distinguish colon (:) characters in URIs from separators in a property list, colons in URIs are escaped with single quote characters (') and backslash (\) characters. For more information about escape characters in options for the asadmin utility, see the asadmin(1M) help page.

This example assumes that the port on which each instance listens for GMS messages is set independently for the instance through the GMS_LISTENER_PORT-tcpcluster system property. For information about how to set the port on which an instance listens for GMS messages, see "Discovering a Cluster When Multicast Transport Is Unavailable" in Eclipse GlassFish High Availability Administration Guide.

asadmin> create-cluster --properties GMS_DISCOVERY_URI_LIST=
tcp'\\:'//10.152.23.224'\\:'9090,
tcp'\\:'//10.152.23.224'\\:'9091,
tcp'\\:'//10.152.23.224'\\:'9092 tcpcluster
Command create-cluster executed successfully.

Example 3   Creating a Cluster With a List of IP Addresses for

Discovering the Cluster

This example creates a cluster that is named ipcluster. In this example, GMS is not using multicast for broadcasting messages and only one clustered instance resides on each host. Therefore, the GMS_DISCOVERY_URI_LIST property is set to the IP addresses of the hosts where instances to use for discovering the cluster are running. The cluster listens for messages from GMS on port 9090.

asadmin> create-cluster --properties 'GMS_DISCOVERY_URI_LIST=
10.152.23.225,10.152.23.226,10.152.23.227,10.152.23.228:
GMS_LISTENER_PORT=9090' ipcluster
Command create-cluster executed successfully.

Example 4   Creating a Cluster With a Generated List of Instances for

Discovering the Cluster

This example creates a cluster that is named gencluster. In this example, GMS is not using multicast for broadcasting messages, one instance in the cluster is running on each host and the DAS is running on a separate host. Therefore, the GMS_DISCOVERY_URI_LIST property is set to the keyword generate to generate a list of instances to use for discovering the cluster. The cluster listens for messages from GMS on port 9090.

asadmin> create-cluster --properties 'GMS_DISCOVERY_URI_LIST=generate:
GMS_LISTENER_PORT=9090' gencluster
Command create-cluster executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-connector-connection-pool

Adds a connection pool with the specified connection pool name

Synopsis

asadmin [asadmin-options] create-connector-connection-pool [--help]
[--target=target]
--raname raname
--connectiondefinition connectiondefinitionname
[--steadypoolsize steadypoolsize]
[--maxpoolsize maxpoolsize]
[--maxwait maxwait]
[--poolresize poolresize]
[--idletimeout idletimeout]
[--isconnectvalidatereq={false|true}]
[--failconnection={false|true}]
[--leaktimeout=timeout]
[--leakreclaim={false|true}]
[--creationretryattempts=attempts]
[--creationretryinterval=interval]
[--lazyconnectionenlistment={false|true}]
[--lazyconnectionassociation={false|true}]
[--associatewiththread={false|true}]
[--matchconnections={true|false}]
[--maxconnectionusagecount=count]
[--validateatmostonceperiod=interval]
[--transactionsupport transactionsupport]
[--descrip[tion description]
[--ping {false|true}]
[--pooling {true|false}]
[--property (name=value)[:name=value]*]
poolname

Description

The create-connector-connection-pool subcommand defines a pool of connections to an enterprise information system (EIS). The named pool can be referred to by multiple connector resources. Each defined pool is instantiated at server startup, and is populated when accessed for the first time. If two or more connector resources point to the same connector connection pool, they are using the same pool of connections at run time. There can be more than one pool for a connection definition in a single resource adapter.

A connector connection pool with authentication can be created either by using a --property option to specify user, password, or other connection information, or by specifying the connection information in the XML descriptor file.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--associatewiththread

Specifies whether a connection is associated with the thread to enable the thread to reuse the connection. If a connection is not associated with the thread, the thread must obtain a connection from the pool each time that the thread requires a connection. Possible values are as follows:

false

A connection is not associated with the thread (default).

true

A connection is associated with the thread.

--connectiondefinition

The name of the connection definition.

--creationretryattempts

Specifies the maximum number of times that the server retries to create a connection if the initial attempt fails.
Default value is 0, which specifies that the server does not retry to create the connection.

--creationretryinterval

Specifies the interval, in seconds, between successive attempts to create a connection.
If --creationretryattempts is 0, the --creationretryinterval option is ignored. Default value is 10.

--description

Text providing descriptive details about the connector connection pool.

--failconnection

If set to true, all connections in the pool are closed if a single validation check fails. This parameter is mandatory if the --isconnectvalidatereq option is set to true. Default value is false.

--idletimeout

The maximum time that a connection can remain idle in the pool. After this amount of time, the pool can close this connection. Default value is 300.

--isconnectvalidatereq

If the value is set to true, the connections will be checked to see if they are usable, before they are given out to the application. Default value is false.

--lazyconnectionenlistment

Specifies whether a resource to a transaction is enlisted only when a method actually uses the resource. Default value is false.

--lazyconnectionassociation

Specifies whether a physical connection should be associated with the logical connection only when the physical connection is used, and disassociated when the transaction is completed. Such association and dissociation enable the reuse of physical connections. Possible values are as follows:

false

A physical connection is associated with the logical connection even before the physical connection is used, and is not disassociated when the transaction is completed (default).

true

A physical connection is associated with the logical connection only when the physical connection is used, and disassociated when the transaction is completed. The --lazyconnectionenlistment option must also be set to true.

--leakreclaim

Specifies whether leaked connections are restored to the connection pool after leak connection tracing is complete. Possible values are as follows:

false

Leaked connections are not restored to the connection pool (default).

true

Leaked connections are restored to the connection pool.

--leaktimeout

Specifies the amount of time, in seconds, for which connection leaks in a connection pool are to be traced.
If connection leak tracing is enabled, you can use the Administration Console to enable monitoring of the JDBC connection pool to get statistics on the number of connection leaks. Default value is 0, which disables connection leak tracing.

--matchconnections

Specifies whether a connection that is selected from the pool should be matched with the resource adaptor. If all connections in the pool are identical, matching between connections and resource adapters is not required. Possible values are as follows:

true

A connection should be matched with the resource adaptor (default).

false

A connection should not be matched with the resource adaptor.

--maxconnectionusagecount

Specifies the maximum number of times that a connection can be reused.
When this limit is reached, the connection is closed. Default value is 0, which specifies no limit on the number of times that a connection can be reused.

--maxpoolsize

The maximum number of connections that can be created to satisfy client requests. Default value is 32.

--maxwait

The amount of time, in milliseconds, that a caller must wait before a connection is created, if a connection is not available. If set to 0, the caller is blocked indefinitely until a resource is available or until an error occurs. Default value is 60000.

--ping

A pool with this attribute set to true is contacted during creation (or reconfiguration) to identify and warn of any erroneous values for its attributes. Default value is false.

--pooling

When set to false, this attribute disables connection pooling. Default value is true.

--poolresize

Quantity by which the pool will scale up or scale down the number of connections. Scale up: When the pool has no free connections, pool will scale up by this quantity. Scale down: All the invalid and idle connections are removed, sometimes resulting in removing connections of quantity greater than this value. The number of connections that is specified by --steadypoolsize will be ensured. Possible values are from 0 to MAX_INTEGER. Default value is 2.

--property

Optional attribute name/value pairs for configuring the pool.

LazyConnectionEnlistment

Deprecated. Use the equivalent option. Default value is false.

LazyConnectionAssociation

Deprecated. Use the equivalent option. Default value is false.

AssociateWithThread

Deprecated. Use the equivalent option. Default value is false.

MatchConnections

Deprecated. Use the equivalent option. Default value is false.

--raname

The name of the resource adapter.

--steadypoolsize

The minimum and initial number of connections maintained in the pool. Default value is 8.

--target

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--transactionsupport

Indicates the level of transaction support that this pool will have. Possible values are XATransaction, LocalTransaction and NoTransaction. This attribute can have a value lower than or equal to but not higher than the resource adapter’s transaction support attribute. The resource adapter’s transaction support attribute has an order of values, where XATransaction is the highest, and NoTransaction the lowest.

--validateatmostonceperiod

Specifies the time interval in seconds between successive requests to validate a connection at most once. Setting this attribute to an appropriate value minimizes the number of validation requests by a connection. Default value is 0, which means that the attribute is not enabled.

Operands

poolname

The name of the connection pool to be created.

Examples

Example 1   Creating a Connector Connection Pool

This example creates a new connector connection pool named jms/qConnPool.

asadmin> create-connector-connection-pool --raname jmsra
--connectiondefinition jakarta.jms.QueueConnectionFactory --steadypoolsize 20
--maxpoolsize 100 --poolresize 2 --maxwait 60000 jms/qConnPool
Command create-connector-connection-pool executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-connector-resource

Registers the connector resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] create-connector-resource [--help]
--poolname connectorConnectionPoolName
[--enabled={true|false}]
[--description description]
[--objecttype ovjecttype]
[--property (name=value)[:name=value]*]
[--target target]
jndi_name

Description

The create-connector-resource subcommand registers the connector resource with the specified JNDI name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--poolname

The name of the connection pool. When two or more resource elements point to the same connection pool element, they use the same pool connections at runtime.

--enabled

This option determines whether the resource is enabled at runtime. The default value is true.

--objecttype

Defines the type of the connector resource. Default is user. Allowed values are:

system-all

A system resource for all server instances and the domain administration server (DAS).

system-admin

A system resource only for the DAS.

system-instance

A system resource for all server instances only.

user

A user resource.

--description

Text providing details about the connector resource.

--property

Optional attribute name value pairs for configuring the resource.

--target

This option specifies the ending location of the connector resources. Valid targets are:

server

Creates the connector resource in the default server instance. This is the default value.

domain

Creates the connector resource in the domain.

cluster_name

Creates the connector resource in every server instance in the cluster.

instance_name

Creates the connector resource in the specified server instance.

The resource is always created for the domain as a whole, but the resource-ref for the resource is only created for the specified --target. This means that although the resource is defined at the domain level, it is only available at the specified target level. Use the create-resource-ref subcommand to refer to the resource in multiple targets if needed.

Operands

jndi_name

The JNDI name of this connector resource.

Examples

Example 1   Creating a Connector Resource

This example creates a connector resource named jms/qConnFactory.

asadmin> create-connector-resource --poolname jms/qConnPool
--description "sample connector resource" jms/qConnFactory
Command create-connector-resource executed successfully

Example 2   Using the create-connector-resource subcommand

This example shows the usage of this subcommand.

asadmin> create-connector-resource --target server --poolname jms/qConnPool
--description "sample connector resource" jms/qConnFactory
Command create-connector-resource executed successfully

Where jms/qConnFactory is the sample connector resource that is created.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-connector-security-map

Creates a security map for the specified connector connection pool

Synopsis

asadmin [asadmin-options] create-connector-security-map [--help]
--poolname connector_connection_pool_name
[--principals principal-name1[,principal-name2]*]
[--usergroups user-group1[,user-group2]*]
[--mappedusername user-name]
[--target target]
mapname

Description

The create-connector-security-map subcommand creates a security map for the specified connector connection pool. If the security map is not present, a new one is created. This subcommand can also map the caller identity of the application (principal or user group) to a suitable enterprise information system (EIS) principal in container-managed authentication scenarios. The EIS is any system that holds the data of an organization. It can be a mainframe, a messaging system, a database system, or an application. One or more named security maps can be associated with a connector connection pool. The connector security map configuration supports the use of the wild card asterisk (*) to indicate all users or all user groups.

To specify the EIS password, you can add the AS_ADMIN_MAPPEDPASSWORD entry to the password file, then specify the file by using the --passwordfile asadmin utility option.

For this subcommand to succeed, you must have first created a connector connection pool using the create-connector-connection-pool subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--poolname

Specifies the name of the connector connection pool to which the security map belongs.

--principals

Specifies a list of backend EIS principals. More than one principal can be specified using a comma-separated list. Use either the --principals or --usergroups options, but not both in the same command.

--usergroups

Specifies a list of backend EIS user group. More than one user groups can be specified using a comma separated list. Use either the --principals or --usergroups options, but not both in the same command.

--mappedusername

Specifies the EIS username.

--target

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

mapname

The name of the security map to be created.

Examples

Example 1   Creating a Connector Security Map

This example creates securityMap1 for the existing connection pool named connector-pool1.

asadmin> create-connector-security-map --poolname connector-pool1
--principals principal1,principal2 --mappedusername backend-username securityMap1
Command create-connector-security-map executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-connector-work-security-map

Creates a work security map for the specified resource adapter

Synopsis

asadmin [asadmin-options] create-connector-work-security-map [--help]
--raname raname
[--principalsmap eis-principal1=principal_name1[, eis-principal2=principal_name2]*
|--groupsmap eis-group1=server-group1[, eis-group2=server-group2]*}
[--description description]
mapname

Description

The create-connector-work-security-map subcommand maps the caller identity of the work submitted by the resource adapter EIS principal or EIS user group to a suitable principal or user group in the Eclipse GlassFish security domain. One or more work security maps may be associated with a resource adapter. The connector work security map configuration supports the use of the wild card asterisk (*) to indicate all users or all user groups.

The enterprise information system (EIS) is any system that holds the data of an organization. It can be a mainframe, a messaging system, a database system, or an application.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--description

Text providing descriptive details about the connector work security map.

--groupsmap

Specifies a map of the backend EIS user group to the Eclipse GlassFish user group. Use a comma-separated list to specify more than one mapping. Use either the --principalsmap option or the --groupsmap option, but not both.

--principalsmap

Specifies a map of the backend EIS principal to the Eclipse GlassFish principal. Use a comma-separated list to specify more than one mapping. Use either the --principalsmap option or the --groupsmap option, but not both.

--raname

Indicates the connector module name, which is the name of the resource adapter.

Operands

mapname

The name of the work security map to be created.

Examples

Example 1   Creating a Connector Work Security Map (Principal)

This example creates connector work security map workSecurityMap1 that maps the backend EIS principal to the Eclipse GlassFish principal.

asadmin create-connector-work-security-map --raname my-resource-adapter
--principalsmap eis-principal-1=server-principal-1,eis-principal-2
=server-principal-2,eis-principal-3=server-principal-1
workSecurityMap1
Command create-connector-work-security-map executed successfully.

Example 2   Creating a Connector Work Security Map (Group)

This example creates connector work security map workSecurityMap2 that maps the backend EIS user group to the Eclipse GlassFish user group.

asadmin create-connector-work-security-map --raname my-resource-adapter
--groupsmap eis-group-1=server-group-1,eis-group-2=server-group-2,
eis-group-3=server-group-1 workSecurityMap2
Command create-connector-work-security-map executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-context-service

Creates a context service resource

Synopsis

asadmin [asadmin-options] create-context-service [--help]
[--enabled={false|true}]
[--contextinfoenabled={false|true}]
[--contextinfo={Classloader|JNDI|Security|WorkArea}]]
[--description description]
[--property property]
[--target target]
jndi_name

Description

The create-context-service subcommand creates a context service resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--enabled

Determines whether the resource is enabled at runtime. The default value is true.

--contextinfoenabled

Determines whether container contexts are propagated to threads. If set to true, the contexts specified in the --contextinfo option are propagated. If set to false, no contexts are propagated and the --contextinfo option is ignored. The default value is true.

--contextinfo

Specifies individual container contexts to propagate to threads. Valid values are Classloader, JNDI, Security, and WorkArea. Values are specified in a comma-separated list and are case-insensitive. All contexts are propagated by default.

--description

Descriptive details about the resource.

--property

Optional attribute name/value pairs for configuring the resource.
Eclipse GlassFish does not define any additional properties for this resource. Moreover, this resource does not currently use any additional properties.

--target

Specifies the target for which you are creating the resource. Valid targets are:

server

Creates the resource for the default server instance. This is the default value.

domain

Creates the resource for the domain.

cluster_name

Creates the resource for every server instance in the specified cluster.

instance_name

Creates the resource for the specified server instance.

Operands

jndi_name

The JNDI name of this resource.

Examples

Example 1   Creating a Context Service Resource

This example creates a context service resource named concurrent/myContextService.

asadmin> create-context-service concurrent/myContextService
Context service concurrent/myContextService created successfully.
Command create-context-service executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-custom-resource

Creates a custom resource

Synopsis

asadmin [asadmin-options] create-custom-resource [--help]
--restype type --factoryclass classname
[--enabled={true|false}] [--description text]
[--property (name=value)[:name=value]*] jndi-name
[--target target]

Description

The create-custom-resource subcommand creates a custom resource. A custom resource specifies a custom server-wide resource object factory that implements the javax.naming.spi.ObjectFactory interface.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

The target on which the custom resource you are creating will be available. Valid values are:

server

The resource will be available on the default server instance and all domains hosted on the instance. This is the default value.

domain

The resource will be available on the specified domain only.

cluster_name

The resource will be available on every server instance in the cluster.

instance_name

The resource will be available on the specified server instance only.

The resource is always created for the domain as a whole, but the resource-ref for the resource is only created for the specified --target. This means that although the resource is defined at the domain level, it is only available at the specified target level. Use the create-resource-ref subcommand to refer to the resource in multiple targets if needed.

--restype

The type of custom resource to be created. Specify a fully qualified type definition, for example javax.naming.spi.ObjectFactory. The resource type definition follows the format, xxx`.`xxx.

--factoryclass

Factory class name for the custom resource. This class implements the javax.naming.spi.ObjectFactory interface.

--enabled

Determines whether the custom resource is enable at runtime. Default is true.

--description

Text providing details about the custom resource. This description is a string value and can include a maximum of 250 characters.

--property

Optional attribute name/value pairs for configuring the resource.

Operands

jndi-name

The JNDI name of this resource.

Examples

Example 1   Creating a Custom Resource

This example creates a custom resource.

asadmin> create-custom-resource --restype topic
--factoryclass com.imq.topic mycustomresource
Command create-custom-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-domain

Creates a domain

Synopsis

asadmin [asadmin-options] create-domain [--help]
[--adminport adminport]
[--instanceport instanceport]
[--portbase portbase]
[--profile profile-name]
[--template template-name]
[--domaindir domaindir]
[--savemasterpassword={false|true}]
[--usemasterpassword={false|true}]
[--domainproperties (name=value)[:name=value]*]
[--keytooloptions (name=value)[:name=value]*]
[--savelogin={false|true}]
[--checkports={true|false}]
[--nopassword={false|true}]
domain-name

Description

The create-domain subcommand creates a Eclipse GlassFish domain. A domain in Eclipse GlassFish is an administrative namespace that complies with the Java Platform, Enterprise Edition (Jakarta EE) standard. Every domain has a configuration, which is stored in a set of files. Any number of domains, each of which has a distinct administrative identity, can be created in a given installation of Eclipse GlassFish. A domain can exist independently of other domains.

Any user who has access to the asadmin utility on a given system can create a domain and store its configuration in a folder of the user’s choosing. By default, the domain configuration is created in the default directory for domains. You can override this location to store the configuration elsewhere.

If domain customizers are found in JAR files in the as-install/modules directory when the create-domain subcommand is run, the customizers are processed. A domain customizer is a class that implements the DomainInitializer interface.

The create-domain subcommand creates a domain with a single administrative user specified by the asadmin utility option --user. If the --user option is not specified, and the --nopassword option is set to true, the default administrative user, admin, is used. If the --nopassword option is set to false (the default), a username is required. In this case, if you have not specified the user name by using the --user option, you are prompted to do so.

You choose an appropriate profile for the domain, depending on the applications that you want to run on your new domain. You can choose the developer, cluster, or enterprise profile for the domain you create.

This subcommand is supported in local mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--adminport

The HTTP port or the HTTPS port for administration. This port is the port in the URL that you specify in your web browser to manage the domain, for example, http://localhost:4949. The --adminport option cannot be used with the --portbase option. The default value is 4848.
The --adminport option overrides the domain.adminPort property of the --domainproperties option.

--instanceport

The domain provides services so that applications can run when deployed. This HTTP port specifies where the web application context roots are available for a web browser to connect to. This port is a positive integer and must be available at the time of domain creation. The --instanceport option cannot be used with the --portbase option. The default value is 8080.
The --instanceport option overrides the domain.instancePort property of the --domainproperties option.

--portbase

Determines the number with which port assignments should start. A domain uses a certain number of ports that are statically assigned. The portbase value determines where the assignment should start. The values for the ports are calculated as follows:

  • Administration port: portbase + 48

  • HTTP listener port: portbase + 80

  • HTTPS listener port: portbase + 81

  • JMS port: portbase + 76

  • IIOP listener port: portbase + 37

  • Secure IIOP listener port: portbase + 38

  • Secure IIOP with mutual authentication port: portbase + 39

  • JMX port: portbase + 86

  • JPDA debugger port: portbase + 9

  • Felix shell service port for OSGi module management: portbase + 66

When the --portbase option is specified, the output of this subcommand includes a complete list of used ports.
The --portbase option cannot be used with the --adminport, --instanceport, or the --domainproperties option.

--profile

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--template

The file name, including a relative or absolute path, of a domain configuration template to use for creating the domain. If a relative path is specified, the subcommand appends the path to the as-install/lib/templates directory to locate the file. If it is an absolute pathname, the subcommand locates the file in the specified path.
This option enables domains of different types to be created and custom domain templates to be defined.

--domaindir

The directory where the domain is to be created. If specified, the path must be accessible in the filesystem. If not specified, the domain is created in the default domain directory, as-install/domains.

--savemasterpassword

Setting this option to true allows the master password to be written to the file system. If this option is true, the --usemasterpassword option is also true, regardless of the value that is specified on the command line. The default value is false.
A master password is really a password for the secure key store. A domain is designed to keep its own certificate (created at the time of domain creation) in a safe place in the configuration location. This certificate is called the domain’s SSL server certificate. When the domain is contacted by a web browser over a secure channel (HTTPS), this certificate is presented by the domain. The master password is supposed to protect the store (a file) that contains this certificate. This file is called keystore.jks and is created in the configuration directory of the domain created. If however, this option is chosen, the master password is saved on the disk in the domain’s configuration location. The master password is stored in a file called master-password, which is a Java JCEKS type keystore. The reason for using the --savemasterpassword option is for unattended system boots. In this case, the master password is not prompted for when the domain starts because the password will be extracted from this file.
It is best to create a master password when creating a domain, because the master password is used by the start-domain subcommand. For security purposes, the default setting should be false, because saving the master password on the disk is an insecure practice, unless file system permissions are properly set. If the master password is saved, then start-domain does not prompt for it. The master password gives an extra level of security to the environment.

--usemasterpassword

Specifies whether the key store is encrypted with a master password that is built into the system or a user-defined master password.
If false (default), the keystore is encrypted with a well-known password that is built into the system. Encrypting the keystore with a password that is built into the system provides no additional security.
If true, the subcommand obtains the master password from the AS_ADMIN_MASTERPASSWORD entry in the password file or prompts for the master password. The password file is specified in the --passwordfile option of the asadmin(1M)utility.
If the --savemasterpassword option is true, this option is also true, regardless of the value that is specified on the command line.

--domainproperties

Setting the optional name/value pairs overrides the default values for the properties of the domain to be created. The list must be separated by the colon (:) character. The --portbase options cannot be used with the --domainproperties option. The following properties are available:

domain.adminPort

This property specifies the port number of the HTTP port or the HTTPS port for administration. This port is the port in the URL that you specify in your web browser to manage the instance, for example, http://localhost:4949. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.
The domain.adminPort property is overridden by the --adminport option.

domain.instancePort

This property specifies the port number of the port that is used to listen for HTTP requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.
The domain.instancePort property is overridden by --instanceport option.

domain.jmxPort

This property specifies the port number on which the JMX connector listens. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

http.ssl.port

This property specifies the port number of the port that is used to listen for HTTPS requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

java.debugger.port

This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

jms.port

This property specifies the port number for the Java Message Service provider. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

orb.listener.port

This property specifies the port number of the port that is used for IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

orb.mutualauth.port

This property specifies the port number of the port that is used for secure IIOP connections with client authentication. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

orb.ssl.port

This property specifies the port number of the port that is used for secure IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

osgi.shell.telnet.port

This property specifies the port number of the port that is used for connections to the Apache Felix Remote Shell (http://felix.apache.org/site/apache-felix-remote-shell.html). This shell uses the Felix shell service to interact with the OSGi module management subsystem. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

--keytooloptions

Specifies an optional list of name-value pairs of keytool options for a self-signed server certificate. The certificate is generated during the creation of the domain. Each pair in the list must be separated by the colon (:) character.
Allowed options are as follows:

CN

Specifies the common name of the host that is to be used for the self-signed certificate. This option name is case insensitive.
By default, the name is the fully-qualified name of the host where the create-domain subcommand is run.

--savelogin

If set to true, this option saves the administration user name and password. Default value is false. The username and password are stored in the .asadminpass file in user’s home directory. A domain can only be created locally. Therefore, when using the --savelogin option, the host name saved in .asadminpass is always localhost. If the user has specified default administration port while creating the domain, there is no need to specify --user, --passwordfile, --host, or --port on any of the subsequent asadmin remote commands. These values will be obtained automatically.

When the same user creates multiple domains that have the same administration port number on the same or different host (where the home directory is NFS mounted), the subcommand does not ask if the password should be overwritten. The password will always be overwritten.

--checkports

Specifies whether to check for the availability of the administration, HTTP, JMS, JMX, and IIOP ports. The default value is true.

--nopassword

Specifies whether the administrative user will have a password. If false (the default), the password is specified by the AS_ADMIN_PASSWORD entry in the asadmin password file (set by using the --passwordfile option). If false and the AS_ADMIN_PASSWORD is not set, you are prompted for the password.
If true, the administrative user is created without a password. If a user name for the domain is not specified by using the --user option, and the --nopassword option is set to true, the default user name, admin, is used.

Operands

domain-name

The name of the domain to be created. The name may contain only ASCII characters and must be a valid directory name for the operating system on the host where the domain is created.

Examples

Example 1   Creating a Domain

This example creates a domain named domain4.

asadmin>create-domain --adminport 4848 domain4
Enter admin user name [Enter to accept default "admin" / no password]>
Using port 4848 for Admin.
Using default port 8080 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=sr1-usca-22,OU=GlassFish,O=Oracle Corp.,L=Redwood Shores,ST=California,C=US]
No domain initializers found, bypassing customization step
Domain domain4 created.
Domain domain4 admin port is 4848.
Domain domain4 allows admin login as user "admin" with no password.
Command create-domain executed successfully.

Example 2   Creating a Domain in an Alternate Directory

This example creates a domain named sampleDomain in the /home/someuser/domains directory.

asadmin> create-domain --domaindir /home/someuser/domains --adminport 7070
--instanceport 7071 sampleDomain
Enter admin user name [Enter to accept default "admin" / no password]>
Using port 7070 for Admin.
Using port 7071 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Enterprise ServiceDistinguished Name of the self-signed X.509 Server Certificate is:
[CN=sr1-usca-22,OU=GlassFish,O=Oracle Corp.,L=Redwood Shores,ST=California,C=US]
No domain initializers found, bypassing customization step
Domain sampleDomain created.
Domain sampleDomain admin port is 7070.
Domain sampleDomain allows admin login as user "admin" with no password.
Command create-domain executed successfully.

Example 3   Creating a Domain and Saving the Administration User Name and Password

This example creates a domain named myDomain and saves the administration username and password.

asadmin> create-domain --adminport 8282 --savelogin=true myDomain
Enter the admin password [Enter to accept default of no password]>
Enter the master password [Enter to accept default password "changeit"]>
Using port 8282 for Admin.
Using default port 8080 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Enterprise ServiceDistinguished Name of the self-signed X.509 Server Certificate is:
[CN=sr1-usca-22,OU=GlassFish,O=Oracle Corp.,L=Redwood Shores,ST=California,C=US]
No domain initializers found, bypassing customization step
Domain myDomain created.
Domain myDomain admin port is 8282.
Domain myDomain allows admin login as user "admin" with no password.
Login information relevant to admin user name [admin]
for this domain [myDomain] stored at
[/home/someuser/.asadminpass] successfully.
Make sure that this file remains protected.
Information stored in this file will be used by
asadmin commands to manage this domain.
Command create-domain executed successfully.

Example 4   Creating a Domain and Designating the Certificate Host

This example creates a domain named domain5. The common name of the host that is to be used for the self-signed certificate is trio.

asadmin> create-domain --adminport 9898 --keytooloptions CN=trio domain5
Enter the admin password [Enter to accept default of no password]>
Enter the master password [Enter to accept default password "changeit"]>
Using port 9898 for Admin.
Using default port 8080 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=trio,OU=GlassFish,O=Oracle Corp.,L=Redwood Shores,ST=California,C=US]
No domain initializers found, bypassing customization step
Domain domain5 created.
Domain domain5 admin port is 9898.
Domain domain5 allows admin login as user "admin" with no password.
Command create-domain executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-file-user

Creates a new file user

Synopsis

asadmin [asadmin-options] create-file-user [--help]
[--authrealmnameauth_realm_name]
[--target target
[--groups user_groups[:user_groups]*] user_name

Description

The create-file-user subcommand creates an entry in the keyfile with the specified username, password, and groups. Multiple groups can be created by separating them with a colon (:). If auth_realm_name is not specified, an entry is created in the keyfile for the default realm. If auth_realm_name is specified, an entry is created in the keyfile using the auth_realm_name.

You can use the --passwordfile option of the asadmin(1M) command to specify the password for the user. The password file entry must be of the form `AS_ADMIN_USERPASSWORD=`user-password.

If a password is not provided, this subcommand fails if secure administration is enabled and the user being created is an administrative user.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This is the name of the target on which the command operates. The valid targets are config, instance, cluster, or server. By default, the target is the server.

--groups

This is the group associated with this file user.

--authrealmname

The name of the realm in which the new user is created. If you do not specify this option, the user is created in the "file" realm.

Operands

user_name

This is the name of file user to be created.

Examples

Example 1   Creating a User in the File Realm

This example creates a file realm user named sample_user. It is assumed that an authentication realm has already been created using the create-auth-realm subcommand.

asadmin> create-file-user
--groups staff:manager
--authrealmname auth-realm1 sample_user
Command create-file-user executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-http

Sets HTTP parameters for a protocol

Synopsis

asadmin [asadmin-options] create-http [--help]
--default-virtual-server virtual-server
[--request-timeout-seconds timeout]
[--timeout-seconds timeout]
[--max-connection max-keepalive]
[--dns-lookup-enabled={false|true}]
[--servername server-name]
[--target target]
protocol-name

Description

The create-http subcommand creates a set of HTTP parameters for a protocol, which in turn configures one or more network listeners. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--default-virtual-server

The ID attribute of the default virtual server for the associated network listeners.

--request-timeout-seconds

The time in seconds at which the request times out. If you do not set this option, the request times out in 30 seconds.

--timeout-seconds

The maximum time in seconds for which a keep alive connection is kept open. A value of 0 or less means keep alive connections are kept open indefinitely. The default is 30.

--max-connection

The maximum number of HTTP requests that can be pipelined until the connection is closed by the server. Set this property to 1 to disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining. The default is 256.

--dns-lookup-enabled

If set to true, looks up the DNS entry for the client. The default is false.

--servername

Tells the server what to put in the host name section of any URLs it sends to the client. This affects URLs the server automatically generates; it doesn’t affect the URLs for directories and files stored in the server. This name should be the alias name if your server uses an alias. If a colon and port number are appended, that port will be used in URLs that the server sends to the client. If a scheme and :// are prepended, the scheme will be used in the URLs.

--target

Creates the set of HTTP parameters only on the specified target. Valid values are as follows:

server

Creates the set of HTTP parameters on the default server instance. This is the default value.

configuration-name

Creates the set of HTTP parameters in the specified configuration.

cluster-name

Creates the set of HTTP parameters on all server instances in the specified cluster.

standalone-instance-name

Creates the set of HTTP parameters on the specified standalone server instance.

Operands

protocol-name

The name of the protocol to which this HTTP parameter set applies.

Examples

Example 1   Using the create-http Subcommand

The following command creates an HTTP parameter set for the protocol named http-1:

asadmin> create-http --timeout-seconds 60 --default-virtual-server server http-1
Command create-http executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-http-health-checker

Creates a health-checker for a specified load balancer configuration

Synopsis

asadmin [asadmin-options] create-http-health-checker [--help]
[--url "/"]
[--interval 30] [--timeout 10]
[--config config_name] target

Description

The create-http-health-checker subcommand creates a health checker for a specified load balancer configuration. A health checker is unique for the combination of target and load balancer configuration.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--url

The URL to ping to determine whether the instance is healthy.

--interval

The interval in seconds the health checker waits between checks of an unhealthy instance to see whether it has become healthy. The default value is 30 seconds. A value of 0 disables the health checker.

--timeout

The interval in seconds the health checker waits to receive a response from an instance. If the health checker has not received a response in this interval, the instance is considered unhealthy.

--config

The load balancer configuration for which you create the health-checker. If you do not specify a configuration, the subcommand creates a health checker for every load balancer configuration associated with the target. If no configuration references the target, the subcommand fails.

Operands

target

Specifies the target to which the health checker applies.
Valid values are:

  • cluster_name- The name of a target cluster.

  • instance_name- The name of a target server instance.

Examples

Example 1   Creating a Health Checker for a Load Balancer Configuration

This example creates a health checker for a load balancer configuration named mycluster-http-lb-config on a cluster named mycluster.

asadmin> create-http-health-checker --config mycluster-http-lb-config mycluster

Command create-http-health-checker executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-http-lb

Creates a load balancer

Synopsis

asadmin [asadmin-options] create-http-lb [--help]
--devicehost device_host_or_IP_address --deviceport device_port
[--sslproxyhost proxy_host]
[--sslproxyport proxy_port] [--target target] [--lbpolicy lbpolicy] [--lbpolicymodule lb_policy_module] [--healthcheckerurl url]
[--healthcheckerinterval 10] [--healthcheckertimeout 10]
[--lbenableallinstances=true] [--lbenableallapplications=true] [--lbweight instance=weight[:instance=weight]*] [--responsetimeout 60] [--httpsrouting=false] [--reloadinterval60][--monitor=false][--routecookie=true]
[--property (name=value)[:name=value]*
] load_balancer_name

Description

Use the create-http-lb subcommand to create a load balancer, including the load balancer configuration, target reference, and health checker. A load balancer is a representation of the actual load balancer device, defined by its device host and port information. Once you’ve created the load balancer, you can automatically apply changes made to the load balancer configuration without running export-http-lb-config and manually copying the generated load balancer configuration file to the web server instance.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--devicehost

The device host or the IP address of the load balancing device. This host or IP is where the physical load balancer will reside.

--deviceport

The port used to communicate with the load balancing device. It must be SSL enabled.

--sslproxyhost

The proxy host used for outbound HTTP.

--sslproxyport

The proxy port used for outbound HTTP.

--target

Specifies the target to which the load balancer applies.
Valid values are:

  • cluster_name - Specifies that requests for this cluster will be handled by the load balancer.

  • stand-alone_instance_name - Specifies that requests for this stand-alone instance will be handled by the load balancer.

--lbpolicy

The policy the load balancer follows to distribute load to the server instances in a cluster. Valid values are round-robin, weighted-round-robin, and user-defined. If you choose user-defined, specify a load balancer policy module with the lbpolicymodule option. If you choose weighted-round-robin, assign weights to the server instances using the configure-lb-weight subcommand. The default is round-robin.

--lbpolicymodule

If your target is a cluster and the load balancer policy is user-defined, use this option to specify the full path and name of the shared library of your load balancing policy module. The shared library needs to be in a location accessible by the web server.

--healthcheckerurl

The URL to ping to determine whether the instance is healthy.

--healthcheckerinterval

The interval in seconds the health checker waits between checks of an unhealthy instance to see whether it has become healthy. The default value is 10 seconds. A value of 0 disables the health checker.

--healthcheckertimeout

The interval in seconds the health checker waits to receive a response from an instance. If the health checker has not received a response in this interval, the instance is considered unhealthy. The default value is 10 seconds.

--lbenableallinstances

Enables all instances in the target cluster for load balancing. If the target is a server instance, enables that instance for load balancing.

--lbenableallapplications

Enables all applications deployed to the target cluster or instance for load balancing.

--lbweight

The name of the instance and the weight you are assigning it. The weight must be an integer. The pairs of instances and weights are separated by colons. For example instance1=1:instance2=4 means that for every five requests, one goes to instance1 and four go to instance2. A weight of 1 is the default.

--responsetimeout

The time in seconds within which a server instance must return a response. If no response is received within the time period, the server is considered unhealthy. If set to a positive number, and the request is idempotent, the request is retried. If the request is not idempotent, an error page is returned. If set to 0 no timeout is used. The default is 60.

--httpsrouting

If set to true, HTTPS requests to the load balancer result in HTTPS requests to the server instance. If set to false, HTTPS requests to the load balancer result in HTTP requests to the server instance. The default is false.

--reloadinterval

The time, in seconds, that the load balancer takes to check for an updated configuration. When detected, the configuration file is reloaded. The default value is 60 seconds. A value of 0 disables reloading.

--monitor

If set to true, monitoring of the load balancer is switched on. The default value is false.

--routecookie

This option is deprecated. The value is always true.

--property

Optional attribute name/value pairs for configuring the load balancer.

Operands

lb_name

The name of the new load balancer. This name must not conflict with any other load balancers in the domain.

Examples

Example 1   Creating a Load Balancer

This example creates a load balancer named mylb.

asadmin> create-http-lb
--devicehost host1 --deviceport 5555 mylb

Command create-http-lb executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-http-lb-config

Creates a configuration for the load balancer

Synopsis

asadmin [asadmin-options] create-http-lb-config [--help]
[--responsetimeout 60]
[httpsrouting=false] [--reloadinterval 60]
[--monitor=false] [--property (name=value)[:name=value]*]
--target target | config_name

Description

Use the create-http-lb-config subcommand to create a load balancer configuration. This configuration applies to load balancing in the HTTP path. After using this subcommand to create the load balancer configuration file, create the load balancer by running create-http-lb.

You must specify either a target or a configuration name, or both. If you do not specify a target, the configuration is created without a target and you add one later using create-http-lb-ref. If you don’t specify a configuration name, a name is created based on the target name. If you specify both, the configuration is created with the specified name, referencing the specified target.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--responsetimeout

The time in seconds within which a server instance must return a response. If no response is received within the time period, the server is considered unhealthy. If set to a positive number, and the request is idempotent, the request is retried. If the request is not idempotent, an error page is returned. If set to 0 no timeout is used. The default is 60.

--httpsrouting

If set to true, HTTPS requests to the load balancer result in HTTPS requests to the server instance. If set to false, HTTPS requests to the load balancer result in HTTP requests to the server instance. The default is false.

--reloadinterval

The interval between checks for changes to the load balancer configuration file loadbalancer.xml. When the check detects changes, the configuration file is reloaded. A value of 0 disables reloading.

--monitor

Specifies whether monitoring is enabled. The default is false.

--routecookie

This option is deprecated. The value is always true.

--property

Optional attribute name/value pairs for configuring the load balancer.

--target

Specifies the target to which the load balancer configuration applies. If you don’t specify a target, the load balancer configuration is created without a target. You can specify targets later using the subcommand create-http-lb-ref.
Valid values are:

  • cluster_name- Specifies that requests for this cluster will be handled by the load balancer.

  • stand-alone_instance_name- Specifies that requests for this standalone instance will be handled by the load balancer.

Operands

config_name

The name of the new load balancer configuration. This name must not conflict with any other load balancer groups, agents, configurations, clusters, or sever instances in the domain. If you don’t specify a name, the load balancer configuration name is based on the target name, target_name`-http-lb-config`.

Examples

Example 1   Creating a Load Balancer Configuration

This example creates a load balancer configuration on a target named mycluster and load balancer configuration named mylbconfigname.

asadmin> create-http-lb-config --target mycluster mylbconfigname

Command create-http-lb-config executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-http-lb-ref

Adds an existing cluster or server instance to an existing load balancer configuration or load balancer

Synopsis

asadmin [asadmin-options] create-http-lb-ref [--help]
--config config_name | --lbname load_balancer_name
[--lbpolicy round-robin] [--lbpolicymodule lb_policy_module]
[--healthcheckerurl url] [--healthcheckerinterval 10]
[--healthcheckertimeout 10] [--lbenableallinstances=true]
[--lbenableallapplications=true] [--lbweight instance=weight[:instance=weight]*]
target

Description

Use the create-http-lb-ref subcommand to:

  • Add an existing cluster or server instance to an existing load balancer configuration or load balancer. The load balancer forwards the requests to the clustered and standalone instances it references.

  • Set the load balancing policy to round-robin, weighted round-robin, or to a user-defined policy.

  • Configure a health checker for the load balancer. Any health checker settings defined here apply only to the target. If you do not create a health checker with this subcommand, use create-http-health-checker.

  • Enable all instances in the target cluster for load balancing, or use enable-http-lb-server to enable them individually.

  • Enable all applications deployed to the target for load balancing, or use enable-http-lb-application to enable them individually.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--config

Specifies which load balancer configuration to which to add clusters and server instances. Specify either a load balancer configuration or a load balancer. Specifying both results in an error.

--lbname

Specifies the load balancer to which to add clusters and server instances. Specify either a load balancer configuration or a load balancer. Specifying both results in an error.

--lbpolicy

The policy the load balancer follows. Valid values are round-robin, weighted-round-robin, and user-defined. If you choose user-defined, specify a load balancer policy module with the lbpolicymodule option. If you choose weighted-round-robin assign weights to the server instances using the configure-lb-weight subcommand. The default is round-robin.

--lbpolicymodule

If your load balancer policy is user-defined, use this option to specify the full path and name of the shared library of your load balancing policy module. The shared library needs to be in a location accessible by the web server.

--healthcheckerurl

The URL to ping to determine whether the instance is healthy.

--healthcheckerinterval

The interval in seconds the health checker waits between checks of an unhealthy instance to see whether it has become healthy. The default value is 30 seconds. A value of 0 disables the health checker.

--healthcheckertimeout

The interval in seconds the health checker waits to receive a response from an instance. If the health checker has not received a response in this interval, the instance is considered unhealthy. The default is 10.

--lbenableallinstances

Enables all instances in the target cluster for load balancing. If the target is a server instance, enables that instance for load balancing. The default value is true.

--lbenableallapplications

Enables all applications deployed to the target cluster or instance for load balancing. The default value is true.

--lbweight

The name of the instance and the weight you are assigning it. The weight must be an integer. The pairs of instances and weights are separated by colons. For example instance1=1:instance2=4 means that for every five requests, one goes to instance1 and four go to instance2. A weight of 1 is the default.

Operands

target

Specifies which cluster or instance to add to the load balancer. Valid values are:

  • cluster_name- Specifies that requests for this cluster will be handled by the load balancer.

  • stand-alone_instance_name- Specifies that requests for this standalone instance will be handled by the load balancer.

Examples

Example 1   Adding a Cluster Reference to a Load Balancer Configuration

This example adds a reference to a cluster named cluster2 to a load balancer configuration named mylbconfig.

asadmin> create-http-lb-ref --config mylbconfig cluster2

Command create-http-lb-ref executed successfully.

Example 2   Adding a Cluster Reference to a Load Balancer

This example adds a reference to a cluster named cluster2 to a load balancer named mylb.

asadmin> create-http-lb-ref --lbname mylb cluster2

Command create-http-lb-ref executed successfully.

Example 3   Configuring a Health Checker and Load Balancer Policy

This example configures a health checker and load balancing policy, and enables the load balancer for instances and applications.

asadmin> create-http-lb-ref --config mylbconfig --lbpolicy weighted-round-robin
--healthcheckerinterval 40 --healthcheckertimeout 20
--lbenableallinstances=true --lbenableallapplications=true cluster2

Command create-http-lb-ref executed successfully.

Example 4   Setting a User-Defined Load Balancing Policy

This example sets a user-defined load balancing policy.

asadmin> create-http-lb-ref --lbpolicy user-defined --lbpolicymodule /user/modules/module.so
--config mylbconfig cluster2

Command create-http-lb-ref executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-http-listener

Adds a new HTTP network listener socket

Synopsis

asadmin [asadmin-options] create-http-listener [--help]
--listeneraddress address
--listenerport listener-port
{--default-virtual-server | --defaultvs} virtual-server
[--servername server-name]
[--acceptorthreads acceptor-threads]
[--xpowered={true|false}]
[--redirectport redirect-port]
[--securityenabled={false|true}]
[--enabled={true|false}]
[--target target]
listener-id

Description

The create-http-listener subcommand creates an HTTP network listener. This subcommand is supported in remote mode only.

If you edit the special HTTP network listener named admin-listener, you must restart the server for the changes to take effect. The Administration Console does not tell you that a restart is required in this case.

This subcommand is provided for backward compatibility and as a shortcut for creating network listeners that use the HTTP protocol. Behind the scenes, this subcommand creates a network listener and its associated protocol, transport, and HTTP configuration.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--listeneraddress

The IP address or the hostname (resolvable by DNS).

--listenerport

The port number to create the listen socket on. Legal values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges. Configuring an SSL listen socket to listen on port 443 is recommended.

--default-virtual-server
--defaultvs

The ID attribute of the default virtual server for this listener. The --defaultvs option is deprecated.

--servername

Tells the server what to put in the host name section of any URLs it sends to the client. This affects URLs the server automatically generates; it doesn’t affect the URLs for directories and files stored in the server. This name should be the alias name if your server uses an alias. If a colon and port number are appended, that port will be used in URLs that the server sends to the client. If a scheme and :// are prepended, the scheme will be used in the URLs.

--acceptorthreads

The number of acceptor threads for the listener socket. The recommended value is the number of processors in the machine. The default value is 1.

--xpowered

If set to true, adds the X-Powered-By: Servlet/3.0 and X-Powered-By: JSP/2.0 headers to the appropriate responses. The Servlet 3.0 specification defines the X-Powered-By: Servlet/3.0 header, which containers may add to servlet-generated responses. Similarly, the JSP 2.0 specification defines the X-Powered-By: JSP/2.0 header, which containers may add to responses that use JSP technology. The goal of these headers is to aid in gathering statistical data about the use of Servlet and JSP technology. The default value is true.

--redirectport

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--securityenabled

If set to true, the HTTP listener runs SSL. You can turn SSL2 or SSL3 ON or OFF and set ciphers using an SSL element. The security setting globally enables or disables SSL by making certificates available to the server instance. The default value is false.

--enabled

If set to true, the listener is enabled at runtime. The default value is true.

--target

Creates the HTTP listener only on the specified target. Valid values are as follows:

server

Creates the HTTP listener on the default server instance. This is the default value.

configuration-name

Creates the HTTP listener in the specified configuration.

cluster-name

Creates the HTTP listener on all server instances in the specified cluster.

standalone-instance-name

Creates the HTTP listener on the specified standalone server instance.

Operands

listener-id

The listener ID of the HTTP network listener.

Examples

Example 1   Creating an HTTP Network Listener

The following command creates an HTTP network listener named sampleListener that uses a nondefault number of acceptor threads and is not enabled at runtime:

asadmin> create-http-listener --listeneraddress 0.0.0.0 --listenerport 7272
--defaultvs server --servername host1.sun.com --acceptorthreads 100
--securityenabled=false --enabled=false sampleListener
Command create-http-listener executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-http-redirect

Adds a new HTTP redirect

Synopsis

asadmin [asadmin-options] create-http-redirect [--help]
[--redirect-port redirect-port]
[--secure-redirect={false|true}]
[--target target]
protocol-name

Description

The create-http-redirect subcommand creates an HTTP redirect. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--redirect-port

Port number for redirects. If the HTTP listener is supporting non-SSL requests, and a request is received for which a matching security-constraint requires SSL transport, Eclipse GlassFish automatically redirects the request to this port number.

--secure-redirect

If set to true, the HTTP redirect runs SSL. The default value is false.

--target

Creates the HTTP redirect only on the specified target. Valid values are as follows:

server

Creates the HTTP redirect on the default server instance. This is the default value.

configuration-name

Creates the HTTP redirect in the specified configuration.

cluster-name

Creates the HTTP redirect on all server instances in the specified cluster.

standalone-instance-name

Creates the HTTP redirect on the specified standalone server instance.

Operands

protocol-name

The name of the protocol to which to apply the redirect.

Exit Status

0

command executed successfully

1

error in executing the command

create-iiop-listener

Adds an IIOP listener

Synopsis

asadmin [asadmin-options] create-iiop-listener [--help]
--listeneraddress address
[--iiopport iiop-port-number] [--securityenabled={false|true}] [--enabled={true|false}]
[--property (name=value)[:name=value]*]
[--target target] listener_id

Description

The create-iiop-listener subcommand creates an IIOP listener. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--listeneraddress

Either the IP address or the hostname (resolvable by DNS).

--iiopport

The IIOP port number. The default value is 1072.

--securityenabled

If set to true, the IIOP listener runs SSL. You can turn SSL2 or SSL3 ON or OFF and set ciphers using an SSL element. The security setting globally enables or disables SSL by making certificates available to the server instance. The default value is false.

--enabled

If set to true, the IIOP listener is enabled at runtime. The default value is true.

--property

Optional attribute name/value pairs for configuring the IIOP listener.

--target

Specifies the target for which you are creating the IIOP listener. Valid values are

server

Creates the listener for the default server instance server and is the default value.

configuration_name

Creates the listener for the named configuration.

cluster_name

Creates the listener for every server instance in the cluster.

stand-alone_instance_name

Creates the listener for a particular standalone server instance.

Operands

listener_id

A unique identifier for the IIOP listener to be created.

Examples

Example 1   Creating an IIOP Listener

The following command creates an IIOP listener named sample_iiop_listener:

asadmin> create-iiop-listener --listeneraddress 192.168.1.100
--iiopport 1400 sample_iiop_listener
Command create-iiop-listener executed successfully.

Example 2   Creating an IIOP Listener with a Target Cluster

The following command creates an IIOP listener named iiop_listener_2 for the cluster mycluster. It uses the target option.

asadmin> create-iiop-listener --listeneraddress 0.0.0.0 --iiopport 1401
--target mycluster iiop_listener_2
Command create-iiop-listener executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-instance

Creates a Eclipse GlassFish instance

Synopsis

asadmin [asadmin-options] create-instance [--help]
--node node-name
[--config config-name | --cluster cluster-name]
[--lbenabled={true|false}]
[--portbase=port-number] [--checkports={true|false}]
[--systemproperties (name=value)[:name=value]* ]
instance-name

Description

The create-instance subcommand creates a Eclipse GlassFish instance. This subcommand requires the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured on the host where the domain administration server (DAS) is running and on the host that is represented by the node where the instance is to reside.

DCOM or SSH is not required if the instance is to reside on a node of type CONFIG that represents the local host. A node of type CONFIG is not enabled for remote communication over DCOM or SSH.

You may run this command from any host that can contact the DAS.

A Eclipse GlassFish instance is a single Virtual Machine for the Java platform (Java Virtual Machine or JVM machine) on a single node in which Eclipse GlassFish is running. A node defines the host where the Eclipse GlassFish instance resides. The JVM machine must be compatible with the Java Platform, Enterprise Edition (Jakarta EE).

A Eclipse GlassFish instance requires a reference to the following items:

  • The node that defines the host where the instance resides. The node must be specified in the command to create the instance.

  • The named configuration that defines the configuration of the instance. The configuration can be specified in the command to create the instance, but is not required. If no configuration is specified for an instance that is not joining a cluster, the subcommand creates a configuration for the instance. An instance that is joining a cluster receives its configuration from its parent cluster.

Each Eclipse GlassFish instance is one of the following types of instance:

Standalone instance

A standalone instance does not share its configuration with any other instances or clusters. A standalone instance is created if either of the following conditions is met:

  • No configuration or cluster is specified in the command to create the instance.

  • A configuration that is not referenced by any other instances or clusters is specified in the command to create the instance.

When no configuration or cluster is specified, a copy of the default-config configuration is created for the instance. The name of this configuration is instance-name-config, where instance-name represents the name of an unclustered server instance.

Shared instance

A shared instance shares its configuration with other instances or clusters. A shared instance is created if a configuration that is referenced by other instances or clusters is specified in the command to create the instance.

Clustered instance

A clustered instance inherits its configuration from the cluster to which the instance belongs and shares its configuration with other instances in the cluster. A clustered instance is created if a cluster is specified in the command to create the instance.
Any instance that is not part of a cluster is considered an unclustered server instance. Therefore, standalone instances and shared instances are unclustered server instances.

By default, this subcommand attempts to resolve possible port conflicts for the instance that is being created. The subcommand also assigns ports that are currently not in use and not already assigned to other instances on the same node. The subcommand assigns these ports on the basis of an algorithm that is internal to the subcommand. Use the --systemproperties option to resolve port conflicts for additional instances on the same node. System properties of an instance can be manipulated by using the create-system-properties(1) subcommand and the delete-system-property(1) subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--node

The name of the node that defines the host where the instance is to be created. The node must already exist. If the instance is to be created on the host where the domain administration server (DAS) is running, use the predefined node localhost-domain.

--config

Specifies the named configuration that the instance references. The configuration must exist and must not be named default-config or server-config. Specifying the --config option creates a shared instance.
The --config option and the --cluster option are mutually exclusive. If both options are omitted, a standalone instance is created.

--cluster

Specifies the cluster from which the instance inherits its configuration. Specifying the --cluster option creates a clustered instance.
The --config option and the --cluster option are mutually exclusive. If both options are omitted, a standalone instance is created.

--lbenabled

Specifies whether the instance is enabled for load balancing. Possible values are as follows:

true

The instance is enabled for load balancing (default).
When an instance is enabled for load balancing, a load balancer sends requests to the instance.

false

The instance is disabled for load balancing.
When an instance is disabled for load balancing, a load balancer does not send requests to the instance.

--portbase

Determines the number with which the port assignment should start. An instance uses a certain number of ports that are statically assigned. The portbase value determines where the assignment should start. The values for the ports are calculated as follows:

  • Administration port: portbase + 48

  • HTTP listener port: portbase + 80

  • HTTPS listener port: portbase + 81

  • JMS port: portbase + 76

  • IIOP listener port: portbase + 37

  • Secure IIOP listener port: portbase + 38

  • Secure IIOP with mutual authentication port: portbase + 39

  • JMX port: portbase + 86

  • JPA debugger port: portbase + 9

  • Felix shell service port for OSGi module management: portbase + 66

When the --portbase option is specified, the output of this subcommand includes a complete list of used ports.

--checkports

Specifies whether to check for the availability of the administration, HTTP, JMS, JMX, and IIOP ports. The default value is true.

--systemproperties

Defines system properties for the instance. These properties override property definitions for port settings in the instance’s configuration. Predefined port settings must be overridden if, for example, two clustered instances reside on the same host. In this situation, port settings for one instance must be overridden because both instances share the same configuration.
The following properties are available:

ASADMIN_LISTENER_PORT

This property specifies the port number of the HTTP port or HTTPS port through which the DAS connects to the instance to manage the instance. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTP requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTPS requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_LISTENER_PORT

This property specifies the port number of the port that is used for IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used for secure IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_MUTUALAUTH_PORT

This property specifies the port number of the port that is used for secure IIOP connections with client authentication. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JAVA_DEBUGGER_PORT

This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMS_PROVIDER_PORT

This property specifies the port number for the Java Message Service provider. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMX_SYSTEM_CONNECTOR_PORT

This property specifies the port number on which the JMX connector listens. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

OSGI_SHELL_TELNET_PORT

This property specifies the port number of the port that is used for connections to the Apache Felix Remote Shell (http://felix.apache.org/site/apache-felix-remote-shell.html). This shell uses the Felix shell service to interact with the OSGi module management subsystem. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

Operands

instance-name

The name of the instance that is being created.
The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another Eclipse GlassFish instance, a cluster, a named configuration, or a node.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.

Examples

Example 1   Creating a Standalone Eclipse GlassFish Instance

This example creates the standalone Eclipse GlassFish instance pmdsainst in the domain domain1 on the local host.

asadmin> create-instance --node localhost-domain1 pmdsainst
Port Assignments for server instance pmdsainst:
JMX_SYSTEM_CONNECTOR_PORT=28688
JMS_PROVIDER_PORT=27678
ASADMIN_LISTENER_PORT=24850
HTTP_LISTENER_PORT=28082
IIOP_LISTENER_PORT=23702
IIOP_SSL_LISTENER_PORT=23822
HTTP_SSL_LISTENER_PORT=28183
IIOP_SSL_MUTUALAUTH_PORT=23922

Command create-instance executed successfully.

Example 2   Creating a Standalone Eclipse GlassFish Instance With Custom

Port Assignments

This example creates the standalone Eclipse GlassFish instance pmdcpinst in the domain domain1 on the local host. Custom port numbers are assigned to the following ports:

  • HTTP listener port

  • HTTPS listener port

  • IIOP connections port

  • Secure IIOP connections port

  • Secure IIOP connections port with mutual authentication

  • JMX connector port

asadmin> create-instance --node localhost-domain1
--systemproperties HTTP_LISTENER_PORT=58294:
HTTP_SSL_LISTENER_PORT=58297:
IIOP_LISTENER_PORT=58300:
IIOP_SSL_LISTENER_PORT=58303:
IIOP_SSL_MUTUALAUTH_PORT=58306:
JMX_SYSTEM_CONNECTOR_PORT=58309 pmdcpinst
Port Assignments for server instance pmdcpinst:
JMS_PROVIDER_PORT=27679
ASADMIN_LISTENER_PORT=24851

Command create-instance executed successfully.

Example 3   Creating a Shared Eclipse GlassFish Instance

This example creates the shared Eclipse GlassFish instance pmdsharedinst1 in the domain domain1 on the local host. The shared configuration of this instance is pmdsharedconfig.

asadmin create-instance --node localhost-domain1 --config pmdsharedconfig
pmdsharedinst1
Port Assignments for server instance pmdsharedinst1:
JMX_SYSTEM_CONNECTOR_PORT=28687
JMS_PROVIDER_PORT=27677
ASADMIN_LISTENER_PORT=24849
HTTP_LISTENER_PORT=28081
IIOP_LISTENER_PORT=23701
IIOP_SSL_LISTENER_PORT=23821
HTTP_SSL_LISTENER_PORT=28182
IIOP_SSL_MUTUALAUTH_PORT=23921

Command create-instance executed successfully.

Example 4   Creating a Clustered Eclipse GlassFish Instance

This example creates the clustered Eclipse GlassFish instance pmdinst1 in the domain domain1 on the local host. The instance is a member of the cluster pmdclust1.

asadmin> create-instance --node localhost-domain1 --cluster pmdclust pmdinst1
Port Assignments for server instance pmdinst1:
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
ASADMIN_LISTENER_PORT=24848
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920

Command create-instance executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-jacc-provider

Enables administrators to create a JACC provider that can be used by third-party authorization modules for applications running in Eclipse GlassFish

Synopsis

asadmin [asadmin-options] create-jacc-provider [--help]
[--policyproviderclass pol-provider-class]
[--policyconfigfactoryclass pc-factory-class]
[--property name=value)[:name=value]*]
[--target target] jacc-provider-name

Description

The create-jacc-provider subcommand creates a JSR-115—compliant Java Authorization Contract for Containers (JACC) provider that can be used for authorization of applications running in Eclipse GlassFish. The JACC provider is created as a jacc-provider element within the security-service element in the domain’s domain.xml file.

The default Eclipse GlassFish installation includes two JACC providers, named default and simple. Any JACC providers created with the create-jacc-provider subcommand are in addition to these two default providers. The default Eclipse GlassFish JACC providers implement a simple, file-based authorization engine that complies with the JACC specification. The create-jacc-provider subcommand makes it possible to specify additional third-party JACC providers.

You can create any number of JACC providers within the security-service element, but the Eclipse GlassFish runtime uses only one of them at any given time. The jacc-provider element in the security-service element points to the name of the provider that is currently in use by Eclipse GlassFish. If you change this element to point to a different JACC provider, restart Eclipse GlassFish.

This command is supported in remote mode only.

Options

If an option has a short option name, then the short option precedes the long option name. Short options have one dash whereas long options have two dashes.

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--policyproviderclass

Specifies the fully qualified class name for the javax.security.jacc.policy.provider that implements the java.security.Policy.

--policyconfigfactoryclass

Specifies the fully qualified class name for the javax.security.jacc.PolicyConfigurationFactory.provider that implements the provider-specific javax.security.jacc.PolicyConfigurationFactory.

--property

Optional attribute name/value pairs for configuring the JACC provider. The following properties are available:

repository

The directory containing the JACC policy file. For the default Eclipse GlassFish JACC provider, the default directory is ${com.sun.aas.instanceRoot}/generated/policy. This property is not defined by default for the simple Eclipse GlassFish JACC provider.

--target

Specifies the target for which you are creating the JACC provider. The following values are valid:

server

Creates the JACC provider on the default server instance. This is the default value.

configuration_name

Creates the JACC provider in the specified configuration.

cluster_name

Creates the JACC provider on all server instances in the specified cluster.

instance_name

Creates the JACC provider on a specified server instance.

Operands

jacc-provider-name

The name of the provider used to reference the jacc-provider element in domain.xml.

Examples

Example 1   Creating a JACC Provider

The following example shows how to create a JACC provider named testJACC on the default server target.

asadmin> create-jacc-provider
--policyproviderclass org.glassfish.exousia.modules.locked.SimplePolicyProvider
--policyconfigfactoryclass org.glassfish.exousia.modules.locked.SimplePolicyConfigurationFactory
testJACC

Command create-jacc-provider executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jdbc-connection-pool

Registers a JDBC connection pool

Synopsis

asadmin [asadmin-options] create-jdbc-connection-pool [--help]
[--datasourceclassname=datasourceclassname]
[--restype=resourcetype]
[--steadypoolsize=poolsize]
[--maxpoolsize=maxpoolsize]
[--maxwait=maxwaittime]
[--poolresize=poolresizelimit]
[--idletimeout=idletimeout]
[--initsql=initsqlstring]
[--isolationlevel=isolationlevel]
[--isisolationguaranteed={true|false}]
[--isconnectvalidatereq={false|true}]
[--validationmethod=validationmethod]
[--validationtable=validationtable]
[--failconnection={false|true}]
[--allownoncomponentcallers={false|true}]
[--nontransactionalconnections={false|true}]
[--validateatmostonceperiod=validationinterval]
[--leaktimeout=leaktimeout]
[--leakreclaim={false|true}]
[--statementleaktimeout=satementleaktimeout]
[--statmentleakreclaim={false|true}]
[--creationretryattempts=creationretryattempts]
[--creationretryinterval=creationretryinterval]
[--sqltracelisteners=sqltracelisteners[,sqltracelisteners]]
[--statementtimeout=statementtimeout]
[--lazyconnectionenlistment={false|true}]
[--lazyconnectionassociation={false|true}]
[--associatewiththread={false|true}]
[--driverclassname=jdbcdriverclassname]
[--matchconnections={false|true}]
[--maxconnectionusagecount=maxconnectionusagecount]
[--ping={false|true}]
[--pooling={false|true}]
[--statementcachesize=statementcachesize]
[--validationclassname=validationclassname]
[--wrapjdbcobjects={false|true}]
[--description description]
[--property name=value)[:name=value]*]
[--target=target]
connectionpoolid

Description

The create-jdbc-connection-pool subcommand registers a new Java Database Connectivity ("JDBC") software connection pool with the specified JDBC connection pool name.

A JDBC connection pool with authentication can be created either by using a --property option to specify user, password, or other connection information, or by specifying the connection information in the XML descriptor file.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--datasourceclassname

The name of the vendor-supplied JDBC datasource resource manager. An XA or global transactions capable datasource class will implement the javax.sql.XADatasource interface. Non-XA or exclusively local transaction datasources will implement the javax.sql.Datasource interface. --restype

Required when a datasource class implements two or more interfaces (javax.sql.DataSource, javax.sql.XADataSource, or javax.sql.ConnectionPoolDataSource), or when a driver classname must

be provided.
  • If --restype = java.sql.Driver, then the --driverclassname option is required.

  • If --restype = javax.sql.DataSource, javax.sql.XADataSource, or javax.sql.ConnectionPoolDataSource, then the --datasourceclassname option is required.

  • If --restype is not specified, then either the --driverclassname or --datasourceclassname option must be specified, but not both.

--steadypoolsize

The minimum and initial number of connections maintained in the pool. The default value is 8.

--maxpoolsize

The maximum number of connections that can be created. The default value is 32.

--maxwait

The amount of time, in milliseconds, that a caller will wait before a connection timeout is sent. The default is 60000 (60 seconds). A value of 0 forces the caller to wait indefinitely.

--poolresize

Number of connections to be removed when idle-timeout-in-seconds timer expires. This is the quantity by which the pool will scale up or scale down the number of connections. Scale up: When the pool has no free connections, pool will scale up by this quantity. Scale down: All the invalid and idle connections are removed, sometimes resulting in removing connections of quantity greater than this value. Connections that have been idle for longer than the timeout are candidates for removal. Steadypoolsize will be ensured. Possible values are from 0 to MAX_INTEGER. The default value is 2.

--idletimeout

The maximum time, in seconds, that a connection can remain idle in the pool. After this time, the implementation can close this connection. This timeout value must be kept shorter than the database server side timeout value to prevent the accumulation of unusable connections in the application. The default value is 300.

--initsql

An SQL string that is executed whenever a connection is created from the pool. If an existing connection is reused, this string is not executed. Connections that have idled for longer than the timeout are candidates for removal. This option has no default value.

--isolationlevel

The transaction-isolation-level on the pooled database connections. This option does not have a default value. If not specified, the pool operates with the default isolation level that the JDBC driver provides. You can set a desired isolation level using one of the standard transaction isolation levels: read-uncommitted, read-committed, repeatable-read, serializable. Applications that change the isolation level on a pooled connection programmatically risk polluting the pool. This could lead to program errors.

--isisolationguaranteed

This is applicable only when a particular isolation level is specified for transaction-isolation-level. The default value is true.
This option assures that every time a connection is obtained from the pool, isolation level is set to the desired value. This could have some performance impact on some JDBC drivers. Administrators can set this to false when the application does not change --isolationlevel before returning the connection.

--isconnectvalidatereq

If set to true, connections are validated or checked to see if they are usable before giving out to the application. The default value is false.

--validationmethod

Type of validation to be performed when is-connection-validation-required is true. Valid settings are: auto-commit, meta-data, table, or custom-validation. The default value is table.

--validationtable

The name of the validation table used to perform a query to validate a connection. If is-connection-validation-required is set to true and connection-validation-type set to table, this option is mandatory.

--failconnection

If set to true, all connections in the pool must be closed when a single validation check fails. The default value is false. One attempt is made to reestablish failed connections.

--allownoncomponentcallers

A pool with this property set to true can be used by non-Jakarta EE components, that is, components other than EJBs or Servlets. The returned connection is enlisted automatically with the transaction context obtained from the transaction manager. Connections obtained by non-component callers are not automatically cleaned by the container at the end of a transaction. These connections need to be explicitly closed by the caller.

--nontransactionalconnections

A pool with this property set to true returns non-transactional connections. This connection does not get automatically enlisted with the transaction manager.

--validateatmostonceperiod

Specifies the time interval in seconds between successive requests to validate a connection at most once. Setting this attribute to an appropriate value minimizes the number of validation requests by a connection. Default value is 0, which means that the attribute is not enabled.

--leaktimeout

Specifies the amount of time, in seconds, for which connection leaks in a connection pool are to be traced. When a connection is not returned to the pool by the application within the specified period, it is assumed to be a potential leak, and stack trace of the caller will be logged. This option only detects if there is a connection leak. The connection can be reclaimed only if connection-leak-reclaim is set to true.
If connection leak tracing is enabled, you can use the Administration Console to enable monitoring of the JDBC connection pool to get statistics on the number of connection leaks. The default value is 0, which disables connection leak tracing.

--leakreclaim

Specifies whether leaked connections are restored to the connection pool after leak connection tracing is complete. Possible values are as follows:

false

Leaked connections are not restored to the connection pool (default).

true

Leaked connections are restored to the connection pool.

--statementleaktimeout

Specifies the amount of time, in seconds, after which any statements that have not been closed by an application are to be detected. Applications can run out of cursors if statement objects are not properly closed. This option only detects if there is a statement leak. The statement can be reclaimed only if statement-leak-reclaim is set to true. The leaked statement is closed when it is reclaimed.
The stack trace of the caller that creates the statement will be logged when a statement leak is detected. If statement leak tracing is enabled, you can use the Administration Console to enable monitoring of the JDBC connection pool to get statistics on the number of statement leaks. The default value is 0, which disables statement leak tracing.
The following limitations apply to the statement leak timeout value:

  • The value must be less than the value set for the connection leak-timeout.

  • The value must be greater than the value set for statement-timeout.

--statementleakreclaim

Specifies whether leaked statements are reclaimed after the statements leak. Possible values are as follows:

false

Leaked statements are not reclaimed (default).

true

Leaked statements are reclaimed.

--creationretryattempts

Specifies the maximum number of times that Eclipse GlassFish retries to create a connection if the initial attempt fails. The default value is 0, which specifies that Eclipse GlassFish does not retry to create the connection.

--creationretryinterval

Specifies the interval, in seconds, between successive attempts to create a connection.
If --creationretryattempts is 0, the --creationretryinterval option is ignored. The default value is 10.

--sqltracelisteners

A list of one or more custom modules that provide custom logging of database activities. Each module must implement the org.glassfish.api.jdbc.SQLTraceListener public interface. When set to an appropriate value, SQL statements executed by applications are traced. This option has no default value.

--statementtimeout

Specifies the length of time in seconds after which a query that is not completed is terminated.
A query that remains incomplete for a long period of time might cause the application that submitted the query to hang. To prevent this occurrence, use this option set a timeout for all statements that will be created from the connection pool that you are creating. When creating a statement, Eclipse GlassFish sets the QueryTimeout property on the statement to the length of time that is specified. The default value is -1, which specifies that incomplete queries are never terminated.

--lazyconnectionenlistment

Specifies whether a resource to a transaction is enlisted only when a method actually uses the resource. Possible values are as follows:

false

Resources to a transaction are always enlisted and not only when a method actually uses the resource (default).

true

Resources to a transaction are enlisted only when a method actually uses the resource.

--lazyconnectionassociation

Specifies whether a physical connection should be associated with the logical connection only when the physical connection is used, and disassociated when the transaction is completed. Such association and dissociation enable the reuse of physical connections. Possible values are as follows:

false

A physical connection is associated with the logical connection even before the physical connection is used, and is not disassociated when the transaction is completed (default).

true

A physical connection is associated with the logical connection only when the physical connection is used, and disassociated when the transaction is completed. The --lazyconnectionenlistment option must also be set to true.

--associatewiththread

Specifies whether a connection is associated with the thread to enable the thread to reuse the connection. If a connection is not associated with the thread, the thread must obtain a connection from the pool each time that the thread requires a connection. Possible values are as follows:

false

A connection is not associated with the thread (default).

true

A connection is associated with the thread.

--driverclassname

The name of the vendor-supplied JDBC driver class. This driver should implement the java.sql.Driver interface.

--matchconnections

Specifies whether a connection that is selected from the pool should be matched by the resource adaptor. If all the connections in the pool are homogenous, a connection picked from the pool need not be matched by the resource adapter, which means that this option can be set to false. Possible values are as follows:

false

A connection should not be matched by the resource adaptor (default).

true

A connection should be matched by the resource adaptor.

--maxconnectionusagecount

Specifies the maximum number of times that a connection can be reused. When this limit is reached, the connection is closed. By limiting the maximum number of times that a connection can be reused, you can avoid statement leaks.
The default value is 0, which specifies no limit on the number of times that a connection can be reused.

--ping

Specifies if the pool is pinged during pool creation or reconfiguration to identify and warn of any erroneous values for its attributes. Default value is false.

--pooling

Specifies if connection pooling is enabled for the pool. The default value is true.

--statementcachesize

The number of SQL statements to be cached using the default caching mechanism (Least Recently Used). The default value is 0, which indicates that statement caching is not enabled.

--validationclassname

The name of the class that provides custom validation when the value of validationmethod is custom-validation. This class must implement the org.glassfish.api.jdbc.ConnectionValidation interface, and it must be accessible to Eclipse GlassFish. This option is mandatory if the connection validation type is set to custom validation.

--wrapjdbcobjects

Specifies whether the pooling infrastructure provides wrapped JDBC objects to applications. By providing wrapped JDBC objects, the pooling infrastructure prevents connection leaks by ensuring that applications use logical connections from the connection pool, not physical connections. The use of logical connections ensures that the connections are returned to the connection pool when they are closed. However, the provision of wrapped JDBC objects can impair the performance of applications. The default value is true.
The pooling infrastructure provides wrapped objects for implementations of the following interfaces in the JDBC API:

  • java.sql.CallableStatement

  • java.sql.DatabaseMetaData

  • java.sql.PreparedStatement

  • java.sql.ResultSet

  • java.sql.Statement

Possible values of --wrapjdbcobjects are as follows:

false

The pooling infrastructure does not provide wrapped JDBC objects to applications. (default).

true

The pooling infrastructure provides wrapped JDBC objects to applications.

--description

Text providing details about the specified JDBC connection pool.

--property

Optional attribute name/value pairs for configuring the pool. The following properties are available:

user

Specifies the user name for connecting to the database.

password

Specifies the password for connecting to the database.

databaseName

Specifies the database for this connection pool.

serverName

Specifies the database server for this connection pool.

port

Specifies the port on which the database server listens for requests.

networkProtocol

Specifies the communication protocol.

roleName

Specifies the initial SQL role name.

datasourceName

Specifies an underlying XADataSource, or a ConnectionPoolDataSource if connection pooling is done.

description

Specifies a text description.

url

Specifies the URL for this connection pool. Although this is not a standard property, it is commonly used.

dynamic-reconfiguration-wait-timeout-in-seconds

Used to enable dynamic reconfiguration of the connection pool transparently to the applications that are using the pool, so that applications need not be re-enabled for the attribute or property changes to the pool to take effect. Any in-flight transaction’s connection requests will be allowed to complete with the old pool configuration as long as the connection requests are within the timeout period, so as to complete the transaction. New connection requests will wait for the pool reconfiguration to complete and connections will be acquired using the modified pool configuration.

LazyConnectionEnlistment

Deprecated. Use the equivalent attribute. The default value is false.

LazyConnectionAssociation

Deprecated. Use the equivalent attribute. The default value is false.

AssociateWithThread

Deprecated. Use the equivalent attribute. The default value is false.

MatchConnections

Deprecated. Use the equivalent attribute. The default value is true.

Prefer-Validate-Over-Recreate

Specifies whether pool resizer should validate idle connections before destroying and recreating them. The default value is true.

time-to-keep-queries-in-minutes

Specifies the number of minutes that will be cached for use in calculating frequently used queries. Takes effect when SQL tracing and monitoring are enabled for the JDBC connection pool. The default value is 5 minutes.

number-of-top-queries-to-report

Specifies the number of queries to list when reporting the top and most frequently used queries. Takes effect when SQL tracing and monitoring are enabled for the JDBC connection pool. The default value is 10 queries.

If an attribute name or attribute value contains a colon, the backslash (\) must be used to escape the colon in the name or value. Other characters might also require an escape character. For more information about escape characters in command options, see the asadmin(1M) man page.

--target

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

connectionpoolid

The name of the JDBC connection pool to be created.

Examples

Example 1   Creating a JDBC Connection Pool

This example creates a JDBC connection pool named sample_derby_pool.

asadmin> create-jdbc-connection-pool
--datasourceclassname org.apache.derby.jdbc.ClientDataSource
--restype javax.sql.XADataSource
--property portNumber=1527:password=APP:user=APP:serverName=
localhost:databaseName=sun-appserv-samples:connectionAttributes=\;
create\\=true sample_derby_pool
Command create-jdbc-connection-pool executed successfully

The escape character backslash (\) is used in the --property option to distinguish the semicolon (;). Two backslashes (\\) are used to distinguish the equal sign (=).

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jdbc-resource

Creates a JDBC resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] create-jdbc-resource [--help]
--connectionpoolid connectionpoolid
[--enabled={false|true}]
[--description description]
[--property (property=value)[:name=value]*]
[--target target]
jndi_name

Description

The create-jdbc-resource subcommand creates a new JDBC resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--connectionpoolid

The name of the JDBC connection pool. If two or more JDBC resource elements point to the same connection pool element, they use the same pool connection at runtime.

--enabled

Determines whether the JDBC resource is enabled at runtime. The default value is true.

--description

Text providing descriptive details about the JDBC resource.

--property

Optional attribute name/value pairs for configuring the resource.

--target

This option helps specify the target to which you are deploying. Valid values are:

server

Deploys the component to the default server instance. This is the default value.

domain

Deploys the component to the domain.

cluster_name

Deploys the component to every server instance in the cluster.

instance_name

Deploys the component to a particular server instance.

The resource is always created for the domain as a whole, but the resource-ref for the resource is only created for the specified --target. This means that although the resource is defined at the domain level, it is only available at the specified target level. Use the create-resource-ref subcommand to refer to the resource in multiple targets if needed.

Operands

jndi_name

The JNDI name of this JDBC resource.

Examples

Example 1   Creating a JDBC Resource

This example creates a JDBC resource named jdbc/DerbyPool.

asadmin> create-jdbc-resource
--connectionpoolid sample_derby_pool jdbc/DerbyPool
Command create-jdbc-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jmsdest

Creates a JMS physical destination

Synopsis

asadmin [asadmin-options] create-jmsdest [--help]
--desttype dest_type
[--property (name=value)[:name=value]*]
[--target target]
[--force={false|true}]
dest_name

Description

The create-jmsdest subcommand creates a Java Message Service (JMS) physical destination. Typically, you use the create-jms-resource subcommand to create a JMS destination resource that has a Name property that specifies the physical destination. The physical destination is created automatically when you run an application that uses the destination resource. Use the create-jmsdest subcommand if you want to create a physical destination with non-default property settings.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--desttype

The type of the JMS destination. Valid values are topic and queue.

--property

Optional attribute name/value pairs for configuring the physical destination. You can specify the following properties for a physical destination.

MaxNumMsgs

The maximum number of unconsumed messages permitted for the destination. A value of -1 denotes an unlimited number of messages. The default value is -1. For the dead message queue, the default value is 1000.
If the limitBehavior property is set to FLOW_CONTROL, it is possible for the specified message limit to be exceeded because the broker cannot react quickly enough to stop the flow of incoming messages. In such cases, the value specified for maxNumMsgs serves as merely a hint for the broker rather than a strictly enforced limit.

MaxBytesPerMsg

The maximum size, in bytes, of any single message. Rejection of a persistent message is reported to the producing client with an exception; no notification is sent for non-persistent messages.
The value may be expressed in bytes, kilobytes, or megabytes, using the following suffixes:

b

Bytes

k

Kilobytes (1024 bytes)

m

Megabytes (1024 x 1024 = 1,048,576 bytes)

A value with no suffix is expressed in bytes; a value of -1 denotes an unlimited message size. The default value is -1.

MaxTotalMsgBytes

The maximum total memory, in bytes, for unconsumed messages. The default value is -1. The syntax is the same as for maxBytesPerMsg. For the dead message queue, the default value is 10m.

LimitBehavior

The behavior of the message queue broker when the memory-limit threshold is reached. Valid values are as follows:

REJECT_NEWEST

Reject newest messages and notify the producing client with an exception only if the message is persistent. This is the default value.

FLOW_CONTROL

Slow the rate at which message producers send messages.

REMOVE_OLDEST

Throw out the oldest messages.

REMOVE_LOW_PRIORITY

Throw out the lowest-priority messages according to age, with no notification to the producing client.

If the value is REMOVE_OLDEST or REMOVE_LOW_PRIORITY and the useDMQ property is set to true, excess messages are moved to the dead message queue. For the dead message queue itself, the default limit behavior is REMOVE_OLDEST, and the value cannot be set to FLOW_CONTROL.

MaxNumProducers

The maximum number of message producers for the destination. When this limit is reached, no new producers can be created. A value of -1 denotes an unlimited number of producers. The default value is 100. This property does not apply to the dead message queue.

ConsumerFlowLimit

The maximum number of messages that can be delivered to a consumer in a single batch. A value of -1 denotes an unlimited number of messages. The default value is 1000. The client runtime can override this limit by specifying a lower value on the connection factory object.
In load-balanced queue delivery, this is the initial number of queued messages routed to active consumers before load balancing begins.

UseDMQ

If set to true, dead messages go to the dead message queue. If set to false, dead messages are discarded. The default value is true.

ValidateXMLSchemaEnabled

If set to true, XML schema validation is enabled for the destination. The default value is false.
When XML validation is enabled, the Message Queue client runtime will attempt to validate an XML message against the specified XSDs (or against the DTD, if no XSD is specified) before sending it to the broker. If the specified schema cannot be located or the message cannot be validated, the message is not sent, and an exception is thrown.
This property should be set when a destination is inactive: that is, when it has no consumers or producers and when there are no messages in the destination. Otherwise the producer must reconnect.

XMLSchemaURIList

A space-separated list of XML schema document (XSD) URI strings. The URIs point to the location of one or more XSDs to use for XML schema validation, if validateXMLSchemaEnabled is set to true. The default value is null.
Use double quotes around this value if multiple URIs are specified, as in the following example:

"http://foo/flap.xsd http://test.com/test.xsd"

If this property is not set or null and XML validation is enabled, XML validation is performed using a DTD specified in the XML document. If an XSD is changed as a result of changing application requirements, all client applications that produce XML messages based on the changed XSD must reconnect to the broker.

To modify the value of these properties, you can use the as-install/mq/bin/imqcmd command. See "Physical Destination Property Reference" in Open Message Queue Administration Guide for more information.

--target

Creates the physical destination only for the specified target. Although the create-jmsdest subcommand is related to resources, a physical destination is created using the JMS Service (JMS Broker), which is part of the configuration. A JMS Broker is configured in the config section of domain.xml. Valid values are as follows:

server

Creates the physical destination for the default server instance. This is the default value.

configuration-name

Creates the physical destination in the specified configuration.

cluster-name

Creates the physical destination for every server instance in the specified cluster.

instance-name

Creates the physical destination for the specified server instance.

--force

Specifies whether the subcommand overwrites the existing JMS physical destination of the same name. The default value is false.

Operands

dest_name

A unique identifier for the JMS destination to be created.

Examples

Example 1   Creating a JMS physical destination

The following subcommand creates a JMS physical queue named PhysicalQueue with non-default property values.

asadmin> create-jmsdest --desttype queue
--property maxNumMsgs=1000:maxBytesPerMsg=5k PhysicalQueue
Command create-jmsdest executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jms-host

Creates a JMS host

Synopsis

asadmin [asadmin-options] create-jms-host [--help]
--mqhost mq-host --mqport mq-port
--mquser mq-user --mqpassword mq-password
[--target target]
[--force={false|true}]
jms_host_name

Description

Creates a Java Message Service (JMS) host within the JMS service.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--mqhost

The host name for the JMS service.

--mqport

The port number used by the JMS service.

--mquser

The user name for the JMS service.

--mqpassword

The password for the JMS service.

--target

Creates the JMS host only for the specified target. Valid values are as follows:

server

Creates the JMS host for the default server instance. This is the default value.

configuration-name

Creates the JMS host in the specified configuration.

cluster-name

Creates the JMS host for every server instance in the specified cluster.

instance-name

Creates the JMS host for the specified server instance.

--force

Specifies whether the subcommand overwrites the existing JMS host of the same name. The default value is false.

Operands

jms_host_name

A unique identifier for the JMS host to be created.

Examples

Example 1   Creating a JMS host using a non-default port

The following command creates a JMS host named MyNewHost on the system pigeon.

asadmin> create-jms-host --mqhost pigeon.example.com --mqport 7677
--mquser admin --mqpassword admin MyNewHost
Jms Host MyNewHost created.
Command create-jms-host executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jms-resource

Creates a JMS resource

Synopsis

asadmin [asadmin-options] create-jms-resource [--help]
--restype type
[--target target]
[--enabled={true|false}]
[--description text]
[--property (name=value)[:name=value]*]
[--force={false|true}]
jndi_name

Description

The create-jms-resource subcommand creates a Java Message Service (JMS) connection factory resource or a JMS destination resource.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--restype

The JMS resource type, which can be jakarta.jms.Topic, jakarta.jms.Queue, jakarta.jms.ConnectionFactory, jakarta.jms.TopicConnectionFactory, or jakarta.jms.QueueConnectionFactory.

--target

Creates the JMS resource only for the specified target. Valid values are as follows:

The resource is always created for the domain as a whole, but the <resource-ref> element for the resource is only created for the specified --target. This means that although the resource is defined at the domain level, it is only active at the specified --target.

server

Creates the JMS resource for the default server instance. This is the default value.

domain

Creates the JMS resource for the domain.

cluster-name

Creates the JMS resource for every server instance in the specified cluster.

instance-name

Creates the JMS resource for the specified server instance.

--enabled

If set to true (the default), the resource is enabled at runtime.

--description

Text providing details about the JMS resource.

--property

Optional attribute name/value pairs for configuring the JMS resource.
You can specify the following properties for a connection factory resource:

ClientId

A client ID for a connection factory that will be used by a durable subscriber.

AddressList

A comma-separated list of message queue addresses that specify the host names (and, optionally, port numbers) of a message broker instance or instances with which your application will communicate. For example, the value could be earth or earth:7677. Specify the port number if the message broker is running on a port other than the default (7676). The default value is an address list composed from the JMS hosts defined in the server’s JMS service configuration. The default value is localhost and the default port number is 7676. The client will attempt a connection to a broker on port 7676 of the local host.

UserName

The user name for the connection factory. The default value is guest.

Password

The password for the connection factory. The default value is guest.

ReconnectEnabled

A value of true indicates that the client runtime attempts to reconnect to a message server (or the list of addresses in the AddressList) when a connection is lost. The default value is false.

ReconnectAttempts

The number of attempts to connect (or reconnect) for each address in the AddressList before the client runtime tries the next address in the list. A value of -1 indicates that the number of reconnect attempts is unlimited (the client runtime attempts to connect to the first address until it succeeds). The default value is 6.

ReconnectInterval

The interval in milliseconds between reconnect attempts. This applies to attempts on each address in the AddressList and for successive addresses in the list. If the interval is too short, the broker does not have time to recover. If it is too long, the reconnect might represent an unacceptable delay. The default value is 30,000 milliseconds.

AddressListBehavior

Specifies whether connection attempts are in the order of addresses in the AddressList (PRIORITY) or in a random order (RANDOM). PRIORITY means that the reconnect will always try to connect to the first server address in the AddressList and will use another one only if the first broker is not available. If you have many clients attempting a connection using the same connection factory, specify RANDOM to prevent them from all being connected to the same address. The default value is the AddressListBehavior value of the server’s JMS service configuration.

AddressListIterations

The number of times the client runtime iterates through the AddressList in an effort to establish (or re-establish) a connection). A value of -1 indicates that the number of attempts is unlimited. The default value is -1.

Additionally, you can specify connector-connection-pool attributes as connector resource properties. For a list of these attributes, see "connector-connection-pool" in Eclipse GlassFish Application Deployment Guide.
You can specify the following properties for a destination resource:

Name

The name of the physical destination to which the resource will refer. The physical destination is created automatically when you run an application that uses the destination resource. You can also create a physical destination with the create-jmsdest subcommand. If you do not specify this property, the JMS service creates a physical destination with the same name as the destination resource (replacing any forward slash in the JNDI name with an underscore).

Description

A description of the physical destination.

--force

Specifies whether the subcommand overwrites the existing JMS resource of the same name. The default value is false.

Operands

jndi_name

The JNDI name of the JMS resource to be created.

Examples

Example 1   Creating a JMS connection factory resource for durable

subscriptions

The following subcommand creates a connection factory resource of type jakarta.jms.ConnectionFactory whose JNDI name is jms/DurableConnectionFactory. The ClientId property sets a client ID on the connection factory so that it can be used for durable subscriptions. The JNDI name for a JMS resource customarily includes the jms/ naming subcontext.

asadmin> create-jms-resource --restype jakarta.jms.ConnectionFactory
--description "connection factory for durable subscriptions"
--property ClientId=MyID jms/DurableConnectionFactory
Connector resource jms/DurableConnectionFactory created.
Command create-jms-resource executed successfully.

Example 2   Creating a JMS destination resource

The following subcommand creates a destination resource whose JNDI name is jms/MyQueue. The Name property specifies the physical destination to which the resource refers.

asadmin> create-jms-resource --restype jakarta.jms.Queue
--property Name=PhysicalQueue jms/MyQueue
Administered object jms/MyQueue created.
Command create-jms-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jndi-resource

Registers a JNDI resource

Synopsis

asadmin [asadmin-options] create-jndi-resource [--help]
[--target target]
--restype restype --factoryclass factoryclass
--jndilookupname jndilookupname [--enabled={true|false}]
[--description description]
[--property (name=value)[:name=value]*]
jndi-name

Description

The create-jndi-resource subcommand registers a JNDI resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target for which you are registering a JNDI resource. Valid values for target are described below.

The resource is always created for the domain as a whole, but the resource-ref for the resource is only created for the specified --target. This means that although the resource is defined at the domain level, it is only available at the specified target level. Use the create-resource-ref subcommand to refer to the resource in multiple targets if needed.

server

Creates the resource for the default server instance. This value is the default.

domain

Creates the resource for the domain

cluster-name

Creates the resource for every server instance in the cluster

instance-name

Creates the resource for a particular server instance

--restype

The JNDI resource type. Valid values are topic or queue.

--factoryclass

The class that creates the JNDI resource.

--jndilookupname

The lookup name that the external container uses.

--enabled

Determines whether the resource is enabled at runtime. Default is true.

--description

The text that provides details about the JNDI resource.

--property

Optional properties for configuring the resource. Each property is specified as a name-value pair.
The available properties are specific to the implementation that is specified by the --factoryclass option and are used by that implementation. Eclipse GlassFish itself does not define any properties for configuring a JNDI resource.

Operands

jndi-name

The unique name of the JNDI resource to be created.

Examples

Example 1   Creating a JNDI Resource

This example creates the JNDI resource my-jndi-resource for the default server instance.

asadmin> create-jndi-resource
--restype com.example.jndi.MyResourceType
--factoryclass com.example.jndi.MyInitialContextFactoryClass
--jndilookupname remote-jndi-name
--description "sample JNDI resource" my-jndi-resource
JNDI resource my-jndi-resource created.
Command create-jndi-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-jvm-options

Creates options for the Java application launcher

Synopsis

asadmin [asadmin-options] create-jvm-options [--help]
[--target target] [--profiler={true|false}]
(jvm-option-name=jvm-option-value) [:jvm-option-name=jvm-option-value*]

Description

The create-jvm-options subcommand creates command-line options that are passed to the Java application launcher when Eclipse GlassFish is started. The options that this subcommand creates are in addition to the options that are preset with Eclipse GlassFish. Java application launcher options are stored in the Java configuration java—config element or the profiler profiler element of the domain.xml file. The options are sent to the command line in the order they appear in the java—config element or the profiler profiler element in the domain.xml file.

Profiler options are used to record the settings that are required to start a particular profiler. The profiler must already exist. If necessary, use the create-profiler(1) subcommand to create the profiler.

This subcommand can be used to create the following types of options:

  • Java system properties. These options are set through the -D option of the Java application launcher. For example:

    -Djava.security.manager

    -Denvironment=Production

  • Startup parameters for the Java application launcher. These options are preceded by the dash character (-). For example:

    --XX:PermSize=size

    -Xmx1024m

    -d64

If the subcommand specifies an option that already exists, the command does not re-create the option.

Ensure that any option that you create is valid. The subcommand might allow you to create an invalid option, but such an invalid option can cause startup to fail.

An option can be verified by examining the server log after Eclipse GlassFish starts. Options for the Java application launcher are written to the server.log file before any other information when Eclipse GlassFish starts.

The addition of some options requires a server restart for changes to become effective. Other options are set immediately in the environment of the domain administration server (DAS) and do not require a restart. Whether a restart is required depends on the type of option.

  • Restart is not required for Java system properties whose names do not start with -Djava. or -Djavax. (including the trailing period). For example, restart is not required for the following Java system property:

    -Denvironment=Production

  • Restart is required for the following options:

    • Java system properties whose names start with -Djava. or -Djavax. (including the trailing period). For example:

      -Djava.security.manager

    • Startup parameters for the Java application launcher. For example:

      -client

      -Xmx1024m

      -d64

To restart the DAS, use the restart-domain(1) command.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are creating Java application launcher options.
Valid values are as follows:

server

Specifies the DAS (default).

instance-name

Specifies a Eclipse GlassFish instance.

cluster-name

Specifies a cluster.

configuration-name

Specifies a named configuration.

--profiler

Indicates whether the Java application launcher options are for the profiler. The profiler must exist for this option to be true. Default is false.

Operands

jvm-option-name

One or more options delimited by a colon (:). The format of an option depends on the following:

  • If the option has a name and a value, the format is option-name=value.

  • If the option has only a name, the format is option-name. For example, -Xmx2048m.

  • If the first option name could be misinterpreted as one or more asadmin short options, the format is -- option-name. For example, -server in the following command could be misinterpreted as -se, the asadmin short forms for --secure and --echo:

    create-jvm-options -server

    To create the JVM option -server, instead use the command:

    create-jvm-options -- -server

    If an option name or option value contains a colon, the backslash (\) must be used to escape the colon in the name or value. Other characters might also require an escape character. For more information about escape characters in subcommand options, see the asadmin(1M) man page.

Examples

Example 1   Setting Java System Properties

This example sets multiple Java system properties.

asadmin> create-jvm-options -Dunixlocation=/root/example:
-Dvariable=\$HOME:-Dwindowslocation=d\:\\sun\\appserver:-Doption1=-value1
created 4 option(s)
Command create-jvm-options executed successfully.

Example 2   Setting a Startup Parameter for the Java Application

Launcher

This example sets the maximum available heap size to 1024.

asadmin> create-jvm-options -Xmx1024m
created 1 option(s)
Command create-jvm-options executed successfully.

Example 3   Setting Multiple Startup Parameters for the Java Application

Launcher

This example sets the maximum available heap size to 1024 and requests details about garbage collection.

asadmin> create-jvm-options "-Xmx1024m:-XX\:+PrintGCDetails"
created 1 option(s)
Command create-jvm-options executed successfully.

In this case, one of the two parameters already exists, so the subcommand reports that only one option was set.

Example 4   Setting a JVM Startup Parameter for the Profiler

This example sets a JVM startup parameter for the profiler.

asadmin> create-jvm-options --profiler=true -XX\:MaxPermSize=192m
created 1 option(s)
Command create-jvm-options executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

For more information about the Java application launcher, see the reference page for the operating system that you are using:

create-lifecycle-module

Creates a lifecycle module

Synopsis

asadmin [asadmin-options] create-lifecycle-module [--help]
--classname classname
[--enabled={true|false}] [--target target]
[--classpath classpath] [--loadorder loadorder]
[--failurefatal={false|true} ] [--description description]
[--property (name=value)[:name=value]*]
module_name

Description

The create-lifecycle-module subcommand creates a lifecycle module. A lifecycle module provides a means of running a short or long duration Java-based task at a specific stage in the server life cycle. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--classname

This is the fully qualified name of the startup class.

--target

Indicates the location where the lifecycle module is to be created. Valid values are

  • server- Specifies the default server instance as the target for creating the lifecycle module. server is the name of the default server instance and is the default value for this option.

  • cluster_name- Specifies a particular cluster as the target for creating the lifecycle module.

  • instance_name- Specifies a particular stand-alone server instance as the target for creating the lifecycle module.

--classpath

This option indicates where the lifecycle module is located. It is a classpath with the standard format: either colon-separated (Unix) or semicolon-separated (Windows) JAR files and directories. The referenced JAR files and directories are not uploaded to the server instance.

--loadorder

This option represents an integer value that can be used to force the order in which deployed lifecycle modules are loaded at server startup. Smaller numbered modules are loaded sooner. Order is unspecified if two or more lifecycle modules have the same load-order value. The default is Integer.MAX_VALUE, which means the lifecycle module is loaded last.

--failurefatal

This option tells the system what to do if the lifecycle module does not load correctly. When this option is set to true, the system aborts the server startup if this module does not load properly. The default value is false.

--enabled

This option determines whether the lifecycle module is enabled at runtime. The default value is true.

--description

This is the text description of the lifecycle module.

--property

This is an optional attribute containing name/value pairs used to configure the lifecycle module.

Operands

module_name

This operand is a unique identifier for the deployed server lifecycle event listener module.

Examples

Example 1   Creating a Lifecycle Module

The following example creates a lifecycle module named customSetup.

asadmin> create-lifecycle-module --classname "com.acme.CustomSetup"
--classpath "/export/customSetup" --loadorder 1 --failurefatal=true
--description "this is a sample customSetup"
--property rmi="Server\=acme1\:7070":timeout=30 customSetup
Command create-lifecycle-module executed successfully

The escape character \ is used in the property option to specify that the equal sign (=) and colon (:) are part of the rmi property value.

Exit Status

0

command executed successfully

1

error in executing the command

See Also

"Developing Lifecycle Listeners" in Eclipse GlassFish Application Development Guide

create-local-instance

Creates a Eclipse GlassFish instance on the host where the subcommand is run

Synopsis

asadmin [asadmin-options] create-local-instance [--help]
[--node node-name] [--nodedir node-dir]
[--config config-name | --cluster cluster-name]
[--lbenabled={true|false}]
[--portbase port-number] [--checkports={true|false}]
[--savemasterpassword={false|true}]
[--usemasterpassword={false|true}]
[--systemproperties (name=value)[:name=value]* ]
instance-name

Description

The create-local-instance subcommand creates a Eclipse GlassFish instance on the node that represents the host where the subcommand is run. This subcommand does not require the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured.

You must run this subcommand from the host that is represented by the node where the instance is to reside. To contact the domain administration server (DAS), this subcommand requires the name of the host where the DAS is running. If a nondefault port is used for administration, this subcommand also requires the port number. If you are adding the first instance to a node, you must provide this information through the --host option and the --port option of the asadmin(1M) utility. For the second and later instances, this information is obtained from the DAS properties of the node.

A Eclipse GlassFish instance is a single Virtual Machine for the Java platform (Java Virtual Machine or JVM machine) on a single node in which Eclipse GlassFish is running. A node defines the host where the Eclipse GlassFish instance resides. The JVM machine must be compatible with the Java Platform, Enterprise Edition (Jakarta EE).

A Eclipse GlassFish instance requires a reference to the following items:

  • The node that defines the host where the instance resides. The node can be specified in the command to create the instance, but is required only if more than one node exists in the directory where files for nodes are stored. If no node is specified, the behavior of the subcommand depends on the number of existing nodes in the directory where nodes are stored:

    • If no nodes exist, the subcommand creates a node for the instance. The name of the node is the name of the host on which the subcommand is run.

    • If only one node exists, the subcommand creates a reference to the existing node for the instance.

    • If two or more nodes exist, an error occurs.

  • The named configuration that defines the configuration of the instance. The configuration can be specified in the command to create the instance, but is not required. If no configuration is specified for an instance that is not joining a cluster, the subcommand creates a configuration for the instance. An instance that is joining a cluster receives its configuration from its parent cluster.

Each Eclipse GlassFish instance is one of the following types of instance:

Standalone instance

A standalone instance does not share its configuration with any other instances or clusters. A standalone instance is created if either of the following conditions is met:

  • No configuration or cluster is specified in the command to create the instance.

  • A configuration that is not referenced by any other instances or clusters is specified in the command to create the instance.

When no configuration or cluster is specified, a copy of the default-config configuration is created for the instance. The name of this configuration is instance-name`-config`, where instance-name represents the name of an unclustered server instance.

Shared instance

A shared instance shares its configuration with other instances or clusters. A shared instance is created if a configuration that is referenced by other instances or clusters is specified in the command to create the instance.

Clustered instance

A clustered instance inherits its configuration from the cluster to which the instance belongs and shares its configuration with other instances in the cluster. A clustered instance is created if a cluster is specified in the command to create the instance.
Any instance that is not part of a cluster is considered an unclustered server instance. Therefore, standalone instances and shared instances are unclustered server instances.

By default, this subcommand attempts to resolve possible port conflicts for the instance that is being created. The subcommand also assigns ports that are currently not in use and not already assigned to other instances on the same node. The subcommand assigns these ports on the basis of an algorithm that is internal to the subcommand. Use the --systemproperties option to resolve port conflicts for additional instances on the same node. System properties of an instance can be manipulated by using the create-system-properties(1) subcommand and the delete-system-property(1) subcommand.

When creating an instance, the subcommand retrieves the files that are required for secure synchronization with the domain administration server (DAS). The instance is synchronized with the DAS when the instance is started

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--node

The name of the node that defines the host where the instance is to be created. The node must be specified only if more than one node exists in the directory where nodes are stored. Otherwise, the node may be omitted. If a node is specified, the node must exist.
If no node is specified, the behavior of the subcommand depends on the number of existing nodes in the directory where nodes are stored:

  • If no nodes exist, the subcommand creates a node for the instance. The name of the node is the name of the host on which the subcommand is run.

  • If only one node exists, the subcommand creates a reference to the existing node for the instance.

  • If two or more nodes exist, an error occurs.

--nodedir

The path to the directory in which the files for instance’s node is to be stored. The default is as-install/nodes.

--config

Specifies the named configuration that the instance references. The configuration must exist and must not be named default-config or server-config. Specifying the --config option creates a shared instance.
The --config option and the --cluster option are mutually exclusive. If both options are omitted, a standalone instance is created.

--cluster

Specifies the cluster from which the instance inherits its configuration. Specifying the --cluster option creates a clustered instance.
The --config option and the --cluster option are mutually exclusive. If both options are omitted, a standalone instance is created.

--lbenabled

Specifies whether the instance is enabled for load balancing. Possible values are as follows:

true

The instance is enabled for load balancing (default).
When an instance is enabled for load balancing, a load balancer sends requests to the instance.

false

The instance is disabled for load balancing.

When an instance is disabled for load balancing, a load balancer does not send requests to the instance.

--portbase

Determines the number with which the port assignment should start. An instance uses a certain number of ports that are statically assigned. The portbase value determines where the assignment should start. The values for the ports are calculated as follows:

  • Administration port: portbase + 48

  • HTTP listener port: portbase + 80

  • HTTPS listener port: portbase + 81

  • JMS port: portbase + 76

  • IIOP listener port: portbase + 37

  • Secure IIOP listener port: portbase + 38

  • Secure IIOP with mutual authentication port: portbase + 39

  • JMX port: portbase + 86

  • JPA debugger port: portbase + 9

  • Felix shell service port for OSGi module management: portbase + 66

When the --portbase option is specified, the output of this subcommand includes a complete list of used ports.

--checkports

Specifies whether to check for the availability of the administration, HTTP, JMS, JMX, and IIOP ports. The default value is true.

--savemasterpassword

Setting this option to true allows the master password to be written to the file system. If the master password is written to the file system, the instance can be started without the need to prompt for the password. If this option is true, the --usemasterpassword option is also true, regardless of the value that is specified on the command line. Because writing the master password to the file system is an insecure practice, the default is false.
The master-password file for an instance is saved in the node directory, not the domain directory. Therefore, this option is required only for the first instance that is created for each node in a domain.

--usemasterpassword

Specifies whether the key store is encrypted with a master password that is built into the system or a user-defined master password.
If false (default), the keystore is encrypted with a well-known password that is built into the system. Encrypting the keystore with a password that is built into the system provides no additional security.
If true, the subcommand obtains the master password from the AS_ADMIN_MASTERPASSWORD entry in the password file or prompts for the master password. The password file is specified in the --passwordfile option of the asadmin(1M)utility.
If the --savemasterpassword option is true, this option is also true, regardless of the value that is specified on the command line.
The master password must be the same for all instances in a domain.

--systemproperties

Defines system properties for the instance. These properties override property definitions for port settings in the instance’s configuration. Predefined port settings must be overridden if, for example, two clustered instances reside on the same host. In this situation, port settings for one instance must be overridden because both instances share the same configuration.
The following properties are available:

ASADMIN_LISTENER_PORT

This property specifies the port number of the HTTP port or HTTPS port through which the DAS connects to the instance to manage the instance. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTP requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

HTTP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTPS requests. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_LISTENER_PORT

This property specifies the port number of the port that is used for IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used for secure IIOP connections. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

IIOP_SSL_MUTUALAUTH_PORT

This property specifies the port number of the port that is used for secure IIOP connections with client authentication. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JAVA_DEBUGGER_PORT

This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMS_PROVIDER_PORT

This property specifies the port number for the Java Message Service provider. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

JMX_SYSTEM_CONNECTOR_PORT

This property specifies the port number on which the JMX connector listens. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

OSGI_SHELL_TELNET_PORT

This property specifies the port number of the port that is used for connections to the Apache Felix Remote Shell (http://felix.apache.org/site/apache-felix-remote-shell.html). This shell uses the Felix shell service to interact with the OSGi module management subsystem. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.

Operands

instance-name

The name of the instance that is being created.
The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another Eclipse GlassFish instance, a cluster, a named configuration, or a node.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.

Examples

Example 1   Creating a Standalone Eclipse GlassFish Instance

This example creates the standalone instance il3 on the host where the command is run. The DAS is running on the same host. The instance references the only existing node.

asadmin> create-local-instance il3
Rendezvoused with DAS on localhost:4848.
Port Assignments for server instance il3:
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
ASADMIN_LISTENER_PORT=24848
JAVA_DEBUGGER_PORT=29009
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
OSGI_SHELL_TELNET_PORT=26666
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920
Command create-local-instance executed successfully.

Example 2   Creating a Clustered Eclipse GlassFish Instance on a Specific Node

This example creates the clustered instance ymli2 on node sj02. The instance is a member of the cluster ymlclust.

The command is run on the host sj02, which is the host that the node sj02 represents. The DAS is running on the host sr04 and uses the default HTTP port for administration. Because no instances exist on the node, the host on which the DAS is running is provided through the --host option of the asadmin utility.

sj02# asadmin --host sr04 create-local-instance --cluster ymlclust --node sj02 ymli2
Rendezvoused with DAS on sr04:4848.
Port Assignments for server instance ymli2:
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
ASADMIN_LISTENER_PORT=24848
JAVA_DEBUGGER_PORT=29009
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
OSGI_SHELL_TELNET_PORT=26666
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920
Command create-local-instance executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-mail-resource

Creates a Jakarta Mail session resource

Synopsis

asadmin [asadmin-options] create-mail-resource [--help]
[--target target] --mailhost hostname
--mailuser username --fromaddress address [--storeprotocol storeprotocol]
[--storeprotocolclass storeprotocolclass] [--transprotocol transprotocol]
[--transprotocolclass transprotocolclass] [--debug={false|true}] [--enabled={true|false}]
[--description resource-description] [--property (name=value)[:name=value]*] jndi-name

Description

The create-mail-resource subcommand creates a Jakarta Mail session resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target for which you are creating the Jakarta Mail session resource. Valid values are:

server

Creates the resource for the default server instance. This is the default value.

domain

Creates the resource for the domain.

cluster_name

Creates the resource for every server instance in the cluster.

instance_name

Creates the resource for a particular server instance.

--mailhost

The DNS name of the default mail server. The connect methods of the Store and Transport objects use this value if a protocol-specific host property is not supplied. The name must be resolvable to an actual host name.

--mailuser

The name of the mail account user provided when connecting to a mail server. The connect methods of the Store and Transport objects use this value if a protocol-specific username property is not supplied.

--fromaddress

The email address of the default user, in the form username`@host.`domain.

--storeprotocol

The mail server store protocol. The default is imap. Change this value only if you have reconfigured the Eclipse GlassFish’s mail provider to use a non-default store protocol.

--storeprotocolclass

The mail server store protocol class name. The default is com.sun.mail.imap.IMAPStore. Change this value only if you have reconfigured the Eclipse GlassFish’s mail provider to use a nondefault store protocol.

--transprotocol

The mail server transport protocol. The default is smtp. Change this value only if you have reconfigured the Eclipse GlassFish’s mail provider to use a nondefault transport protocol.

--transprotocolclass

The mail server transport protocol class name. The default is com.sun.mail.smtp.SMTPTransport. Change this value only if you have reconfigured the Eclipse GlassFish’s mail provider to use a nondefault transport protocol.

--debug

If set to true, the server starts up in debug mode for this resource. If the Jakarta Mail log level is set to FINE or FINER, the debugging output will be generated and will be included in the server log file. The default value is false.

--enabled

If set to true, the resource is enabled at runtime. The default value is true.

--description

Text providing some details of the Jakarta Mail resource.

--property

Optional attribute name/value pairs for configuring the Jakarta Mail resource. The Eclipse GlassFish-specific mail- prefix is converted to the standard mail prefix. The Jakarta Mail API documentation lists the properties you might want to set.

Operands

jndi-name

The JNDI name of the Jakarta Mail resource to be created. It is a recommended practice to use the naming subcontext prefix mail/ for Jakarta Mail resources.

Examples

Example 1   Creating a Jakarta Mail Resource

This example creates a Jakarta Mail resource named mail/MyMailSession. The JNDI name for a Jakarta Mail session resource customarily includes the mail/ naming subcontext.

asadmin> create-mail-resource --mailhost localhost
--mailuser sample --fromaddress sample@sun.com mail/MyMailSession
Command create-mail-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-managed-executor-service

Creates a managed executor service resource

Synopsis

asadmin [asadmin-options] create-managed-executor-service [--help]
[--enabled={false|true}]
[--contextinfoenabled={false|true}]
[--contextinfo={Classloader|JNDI|Security|WorkArea}]
[--threadpriority threadpriority]
[--longrunningtasks={false|true}]
[--hungafterseconds hungafterseconds]
[--hungloggerprintonce={false|true}]
[--hungloggerinitialdelayseconds hungloggerinitialdelayseconds]
[--hungloggerintervalseconds hungloggerintervalseconds]
[--corepoolsize corepoolsize]
[--maximumpoolsize maximumpoolsize]
[--keepaliveseconds keepaliveseconds]
[--threadlifetimeseconds threadlifetimeseconds]
[--taskqueuecapacity taskqueuecapacity]
[--description description]
[--property property]
[--target target]
jndi_name

Description

The create-managed-executor-service subcommand creates a managed executor service resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--enabled

Determines whether the resource is enabled at runtime. The default value is true.

--contextinfoenabled

Determines whether container contexts are propagated to threads. If set to true, the contexts specified in the --contextinfo option are propagated. If set to false, no contexts are propagated and the --contextinfo option is ignored. The default value is true.

--contextinfo

Specifies individual container contexts to propagate to threads. Valid values are Classloader, JNDI, Security, and WorkArea. Values are specified in a comma-separated list and are case-insensitive. All contexts are propagated by default.

--threadpriority

Specifies the priority to assign to created threads. The default value is 5.

--longrunningtasks

Specifies whether the resource should be used for long-running tasks. The default value is false. If set to true, long-running tasks are not reported as stuck.

--hungafterseconds

Specifies the number of seconds that a task can execute before it is considered unresponsive. The default value is 0, which means that tasks are never considered unresponsive.

--hungloggerprintonce

Specifies whether to print the warning message once or repeatedly. The default value is false. If set to true, the warning message is printed only once when detect a hung task exceeds "hungafterseconds".

--hungloggerinitialdelayseconds

Specifies the number of seconds to delay logging the detection of hung tasks. The default value is 60.

--hungloggerintervalseconds

Specifies the number of seconds between logging the detection of hung tasks. The default value is 60.

--corepoolsize

Specifies the number of threads to keep in a thread pool, even if they are idle. The default value is 0.
When a new task is submitted and the number of running threads is less than corepoolsize, a new thread is created to handle the request. When the value for corepoolsize is 0 (the default), new threads are never created unless the task queue is full or the resource is using direct queuing. Direct queuing occurs when taskqueuecapacity is 0, or when taskqueuecapacity is 2147483647 and corepoolsize is 0.

--maximumpoolsize

Specifies the maximum number of threads that a thread pool can contain. The default value is 2147483647, which means that the thread pool is essentially unbounded and can contain any number of threads.

--keepaliveseconds

Specifies the number of seconds that threads can remain idle when the number of threads is greater than corepoolsize. The default value is 60.

--threadlifetimeseconds

Specifies the number of seconds that threads can remain in a thread pool before being purged, regardless of whether the number of threads is greater than corepoolsize or whether the threads are idle. The default value is 0, which means that threads are never purged.

--taskqueuecapacity

Specifies the number of submitted tasks that can be stored in the task queue awaiting execution. The default value is 2147483647, which means that the task queue is essentially unbounded and can store any number of submitted tasks.

--description

Descriptive details about the resource.

--property

Optional attribute name/value pairs for configuring the resource.
Eclipse GlassFish does not define any additional properties for this resource. Moreover, this resource does not currently use any additional properties.

--target

Specifies the target for which you are creating the resource. Valid targets are:

server

Creates the resource for the default server instance. This is the default value.

domain

Creates the resource for the domain.

cluster_name

Creates the resource for every server instance in the specified cluster.

instance_name

Creates the resource for the specified server instance.

Operands

jndi_name

The JNDI name of this resource.

Examples

Example 1   Creating a Managed Executor Service Resource

This example creates a managed executor service resource named concurrent/myExecutor.

asadmin> create-managed-executor-service concurrent/myExecutor
Managed executor service concurrent/myExecutor created successfully.
Command create-managed-executor-service executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-managed-scheduled-executor-service

Creates a managed scheduled executor service resource

Synopsis

asadmin [asadmin-options] create-managed-scheduled-executor-service [--help]
[--enabled={false|true}]
[--contextinfoenabled={false|true}]
[--contextinfo={Classloader|JNDI|Security|WorkArea}]
[--threadpriority threadpriority]
[--longrunningtasks={false|true}]
[--hungafterseconds hungafterseconds]
[--hungloggerprintonce={false|true}]
[--hungloggerinitialdelayseconds hungloggerinitialdelayseconds]
[--hungloggerintervalseconds hungloggerintervalseconds]
[--corepoolsize corepoolsize]
[--keepaliveseconds keepaliveseconds]
[--threadlifetimeseconds threadlifetimeseconds]
[--description description]
[--property property]
[--target target]
jndi_name

Description

The create-managed-scheduled-executor-service subcommand creates a managed scheduled executor service resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--enabled

Determines whether the resource is enabled at runtime. The default value is true.

--contextinfoenabled

Determines whether container contexts are propagated to threads. If set to true, the contexts specified in the --contextinfo option are propagated. If set to false, no contexts are propagated and the --contextinfo option is ignored. The default value is true.

--contextinfo

Specifies individual container contexts to propagate to threads. Valid values are Classloader, JNDI, Security, and WorkArea. Values are specified in a comma-separated list and are case-insensitive. All contexts are propagated by default.

--threadpriority

Specifies the priority to assign to created threads. The default value is 5.

--longrunningtasks

Specifies whether the resource should be used for long-running tasks. The default value is false. If set to true, long-running tasks are not reported as stuck.

--hungafterseconds

Specifies the number of seconds that a task can execute before it is considered unresponsive. The default value is 0, which means that tasks are never considered unresponsive.

--hungloggerprintonce

Specifies whether to print the warning message once or repeatedly. The default value is false. If set to true, the warning message is printed only once when detect a hung task exceeds "hungafterseconds".

--hungloggerinitialdelayseconds

Specifies the number of seconds to delay logging the detection of hung tasks. The default value is 60.

--hungloggerintervalseconds

Specifies the number of seconds between logging the detection of hung tasks. The default value is 60.

--corepoolsize

Specifies the number of threads to keep in a thread pool, even if they are idle. The default value is 0, which means that a thread is created when the first task is scheduled.

--keepaliveseconds

Specifies the number of seconds that threads can remain idle when the number of threads is greater than corepoolsize. The default value is 60.

--threadlifetimeseconds

Specifies the number of seconds that threads can remain in a thread pool before being purged, regardless of whether the number of threads is greater than corepoolsize or whether the threads are idle. The default value is 0, which means that threads are never purged.

--description

Descriptive details about the resource.

--property

Optional attribute name/value pairs for configuring the resource.
Eclipse GlassFish does not define any additional properties for this resource. Moreover, this resource does not currently use any additional properties.

--target

Specifies the target for which you are creating the resource. Valid targets are:

server

Creates the resource for the default server instance. This is the default value.

domain

Creates the resource for the domain.

cluster_name

Creates the resource for every server instance in the specified cluster.

instance_name

Creates the resource for the specified server instance.

Operands

jndi_name

The JNDI name of this resource.

Examples

Example 1   Creating a Managed Scheduled Executor Service Resource

This example creates a managed scheduled executor service resource named concurrent/myScheduledExecutor.

asadmin> create-managed-scheduled-executor-service concurrent/myScheduledExecutor
Managed scheduled executor service concurrent/myScheduledExecutor created successfully.
Command create-managed-scheduled-executor-service executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-managed-thread-factory

Creates a managed thread factory resource

Synopsis

asadmin [asadmin-options] create-managed-thread-factory [--help]
[--enabled={false|true}]
[--contextinfoenabled={false|true}]
[--contextinfo={Classloader|JNDI|Security|WorkArea}]
[--threadpriority threadpriority]
[--description description]
[--property property]
[--target target]
jndi_name

Description

The create-managed-thread-factory subcommand creates a managed thread factory resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--enabled

Determines whether the managed thread factory is enabled at runtime. The default value is true.

--contextinfoenabled

Determines whether container contexts are propagated to threads. If set to true, the contexts specified in the --contextinfo option are propagated. If set to false, no contexts are propagated and the --contextinfo option is ignored. The default value is true.

--contextinfo

Specifies individual container contexts to propagate to threads. Valid values are Classloader, JNDI, Security, and WorkArea. Values are specified in a comma-separated list and are case-insensitive. All contexts are propagated by default.

--threadpriority

Specifies the priority to assign to created threads. The default value is 5.

--description

Descriptive details about the resource.

--property

Optional attribute name/value pairs for configuring the resource.
Eclipse GlassFish does not define any additional properties for this resource. Moreover, this resource does not currently use any additional properties.

--target

Specifies the target for which you are creating the resource. Valid targets are:

server

Creates the resource for the default server instance. This is the default value.

domain

Creates the resource for the domain.

cluster_name

Creates the resource for every server instance in the specified cluster.

instance_name

Creates the resource for the specified server instance.

Operands

jndi_name

The JNDI name of this resource.

Examples

Example 1   Creating a Managed Thread Factory Resource

This example creates a managed thread factory resource named concurrent/myThreadFactory.

asadmin> create-managed-thread-factory concurrent/myThreadFactory
Managed thread factory concurrent/myThreadFactory created successfully.
Command create-managed-thread-factory executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-message-security-provider

Enables administrators to create a message security provider, which specifies how SOAP messages will be secured.

Synopsis

asadmin [asadmin-options] create-message-security-provider [--help]
[--target target]
--classname provider_class
[--layer message_layer] [--providertype provider_type]
[--requestauthsource request_auth_source ]
[--requestauthrecipient request_auth_recipient ]
[--responseauthsource response_auth_source ]
[--responseauthrecipient response_auth_recipient ]
[--isdefaultprovider] [--property name=value[:name=value]*]
provider_name

Description

The create-message-security-provider subcommand enables the administrator to create a message security provider for the security service which specifies how SOAP messages will be secured.

This command is supported in remote mode only.

Options

If an option has a short option name, then the short option precedes the long option name. Short options have one dash whereas long options have two dashes.

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target for which you are creating the message security provider. The following values are valid:

server

Creates the provider for the default server instance server and is the default value.

domain

Creates the provider for the domain.

cluster_name

Creates the provider for every server instance in the cluster.

instance_name

Creates the provider for a particular sever instance.

--classname

Defines the Java implementation class of the provider. Client authentication providers must implement the com.sun.enterprise. security.jauth.ClientAuthModule interface. Server-side providers must implement the com.sun.enterprise.security jauth.ServerAuthModule interface. A provider may implement both interfaces, but it must implement the interface corresponding to its provider type.

--layer

The message-layer entity used to define the value of the auth-layer attribute of message-security-config elements. The default is HttpServlet. Another option is SOAP.

--providertype

Establishes whether the provider is to be used as client authentication provider, server authentication provider, or both. Valid options for this property include client, server, or client-server.

--requestauthsource

The auth-source attribute defines a requirement for message-layer sender authentication (e.g. username password) or content authentication (e.g. digital signature) to be applied to request messages. Possible values are sender or content. When this argument is not specified, source authentication of the request is not required.

--requestauthrecipient

The auth-recipient attribute defines a requirement for message-layer authentication of the receiver of a message to its sender (e.g. by XML encryption). Possible values are before-content or after-content. The default value is after-content.

--responseauthsource

The auth-source attribute defines a requirement for message-layer sender authentication (e.g. username password) or content authentication (e.g. digital signature) to be applied to response messages. Possible values are sender or content. When this option is not specified, source authentication of the response is not required.

--responseauthrecipient

The auth-recipient attribute defines a requirement for message-layer authentication of the receiver of the response message to its sender (e.g. by XML encryption). Possible values are before-content or after-content. The default value is after-content.

--isdefaultprovider

The default-provider attribute is used to designate the provider as the default provider (at the layer) of the type or types identified by the providertype argument. There is no default associated with this option.

--property

Use this property to pass provider-specific property values to the provider when it is initialized. Properties passed in this way might include key aliases to be used by the provider to get keys from keystores, signing, canonicalization, encryption algorithms, etc.
The following properties may be set:

security.config

Specifies the location of the message security configuration file. To point to a configuration file in the domain-dir/config directory, use the system property ${com.sun.aas.instanceRoot}/config/, for example: ${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml. The default is domain-dir`/config/ wss-serverconfig-1.0.xml`.

debug

If true, enables dumping of server provider debug messages to the server log. The default is false.

dynamic.username. password

If true, signals the provider runtime to collect the user name and password from the CallbackHandler for each request. If false, the user name and password for wsse:UsernameToken(s) is collected once, during module initialization. This property is only applicable for a ClientAuthModule. The default is false.

encryption.key.alias

Specifies the encryption key used by the provider. The key is identified by its keystore alias. The default value is s1as.

signature.key.alias

Specifies the signature key used by the provider. The key is identified by its keystore alias. The default value is s1as.

Operands

provider_name

The name of the provider used to reference the provider-config element.

Examples

Example 1   Creating a Message Security Provider

The following example shows how to create a message security provider for a client.

asadmin> create-message-security-provider
--classname com.sun.enterprise.security.jauth.ClientAuthModule
--providertype client mySecurityProvider

Exit Status

0

command executed successfully

1

error in executing the command

create-module-config

Adds the default configuration of a module to domain.xml

Synopsis

asadmin [asadmin-options] create-module-config [--help]
[--dryrun={false|true}]
[--all={false|true}]
[--target target]
[service_name]

Description

The create-module-config subcommand adds the default configuration of a module to domain.xml.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--dryrun

Displays the default configuration of a module but does not add it to domain.xml. The default value is false.

--all

Adds all default configurations of modules to domain.xml if they are not already in it. The default value is false.

--target

Specifies the target to which the default configuration is being added. Possible values are as follows:

server

Adds the default configuration to the default server instance. This is the default value.

domain

Adds the default configuration to the default domain.

cluster-name

Adds the default configuration to every server instance in the specified cluster.

instance-name

Adds the default configuration to the specified instance.

Operands

service_name

The name of the module for which the default configuration is to be added.

Examples

Example 1   Adding a Default Configuration to domain.xml

This example adds the default configuration of the web container module to domain1 in server-config (the default configuration). Use the --dryrun option to preview the configuration before it is added.

asadmin> create-module-config web-container
Command create-module-config executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-network-listener

Adds a new network listener socket

Synopsis

asadmin [asadmin-options] create-network-listener [--help]
[--address address]
--listenerport listener-port
[--threadpool thread-pool]
--protocol protocol
[--transport transport]
[--enabled={true|false}]
[--jkenabled={false|true}]
[--target target]
listener-name

Description

The create-network-listener subcommand creates a network listener. This subcommand is supported in remote mode only.

If you edit the special network listener named admin-listener, you must restart the server for the changes to take effect. The Administration Console does not tell you that a restart is required in this case.

You can use the create-http-listener subcommand to create a network listener that uses the HTTP protocol without having to first create a protocol, transport, or HTTP configuration. This subcommand is a convenient shortcut, but it gives access to only a limited number of options.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--address

The IP address or the hostname (resolvable by DNS).

--listenerport

The port number to create the listen socket on. Legal values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges. Configuring an SSL listen socket to listen on port 443 is standard.

--threadpool

The name of the thread pool for this listener. Specifying a thread pool is optional. The default is http-thread-pool.

--protocol

The name of the protocol for this listener.

--transport

The name of the transport for this listener. Specifying a transport is optional. The default is tcp.

--enabled

If set to true, the default, the listener is enabled at runtime.

--jkenabled

If set to true, mod_jk is enabled for this listener. The default is false.

--target

Creates the network listener only on the specified target. Valid values are as follows:

server

Creates the network listener on the default server instance. This is the default value.

configuration-name

Creates the network listener in the specified configuration.

cluster-name

Creates the network listener on all server instances in the specified cluster.

standalone-instance-name

Creates the network listener on the specified standalone server instance.

Operands

listener-name

The name of the network listener.

Examples

Example 1   Creating a Network Listener

The following command creates a network listener named sampleListener that is not enabled at runtime:

asadmin> create-network-listener --listenerport 7272 protocol http-1
--enabled=false sampleListener
Command create-network-listener executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-node-config

Creates a node that is not enabled for remote communication

Synopsis

asadmin [asadmin-options] create-node-config [--help]
[--nodehost node-host]
[--installdir as-install-parent] [--nodedir node-dir] node-name

Description

The create-node-config subcommand creates a node that is not enabled for remote communication. The create-node-config subcommand does not require the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured to create the node.

A node represents a host on which the Eclipse GlassFish software is installed. A node must exist for every host on which Eclipse GlassFish instances reside.

To represent the host where the DAS is running, Eclipse GlassFish provides the predefined node localhost-domain. The predefined node localhost-domain is not enabled for remote communication.

All administration of instances on a node that is not enabled for remote communication must be performed on the host that the node represents. The domain administration server (DAS) on a remote host cannot contact the node. To administer instances on a node that represents a host that is remote from the DAS, you must use the following subcommands:

However, you may use stop-local-instance(1) or stop-instance(1) to stop the instances.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--nodehost

The name of the host that the node represents. If this option is omitted, no host is specified for the node.

--installdir

The full path to the parent of the base installation directory of the Eclipse GlassFish software on the host, for example, /export/glassfish7/. If this option is omitted, no parent of the base installation directory of the Eclipse GlassFish software is specified for the node.

--nodedir

The path to the directory that is to contain Eclipse GlassFish instances that are created on the node. If a relative path is specified, the path is relative to the as-install directory. If this option is omitted, no directory for instances is specified for the node.

Operands

node-name

The name of the node.
The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another node, a cluster, a named configuration, or a Eclipse GlassFish instance.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.

Examples

Example 1   Creating a Node That Is Not Enabled for Remote Communication

This example creates the node sj03 for host sj03.example.com. The node is not enabled for remote communication.

asadmin> create-node-config --nodehost sj03.example.com sj03

Command create-node-config executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-node-dcom

Creates a node that is enabled for communication over DCOM

Synopsis

asadmin [asadmin-options] create-node-dcom [--help]
--nodehost node-host
[--installdir as-install-parent] [--nodedir node-dir]
[--windowsuser windows-user] [--windowsdomain windows-domain]
[--force={false|true}]
[--install={false|true}] [--archive archive]
node-name

Description

The create-node-dcom subcommand creates a node that is enabled for communication over the Distributed Component Object Model (DCOM) remote protocol. The DCOM protocol is available only on Windows systems.

A node represents a host on which the Eclipse GlassFish software is installed. A node must exist for every host on which Eclipse GlassFish instances reside.

In a DCOM-enabled network, the domain administration server (DAS) contacts a node’s host through the DCOM connector to manage Eclipse GlassFish instances that reside on the node. DCOM is used only for communications between hosts. DCOM is never used for communications within a single host.

By default, the subcommand fails and the node is not created if the DAS cannot contact the node’s host through DCOM. To force the node to be created in the DAS configuration even if the host cannot be contacted through DCOM, set the --force option to true.

The create-node-dcom subcommand cannot create a node that represents the local host, that is, the host on which the subcommand is run. The subcommand fails regardless of how the local host is specified, for example, by using the keyword localhost, the Internet Protocol (IP) address of the host, or the host name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--nodehost

The name of the host that the node represents. The name of the host must be specified. Otherwise, an error occurs.

--installdir

The full path to the parent of the base installation directory of the Eclipse GlassFish software on the host, for example, C:\glassfish7. The default is the parent of the default base installation directory of the Eclipse GlassFish software for the DAS. This default is useful only if Eclipse GlassFish is installed in the same location on all hosts.

--nodedir

The path to the directory that is to contain Eclipse GlassFish instances that are created on the node. The default is as-install`\nodes`, where as-install is the base installation directory of the Eclipse GlassFish software on the host. If a relative path is specified, the path is relative to the as-install directory.

--windowsuser
-w

The user on this node’s host that is to run the process for connecting to the host through DCOM. The default is the user that is running the DAS process. If the --nodehost option is set to localhost-domain, the --windowsuser option is ignored

--windowsdomain
-d

The name of the Windows domain that contains the user that the --windowsuser option specifies. The default is the name of the host on which the subcommand is run.

--force

Specifies whether the node is created in the DAS configuration even if validation of the node’s parameters fails. To validate a node’s parameters, the DAS must be able to contact the node’s host through DCOM. Possible values are as follows:

false

The node is not created if validation of the node’s parameters fails (default).

true

The node is created even if validation of the node’s parameters fails.

--install

Specifies whether the subcommand shall install the Eclipse GlassFish software on the host that the node represents.
Possible values are as follows:

false

The subcommand shall not install the Eclipse GlassFish software on the host (default).

true

The subcommand shall install the Eclipse GlassFish software on the host.

--archive

The absolute path to the archive file of the Eclipse GlassFish software that is to be installed. If this option is omitted and the --install is true, the subcommand creates a ZIP archive of the Eclipse GlassFish software from the installation where this subcommand is run. The archive does not contain the domains directory or the nodes directory.

Operands

node-name

The name of the node.
The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another node, a cluster, a named configuration, or a Eclipse GlassFish instance.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.

Examples

Example 1   Creating a Node

This example creates the node wpmdl1 for the host wpmdl1.example.com. By default, the parent of the base installation directory of the Eclipse GlassFish software is C:\glassfish7.

asadmin> create-node-dcom
--nodehost wpmdl1.example.com wpmdl1
Command create-node-dcom executed successfully.

Example 2   Creating a Node With a Specific Installation Directory

This example creates the node wyml1 for the host wyml1.example.com. The parent of the base installation directory of the Eclipse GlassFish software on this host is C:\middleware\glassfish7.

asadmin> create-node-dcom --installdir C:\middleware\glassfish7
--nodehost wyml1.example.com wyml1
Command create-node-dcom executed successfully.

Example 3   Forcing the Creation of a Node

This example forces the creation of node xkyd for the host xkyd.example.com. The node is created despite the failure of the DAS to contact the host xkyd.example.com to validate the node’s parameters.

asadmin> create-node-dcom --force --nodehost xkyd.example.com xkyd
Warning: some parameters appear to be invalid.
com.sun.enterprise.universal.process.WindowsException: Connection in error
Continuing with node creation due to use of --force.
Command create-node-dcom executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-node-ssh

Creates a node that is enabled for communication over SSH

Synopsis

asadmin [asadmin-options] create-node-ssh [--help]
--nodehost node-host
[--installdir as-install-parent] [--nodedir node-dir]
[--sshport ssh-port] [--sshuser ssh-user]
[--sshkeyfile ssh-keyfile]
[--force={false|true}]
[--install={false|true}] [--archive archive]
node-name

Description

The create-node-ssh subcommand creates a node that is enabled for communication over secure shell (SSH).

A node represents a host on which the Eclipse GlassFish software is installed. A node must exist for every host on which Eclipse GlassFish instances reside.

The domain administration server (DAS) contacts an SSH node’s host through the SSH connector to manage Eclipse GlassFish instances that reside on the node. However, the DAS does not use the SSH connector to contact the host where the DAS is running because the DAS can run all asadmin subcommands locally.

By default, the subcommand fails and the node is not created if the DAS cannot contact the node’s host through SSH. To force the node to be created in the DAS configuration even if the host cannot be contacted through SSH, set the --force option to true.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--nodehost

The name of the host that the node represents. The name of the host must be specified. Otherwise, an error occurs.

--installdir

The full path to the parent of the base installation directory of the Eclipse GlassFish software on the host, for example, /export/glassfish7/. The default is the parent of the default base installation directory of the Eclipse GlassFish software for the DAS. This default is useful only if Eclipse GlassFish is installed in the same location on all hosts.

--nodedir

The path to the directory that is to contain Eclipse GlassFish instances that are created on the node. The default is as-install/nodes, where as-install is the base installation directory of the Eclipse GlassFish software on the host. If a relative path is specified, the path is relative to the as-install directory.

--sshport

The port to use for SSH connections to this node’s host. The default is 22. If the --nodehost option is set to localhost-domain, the --sshport option is ignored.

--sshuser

The user on this node’s host that is to run the process for connecting to the host through SSH. The default is the user that is running the DAS process. To ensure that the DAS can read this user’s SSH private key file, specify the user that is running the DAS process. If the --nodehost option is set to localhost-domain, the --sshuser option is ignored.

--sshkeyfile

The absolute path to the SSH private key file for user that the --sshuser option specifies. This file is used for authentication to the sshd daemon on the node’s host.

Eclipse GlassFish also supports password authentication through the AS_ADMIN_SSHPASSWORD entry in the password file. The password file is specified in the --paswordfile option of the asadmin(1M) utility.

If the SSH private key file is protected by a passphrase, the password file must contain the AS_ADMIN_SSHKEYPASSPHRASE entry.
The path to the key file must be reachable by the DAS and the key file must be readable by the DAS.
The default is the a key file in the user’s .ssh directory. If multiple key files are found, the subcommand uses the following order of preference:

  1. id_rsa

  2. id_dsa

  3. identity

--force

Specifies whether the node is created in the DAS configuration even if validation of the node’s parameters fails. To validate a node’s parameters, the DAS must be able to contact the node’s host through SSH. Possible values are as follows:

false

The node is not created if validation of the node’s parameters fails (default).

true

The node is created even if validation of the node’s parameters fails.

--install

Specifies whether the subcommand shall install the Eclipse GlassFish software on the host that the node represents.
Possible values are as follows:

false

The subcommand shall not install the Eclipse GlassFish software on the host (default).

true

The subcommand shall install the Eclipse GlassFish software on the host.

--archive

The absolute path to the archive file of the Eclipse GlassFish software that is to be installed. If this option is omitted and the --install is true, the subcommand creates a ZIP archive of the Eclipse GlassFish software from the installation where this subcommand is run. The archive does not contain the domains directory or the nodes directory.

Operands

node-name

The name of the node.
The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another node, a cluster, a named configuration, or a Eclipse GlassFish instance.

  • The name must not be domain, server, or any other keyword that is reserved by Eclipse GlassFish.

Examples

Example 1   Creating a Node

This example creates the node adc for the host adc.example.com. By default, the parent of the base installation directory of the Eclipse GlassFish software is /export/glassfish7.

asadmin> create-node-ssh
--nodehost adc.example.com
--installdir /export/glassfish7 adc

Command create-node-ssh executed successfully.

Example 2   Forcing the Creation of a Node

This example forces the creation of node eg1 for the host eghost.example.com. The node is created despite the failure of the DAS to contact the host eghost.example.com to validate the node’s parameters.

asadmin> create-node-ssh --force --nodehost eghost.example.com eg1
Warning: some parameters appear to be invalid.
Could not connect to host eghost.example.com using SSH.
There was a problem while connecting to eghost.example.com:22
eghost.example.com
Continuing with node creation due to use of --force.

Command create-node-ssh executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-password-alias

Creates a password alias

Synopsis

asadmin [asadmin-options] create-password-alias [--help]
aliasname

Description

The create-password-alias subcommand creates an alias for a password. An alias is a token of the form ${ALIAS=aliasname}. The password that corresponds to the alias name is stored in an encrypted form.

The create-password-alias subcommand can be run interactively or noninteractively.

  • When run interactively, the subcommand prompts the user for the alias password and to confirm the alias password.

  • When run noninteractively, the subcommand reads the alias password from a file that is passed through the --passwordfile option of the asadmin(1M) utility. The file must contain an entry of the form `{cprefix}ALIASPASSWORD=`alias-password, where alias-password is the alias password. The noninteractive form of this command is suitable for use in scripts.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

aliasname

Your choice of name for the password alias.

Examples

Example 1   Creating a Password Alias Interactively

This example creates the password alias jmspassword-alias interactively.

asadmin> create-password-alias jmspassword-alias
Enter the alias password>
Enter the alias password again>
Command create-password-alias executed successfully.

Example 2   Creating a Password Alias Noninteractively

This example uses the --passwordfile option of the asadmin utility to create the password alias winuser noninteractively.

$ asadmin --passwordfile aspwfile.txt create-password-alias winuser
Command create-password-alias executed successfully.

The file aspwfile.txt contains the following entry to specify the alias password:

AS_ADMIN_ALIASPASSWORD=sp@rky

Exit Status

0

command executed successfully

1

error in executing the command

create-profiler

Creates the profiler element

Synopsis

asadmin [asadmin-options] create-profiler [--help]
[--target target_name]
[--classpath classpath] [--nativelibpath native_library_path] [--enabled=true]
[--property(name=value)[:name=value]*] profiler_name

Description

The create-profiler subcommand creates the profiler element. A server instance is tied to the profiler by the profiler element in the Java configuration. Only one profiler exists at a time. If you attempt to create a profiler while one already exists, an error message is displayed.

For changes to take effect, the server must restarted.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target on which you are creating a profiler. Valid values are

server

Creates the profiler for the default server instance. This is the default value.

configuration_name

Creates the profiler for the named configuration

cluster_name

Creates the profiler for every server instance in the cluster

instance_name

Creates the profiler for a particular server instance

--classpath

Java classpath string that specifies the classes needed by the profiler.

--nativelibpath

This path is automatically constructed to be a concatenation of the Eclipse GlassFish installation relative path for its native shared libraries, standard JRE native library path, the shell environment setting (LD_LIBRARY_PATH on UNIX) and any path that may be specified in the profile element.

--enabled

Profiler is enabled by default.

--property

Name/value pairs of provider-specific attributes.

Operands

profiler_name

Name of the profiler.

Examples

Example 1   Creating a Profiler

This example creates a profiler named sample_profiler.

asadmin> create-profiler --classpath /home/appserver/
--nativelibpath /u/home/lib --enabled=false
--property defaultuser=admin:password=adminadmin sample_profiler
Created Profiler with id = sample_profiler

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-protocol

Adds a new protocol

Synopsis

asadmin [asadmin-options] create-protocol [--help]
[--securityenabled={false|true}]
[--target target]
protocol-name

Description

The create-protocol subcommand creates a protocol. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--securityenabled

If set to true, the protocol runs SSL. You can turn SSL2 or SSL3 ON or OFF and set ciphers using an ssl element. The security setting globally enables or disables SSL by making certificates available to the server instance. The default value is false.

--target

Creates the protocol only on the specified target. Valid values are as follows:

server

Creates the protocol on the default server instance. This is the default value.

configuration-name

Creates the protocol in the specified configuration.

cluster-name

Creates the protocol on all server instances in the specified cluster.

standalone-instance-name

Creates the protocol on the specified standalone server instance.

Operands

protocol-name

The name of the protocol.

Examples

Example 1   Creating a Protocol

The following command creates a protocol named http-1 with security enabled:

asadmin> create-protocol --securityenabled=true http-1
Command create-protocol executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-protocol-filter

Adds a new protocol filter

Synopsis

asadmin [asadmin-options] create-protocol-filter [--help]
--protocol protocol-name
--classname class-name
[--target server]
protocol-filter-name

Description

The create-protocol-filter subcommand creates a protocol filter for a protocol. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--protocol

The name of the associated protocol.

--classname

The fully qualified name of the Java class that implements the protocol filter.

--target

Creates the protocol filter only on the specified target. Valid values are as follows:

server

Creates the protocol filter on the default server instance. This is the default value.

configuration-name

Creates the protocol filter in the specified configuration.

cluster-name

Creates the protocol filter on all server instances in the specified cluster.

standalone-instance-name

Creates the protocol filter on the specified standalone server instance.

Operands

protocol-filter-name

The name of the protocol filter.

Examples

Example 1   Creating a Protocol Filter

The following command creates a protocol filter named http1-filter:

asadmin> create-protocol-filter --protocol http1
--classname com.company22.MyProtocolFilter http1-filter
Command create-protocol-filter executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-protocol-finder

Adds a new protocol finder

Synopsis

asadmin [asadmin-options] create-protocol-finder [--help]
--protocol protocol-name
--targetprotocol target-protocol-name
--classname class-name
[--target server]
protocol-finder-name

Description

The create-protocol-finder subcommand creates a protocol finder for a protocol. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--protocol

The name of the associated protocol.

--targetprotocol

The name of the target protocol.

--classname

The fully qualified name of the Java class that implements the protocol finder.

--target

Creates the protocol finder only on the specified target. Valid values are as follows:

server

Creates the protocol finder on the default server instance. This is the default value.

configuration-name

Creates the protocol finder in the specified configuration.

cluster-name

Creates the protocol finder on all server instances in the specified cluster.

standalone-instance-name

Creates the protocol finder on the specified standalone server instance.

Operands

protocol-finder-name

The name of the protocol finder.

Exit Status

0

command executed successfully

1

error in executing the command

create-resource-adapter-config

Creates the configuration information for the connector module

Synopsis

asadmin [asadmin-options] create-resource-adapter-config [--help]
[--threadpoolid threadpool]
[--objecttype object-type]
[--property (property-name=value)[:name=value]*]
raname

Description

The create-resource-adapter-config subcommand creates configuration information for the connector module. This subcommand can be run before deploying a resource adapter, so that the configuration information is available at the time of deployment. The resource adapter configuration can also be created after the resource adapter is deployed. In this case, the resource adapter is restarted with the new configuration. You must first create a thread pool, using the create-threadpool subcommand, and then identify that thread pool value as the ID in the --threadpoolid option.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option has been deprecated.

--threadpoolid

The thread pool ID from which the work manager gets the thread. This option takes only one thread pool ID.

--objecttype

The default is user.

--property

Keyword-value pairs that specify additional configuration properties of the resource adapter Java bean. The keyword-value pairs are separated by a colon (:). The properties are the names of setter methods of the class that is referenced by the resourceadapter-class element in the ra.xml file.

Operands

raname

Indicates the connector module name. It is the value of the resource-adapter-name in the domain.xml file.

Examples

Example 1   Creating a Resource Adapter Con figuration

This example creates a resource adapter configuration for ra1.

asadmin> create-resource-adapter-config --property foo=bar --threadpoolid
mycustomerthreadpool ra1
Command create-resource-adapter-config executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-resource-ref

Creates a reference to a resource

Synopsis

asadmin [asadmin-options] create-resource-ref [--help]
[--target target]
[--enabled={false|true}] reference_name

Description

The create-resource-ref subcommand creates a reference from a cluster or an unclustered server instance to a previously created resource, for example, a JDBC resource created by using the create-jdbc-resource subcommand. This effectively results in the resource being made available in the JNDI tree of the 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 receive the new resource the next time they start.

A resource-ref can only be created for bindable resources, such as a jdbc-resource, connector-resource, admin-object-resource, mail-resource, custom-resource, or jndi-resource.

A jdbc-connection-pool or a connector-connection-pool are not referred to directly by applications. Instead, they are referred to through a jdbc-resource or connector-resource, respectively.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target for which you are creating the resource reference. Valid targets are as follows:

server

Creates the resource reference for the default server instance. This is the default target.

cluster_name

Creates the resource reference for every server instance in the cluster.

instance_name

Creates the resource reference for the named unclustered server instance.

--enabled

Indicates whether the resource should be enabled. This value will take effect only if the resource is enabled at the global level. The default is true.

Operands

reference_name

The name or JNDI name of the resource.

Examples

Example 1   Creating a Reference to a JMS Destination Resource

This example creates a reference to the JMS destination resource jms/Topic on the cluster Cluster1.

asadmin> create-resource-ref --target Cluster1 jms/Topic
resource-ref jms/Topic created successfully.
Command create-resource-ref executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-service

Configures the starting of a DAS or a Eclipse GlassFish instance on an unattended boot

Synopsis

asadmin [asadmin-options] create-service [--help]
[--name service-name]
[--serviceproperties service-properties]
[--dry-run={false|true}] [--force={false|true}]
[--serviceuser service-user]
[--domaindir domain-dir]
[--nodedir node-dir] [--node node]
[domain-or-instance-name]

Description

The create-service subcommand configures the starting of a domain administration server (DAS) or a Eclipse GlassFish instance on an unattended boot on Windows, Linux, and Oracle Solaris systems.

If no operand is specified and the domains directory contains only one domain, the subcommand configures the starting of the DAS for the default domain. If no operand is specified and the domains directory contains multiple domains, an error occurs.

If the operand specifies an instance, the create-service subcommand does not contact the domain administration server (DAS) to determine the node on which the instance resides. To determine the node on which the instance resides, the subcommand searches the directory that contains the node directories. If multiple node directories exist, the node must be specified as an option of the subcommand.

The subcommand contains internal logic to determine whether the supplied operand is a DAS or an instance.

This subcommand is supported in local mode only.

Behavior of create-service on Windows Systems

On Windows systems, the create-service subcommand creates a Windows service to represent the DAS or instance. The service is created in the automatic state. After this subcommand creates the service, you must use the Windows Services Manager or the Windows Services Wrapper to start, stop, uninstall, or install the service.

On Windows systems, this subcommand must be run as the OS-level administrator user.

The subcommand creates the following Windows Services Wrapper files for the service in the domain-dir\bin directory or the instance-dir\bin directory:

  • Configuration file: service-nameService.xml

  • Executable file: service-nameService.exe

On Windows systems, this subcommand requires the Microsoft .NET Framework 4.6.1 or later (https://dotnet.microsoft.com/). Otherwise, the subcommand fails.

Behavior of create-service on Linux Systems

On Linux systems, the create-service subcommand creates a System-V-style initialization script /etc/init.d/GlassFish_`domain-or-instance-name and installs a link to this script in the `/etc/rc?.d directories. After this subcommand creates the script, you must use this script to start, stop, or restart the domain or instance.

On Linux systems, this subcommand must be run as the OS-level root user.

Behavior of create-service on Oracle Solaris Systems

On Oracle Solaris systems, the create-service subcommand creates a Service Management Facility (SMF) service to represent the DAS or instance. The service is created in the disabled state. After this subcommand creates the service, you must use SMF commands to start, enable, disable, delete, or stop the service. For more information about SMF, see the following documentation for the Oracle Solaris operating system:

On Oracle Solaris systems, this subcommand must be run as the OS-level user with superuser privileges. The configuration file for the DAS or instance must be stored in a directory to which the superuser has access and cannot be stored on a network file system. The service that is created is controlled by the OS-level user who owns the directory where the configuration of the DAS or instance resides.

On Oracle Solaris systems, the manifest file is created in the following directory by default:

/var/svc/manifest/application/GlassFish/domain-or-instance-name_domain-or-instance-root-dir

To run this subcommand, you must have solaris.smf.* authorization. For information about how to grant authorizations to users, see the useradd(1M) and usermod(1M) man pages.

To run these commands as non-root user, the system administrator must be contacted so that the relevant authorizations are granted. You must also ensure that the following conditions are met:

  • Oracle Solaris 10 administration commands such as svccfg(1M), svcs(1), and auths(1) are available through the PATH statement, so that these commands can be executed. A simple test to do so is to run the command which svccfg in the shell.

  • You must have write permission for the path /var/svc/manifest/application/GlassFish. Usually, the superuser has write permission to this path.

If you delete a service that you created by using the create-service subcommand, you must delete the directory that contains the manifest file and the entire contents of the directory. Otherwise, an attempt to re-create the service by using the create-service subcommand fails. The Oracle Solaris command svccfg does not delete this directory.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--name

(Windows and Oracle Solaris systems only) The name of the service that you will use when administering the service through Oracle Solaris SMF commands or the service management features of the Windows operating system. The default is the name of the domain or instance that is specified as the operand of this subcommand.

--serviceproperties

Specifies a colon(:)-separated list of various properties that are specific to the service.
To customize the display name of the service in the Windows Service list, set the DISPLAY_NAME property to the required name.
For Oracle Solaris 10 systems, if you specify net_privaddr, the service’s processes will be able to bind to the privileged ports (<1024) on the platform. You can bind to ports< 1024 only if the owner of the service is superuser, otherwise, this is not allowed.

--dry-run
-n

Previews your attempt to create a service. Indicates issues and the outcome that will occur if you run the command without using the --dry-run option. Nothing is actually configured. Default is false.

--force

Specifies whether the service is created even if validation of the service fails.
Possible values are as follows:

true

The service is created even if validation of the service fails.

false

The service is not created (default).

--serviceuser

(Linux systems only) The user that is to run the Eclipse GlassFish software when the service is started. The default is the user that is running the subcommand. Specify this option if the Eclipse GlassFish software is to be run by a user other than the root user.

--domaindir

The absolute path of the directory on the disk that contains the configuration of the domain. If this option is specified, the operand must specify a domain.

--nodedir

Specifies the directory that contains the instance’s node directory. The instance’s files are stored in the instance’s node directory. The default is as-install/nodes. If this option is specified, the operand must specify an instance.

--node

Specifies the node on which the instance resides. This option may be omitted only if the directory that the --nodedir option specifies contains only one node directory. Otherwise, this option is required. If this option is specified, the operand must specify an instance.

Operands

domain-or-instance-name

The name of the domain or instance to configure. If no operand is specified, the default domain is used.

Examples

Example 1   Creating a Service on a Windows System

This example creates a service for the default domain on a system that is running Windows.

asadmin> create-service
The Windows Service was created successfully.  It is ready to be started.  Here are
the details:
ID of the service: domain1
Display Name of the service:domain1 Eclipse GlassFish
Server Directory: C:\glassfish7\glassfish\domains\domain1
Configuration file for Windows Services Wrapper: C:\glassfish7\glassfish\domains\
domain1\bin\domain1Service.xml
The service can be controlled using the Windows Services Manager or you can use the
Windows Services Wrapper instead:
Start Command:  C:\glassfish7\glassfish\domains\domain1\bin\domain1Service.exe  start
Stop Command:   C:\glassfish7\glassfish\domains\domain1\bin\domain1Service.exe  stop
Restart Command:  C:\glassfish7\glassfish\domains\domain1\bin\domain1Service.exe
restart
Uninstall Command:  C:\glassfish7\glassfish\domains\domain1\bin\domain1Service.exe
uninstall
Install Command:  C:\glassfish7\glassfish\domains\domain1\bin\domain1Service.exe
install
Status Command: C:\glassfish7\glassfish\domains\domain1\bin\domain1Service.exe status
You can also verify that the service is installed (or not) with sc query state= all
windows.services.uninstall.good=Found the Windows Service and successfully uninstall
it.
For your convenience this message has also been saved to this file:
C:\glassfish7\glassfish\domains\domain1\PlatformServices.log
Command create-service executed successfully.

Example 2   Creating a Service on a Linux System

This example creates a service for the default domain on a system that is running Linux.

asadmin> create-service
Found the Linux Service and successfully uninstalled it.
The Service was created successfully. Here are the details:
Name of the service:domain1
Type of the service:Domain
Configuration location of the service:/etc/init.d/GlassFish_domain1
User account that will run the service: root
You have created the service but you need to start it yourself.
Here are the most typical Linux commands of interest:

* /etc/init.d/GlassFish_domain1 start
* /etc/init.d/GlassFish_domain1 stop
* /etc/init.d/GlassFish_domain1 restart

For your convenience this message has also been saved to this file:
/export/glassfish7/glassfish/domains/domain1/PlatformServices.log
Command create-service executed successfully.

Example 3   Creating a Service on an Oracle Solaris System

This example creates a service for the default domain on a system that is running Oracle Solaris.

asadmin> create-service
The Service was created successfully. Here are the details:
Name of the service:application/GlassFish/domain1
Type of the service:Domain
Configuration location of the service:/home/gfuser/glassfish-installations
/glassfish7/glassfish/domains
Manifest file location on the system:/var/svc/manifest/application
/GlassFish/domain1_home_gfuser_glassfish-installations_glassfish7
_glassfish_domains/Domain-service-smf.xml.
You have created the service but you need to start it yourself.
Here are the most typical Solaris commands of interest:
* /usr/bin/svcs -a | grep domain1 // status
* /usr/sbin/svcadm enable domain1 // start
* /usr/sbin/svcadm disable domain1 // stop
* /usr/sbin/svccfg delete domain1 // uninstall
Command create-service executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

"Managing Services (Overview)" in System Administration Guide: Basic Administration, "Managing Services (Tasks)" in System Administration Guide: Basic Administration

Microsoft .NET Framework (https://dotnet.microsoft.com/)

create-ssl

Creates and configures the SSL element in the selected HTTP listener, IIOP listener, or IIOP service

Synopsis

asadmin [asadmin-options] create-ssl [--help]
[--target target]
--type listener_or_service_type
--certname cert_name
[--ssl2enabled={false|true}] [--ssl2ciphers ss12ciphers]
[--ssl3enabled={true|false}] [--tlsenabled={true|false}]
[--ssl3tlsciphers ssl3tlsciphers]
[--tlsrollbackenabled={true|false}]
[--clientauthenabled={false|true}]
[listener_id]

Description

The create-ssl subcommand creates and configures the SSL element in the selected HTTP listener, IIOP listener, or IIOP service to enable secure communication on that listener/service.

This subcommand is supported in remote mode only.

Options

If an option has a short option name, then the short option precedes the long option name. Short options have one dash whereas long options have two dashes.

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are configuring the ssl element. The following values are valid:

server

Specifies the server in which the iiop-service or HTTP/IIOP listener is to be configured for SSL.

config

Specifies the configuration that contains the HTTP/IIOP listener or iiop-service for which SSL is to be configured.

cluster

Specifies the cluster in which the HTTP/IIOP listener or iiop-service is to be configured for SSL. All the server instances in the cluster will get the SSL configuration for the respective listener or iiop-service.

instance

Specifies the instance in which the HTTP/IIOP listener or iiop-service is to be configured for SSL.

--type

The type of service or listener for which the SSL is created. The type can be:

  • network-listener

  • http-listener

  • iiop-listener

  • iiop-service

  • jmx-connector

When the type is iiop-service, the ssl-client-config along with the embedded ssl element is created in domain.xml.

--certname

The nickname of the server certificate in the certificate database or the PKCS#11 token. The format of the name in the certificate is tokenname:nickname. For this property, the tokenname: is optional.

--ssl2enabled

Set this property to true to enable SSL2. The default value is false. If both SSL2 and SSL3 are enabled for a virtual server, the server tries SSL3 encryption first. In the event SSL3 encryption fails, the server then tries SSL2 encryption.

--ssl2ciphers

A comma-separated list of the SSL2 ciphers to be used. Ciphers not explicitly listed will be disabled for the target, even if those ciphers are available in the particular cipher suite you are using. If this option is not used, all supported ciphers are assumed to be enabled. Allowed values are:

  • rc4

  • rc4export

  • rc2

  • rc2export

  • idea

  • des

  • desede3

--ssl3enabled

Set this property to false to disable SSL3. The default value is true. If both SSL2 and SSL3 are enabled for a virtual server, the server tries SSL3 encryption first. In the event SSL3 encryption fails, the server then tries SSL2 encryption.

--tlsenabled

Set this property to false to disable TLS. The default value is true It is good practice to enable TLS, which is a more secure version of SSL.

--ssl3tlsciphers

A comma-separated list of the SSL3 and/or TLS ciphers to be used. Ciphers not explicitly listed will be disabled for the target, even if those ciphers are available in the particular cipher suite you are using. If this option is not used, all supported ciphers are assumed to be enabled. Allowed values are:

  • SSL_RSA_WITH_RC4_128_MD5

  • SSL_RSA_WITH_3DES_EDE_CBC_SHA

  • SSL_RSA_WITH_DES_CBC_SHA

  • SSL_RSA_EXPORT_WITH_RC4_40_MD5

  • SSL_RSA_WITH_NULL_MD5

  • SSL_RSA_WITH_RC4_128_SHA

  • SSL_RSA_WITH_NULL_SHA

--tlsrollbackenabled

Set to true (default) to enable TLS rollback. TLS rollback should be enabled for Microsoft Internet Explorer 5.0 and 5.5. This option is only valid when -tlsenabled=true.

--clientauthenabled

Set to true if you want SSL3 client authentication performed on every request independent of ACL-based access control. Default value is false.

Operands

listener_id

The ID of the HTTP or IIOP listener for which the SSL element is to be created. The listener_id is not required if the --type is iiop-service.

Examples

Example 1   Creating an SSL element for an HTTP listener

The following example shows how to create an SSL element for an HTTP listener named http-listener-1.

asadmin> create-ssl
--type http-listener
--certname sampleCert http-listener-1
Command create-ssl executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-system-properties

Adds one or more system property elements that can be referenced elsewhere in the configuration.

Synopsis

asadmin [asadmin-options] create-system-properties [--help]
[--target target]
[name=value)[:name=value]*]

Description

The create-system-properties subcommand adds or updates system properties that can be referenced elsewhere on the server.

Eclipse GlassFish provides hooks where tokens (system properties) can be specified. Because Eclipse GlassFish does not have multiple server elements, you can specify a particular token at any level. When a domain supports multiple servers, the override potential can be exploited. When a domain is started or restarted, all <system-property> elements are resolved and available to the Java Virtual Machine by using the System.setProperty() call on each of them (with its name and value derived from the corresponding attributes of the element). This is analogous to sending the elements as -D parameters on the Java command line.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

The target on which you are creating the system properties.

Operands

target

The valid targets for this subcommand are instance, cluster, configuration, domain, and server. Server is the default option. Valid values are:

server

Creates the properties on the default server instance. This is the default value.

domain

Creates the properties for all server instances in the default domain.

configuration_name

Creates the properties in the specified configuration.

cluster_name

Creates the properties on all server instances in the specified cluster.

instance_name

Creates the properties on a specified server instance.

name=value

The name value pairs of the system properties to add to the specified target. Multiple system properties must be separated by a : (colon). If a : (colon) appears in the name or value of a system property, it must be escaped with a \ (blackslash). If any system properties were previously defined, they are updated with the new values.

Examples

Example 1   Creating System Properties

This example creates a system property associated with an HTTP listener on a server instance named myserver.

asadmin> create-system-properties --target myserver http-listener-port=1088
Command create-system-properties executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-threadpool

Adds a thread pool

Synopsis

asadmin [asadmin-options] create-threadpool [--help]
[--target target]
[--maxthreadpoolsize maxthreadpoolsize]
[--minthreadpoolsize minthreadpoolsize]
[--idletimeout idletimeout] [--maxqueuesize maxqueuesize]
[--workqueues workqueues] threadpool-id

Description

The create-threadpool subcommand creates a thread pool with the specified name. You can specify maximum and minimum number of threads in the pool, the quantity of messages, and the idle timeout of a thread. The created thread pool can be used for servicing IIOP requests and for resource adapters to service work management requests. A thread pool can be used in multiple resource adapters.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target on which you are creating the thread pool. Valid values are as follows:

server

Creates the thread pool for the default Eclipse GlassFish instance server and is the default value

configuration-name

Creates the thread pool for the named configuration.

cluster-name

Creates the thread pool for every instance in the cluster.

instance-name

Creates the thread pool for a particular instance.

--maxthreadpoolsize

Specifies the maximum number of threads the pool can contain. Default is 5.

--minthreadpoolsize

Specifies the minimum number of threads in the pool. These are created when the thread pool is instantiated. Default is 2.

--idletimeout

Specifies the amount of time in seconds after which idle threads are removed from the pool. Default is 900.

--maxqueuesize

Specifies the maximum number of messages that can be queued until threads are available to process them for a network listener or IIOP listener. A value of -1 specifies no limit. Default is 4096.

--workqueues

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

threadpool-id

An ID for the work queue, for example, threadpool-1.

Examples

Example 1   Creating a Thread Pool

This command creates a new thread pool called threadpool-l.

asadmin> create-threadpool --maxthreadpoolsize 100
--minthreadpoolsize 20 --idletimeout 2 threadpool-1
Command create-threadpool executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

create-transport

Adds a new transport

Synopsis

asadmin [asadmin-options] create-transport [--help]
[--acceptorthreads acceptor-threads]
[--buffersizebytes buffer-size]
[--bytebuffertype byte-buffer-type]
[--classname class-name]
[--displayconfiguration={false|true}]
[--enablesnoop={false|true}]
[--idlekeytimeoutseconds idle-key-timeout]
[--maxconnectionscount max-connections]
[--readtimeoutmillis read-timeout]
[--writetimeoutmillis write-timeout]
[--selectionkeyhandler selection-key-handler]
[--selectorpolltimeoutmillis selector-poll-timeout]
[--tcpnodelay={false|true}]
[--target target]
transport-name

Description

The create-transport subcommand creates a transport for a network listener. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--acceptorthreads

The number of acceptor threads for the transport. The recommended value is the number of processors in the machine. The default value is 1.

--buffersizebytes

The size, in bytes, of the buffer to be provided for input streams created by the network listener that references this transport. The default value is 8192.

--bytebuffertype

The type of the buffer to be provided for input streams created by a network-listener. Allowed values are HEAP and DIRECT. The default value is HEAP.

--classname

The fully qualified name of the Java class that implements the transport. The default is org.glassfish.grizzly.TCPSelectorHandler.

--displayconfiguration

If true, flushes the internal network configuration to the server log. Useful for debugging, but reduces performance. The default is false.

--enablesnoop

If true, writes request/response information to the server log. Useful for debugging, but reduces performance. The default is false.

--idlekeytimeoutseconds

The idle key timeout. The default is 30 seconds.

--maxconnectionscount

The maximum number of connections for the network listener that references this transport. A value of -1 specifies no limit. The default value is 4096.

--readtimeoutmillis

The amount of time the server waits during the header and body parsing phase. The default is 30000 milliseconds, or 30 seconds.

--writetimeoutmillis

The amount of time the server waits before considering the remote client disconnected when writing the response. The default is 30000 milliseconds, or 30 seconds.

--selectionkeyhandler

The name of the selection key handler associated with this transport. There is no default.

--selectorpolltimeoutmillis

The number of milliseconds a NIO Selector blocks waiting for events (user requests). The default value is 1000 milliseconds.

--tcpnodelay

If true, the default, enables TCP_NODELAY (also called Nagle’s algorithm). The default is false.

--target

Creates the transport only on the specified target. Valid values are as follows:

server

Creates the transport on the default server instance. This is the default value.

configuration-name

Creates the transport in the specified configuration.

cluster-name

Creates the transport on all server instances in the specified cluster.

standalone-instance-name

Creates the transport on the specified standalone server instance.

Operands

transport-name

The name of the transport.

Examples

Example 1   Creating a Transport

The following command creates a transport named http1-trans that uses a non-default number of acceptor threads:

asadmin> create-transport --acceptorthreads 100 http1-trans
Command create-transport executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

create-virtual-server

Creates the named virtual server

Synopsis

asadmin [asadmin-options] create-virtual-server [--help]
--hosts hosts
[--httplisteners http-listeners]
[--networklisteners network-listeners]
[--defaultwebmodule default-web-module]
[--state={on|off}]
[--logfile log-file]
[--property (name=value)[:name=value]*]
[--target target]
virtual-server-id

Description

The create-virtual-server subcommand creates the named virtual server. Virtualization in the Eclipse GlassFish allows multiple URL domains to be served by a single HTTP server process that is listening on multiple host addresses. If the application is available at two virtual servers, they still share the same physical resource pools.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--hosts

A comma-separated (,) list of values allowed in the host request header to select the current virtual server. Each virtual server that is configured to the same connection group must have a unique host for that group.

--httplisteners

A comma-separated (,) list of HTTP listener IDs. Required only for a virtual server that is not the default virtual server. HTTP listeners are converted to network listeners. This option is deprecated but maintained for backward compatibility. Use --networklisteners instead. If --networklisteners is used, this option is ignored.

--networklisteners

A comma-separated (,) list of network listener IDs. Required only for a virtual server that is not the default virtual server.

--defaultwebmodule

The standalone web module associated with this virtual server by default.

--state

Determines whether a virtual server is active (on) or inactive (off or disabled). Default is on. When inactive, the virtual server does not service requests.

--logfile

Name of the file where log entries for this virtual server are to be written. By default, this is the server log. The file and directory in which the access log is kept must be writable by the user account under which the server runs.

--property

Optional property name/value pairs for configuring the virtual server. The following properties are available:

sso-max-inactive-seconds

Specifies the number of seconds after which a user’s single sign-on record becomes eligible for purging if no client activity is received. Since single sign-on applies across several applications on the same virtual server, access to any of the applications keeps the single sign-on record active. The default value is 300 seconds (5 minutes). Higher values provide longer single sign-on persistence for users, but at the expense of more memory use on the server.

sso-reap-interval-seconds

Specifies the number of seconds between purges of expired single sign-on records. The default value is 60.

setCacheControl

Specifies a comma-separated list of Cache-Control response directives. For a list of valid directives, see section 14.9 of the document at http://www.ietf.org/rfc/rfc2616.txt (http://www.ietf.org/rfc/rfc2616.txt).

allowLinking

If the value of this property is true, resources that are symbolic links will be served for all web applications deployed on this virtual server. Individual web applications may override this setting by using the property allowLinking under the sun-web-app element in the sun-web.xml file:

<sun-web-app>
<property name="allowLinking" value="[true|false]"/>
</sun-web-app>

The default value is true.

accessLogWriteInterval

Indicates the number of seconds before the log will be written to the disk. The access log is written when the buffer is full or when the interval expires. If the value is 0 (zero), then the buffer is always written even if it is not full. This means that each time the server is accessed, the log message is stored directly to the file.

accessLogBufferSize

Specifies the size, in bytes, of the buffer where access log calls are stored.

allowRemoteAddress

This is a comma-separated list of regular expression patterns to which the remote client’s IP address is compared. If this property is specified, the remote address must match for this request to be accepted. If this property is not specified, all requests will be accepted unless the remote address matches a denyRemoteAddress pattern. The default value for this property is null.

denyRemoteAddress

This is a comma-separated list of regular expression patterns to which the remote client’s IP address is compared. If this property is specified, the remote address must not match for this request to be accepted. If this property is not specified, request acceptance is governed solely by the allowRemoteAddress property. The default value for this property is null.

allowRemoteHost

This is a comma-separated list of regular expression patterns to which the remote client’s host name (as returned by java.net.Socket.getInetAddress().getHostName()) is compared. If this property is specified, the remote host name must match for this request to be accepted. If this property is not specified, all requests will be accepted unless the remote host name matches a denyRemoteHost pattern. The default value for this property is null.

denyRemoteHost

This is a comma-separated list of regular expression patterns to which the remote client’s host name (as returned by java.net.Socket.getInetAddress().getHostName()) is compared. If this property is specified, the remote host name must not match for this request to be accepted. If this property is not specified, request acceptance is governed solely by the allowRemoteHost property. The default value for this property is null.

authRealm

Specifies the name attribute of an auth-realm, which overrides the server instance’s default realm for standalone web applications deployed to this virtual server. A realm defined in a standalone web application’s web.xml file overrides the virtual server’s realm.

securePagesWithPragma

Set this property to false to ensure that for all web applications on this virtual server file downloads using SSL work properly in Internet Explorer.
You can set this property for a specific web application. For details, see "glassfish-web-app" in Eclipse GlassFish Application Deployment Guide.

contextXmlDefault

Specifies the location, relative to domain-dir, of the context.xml file for this virtual server, if one is used. For more information about the context.xml file, see "Using a context.xml File" in Eclipse GlassFish Application Development Guide and The Context Container (http://tomcat.apache.org/tomcat-5.5-doc/config/context.html). Context parameters, environment entries, and resource definitions in context.xml are supported in the Eclipse GlassFish.

alternatedocroot_n

Specifies an alternate document root (docroot), where n is a positive integer that allows specification of more than one. Alternate docroots allow web applications to serve requests for certain resources from outside their own docroot, based on whether those requests match one (or more) of the URI patterns of the web application’s alternate docroots.
If a request matches an alternate docroot’s URI pattern, it is mapped to the alternate docroot by appending the request URI (minus the web application’s context root) to the alternate docroot’s physical location (directory). If a request matches multiple URI patterns, the alternate docroot is determined according to the following precedence order:

  • Exact match

  • Longest path match

  • Extension match

For example, the following properties specify three alternate docroots. The URI pattern of the first alternate docroot uses an exact match, whereas the URI patterns of the second and third alternate docroots use extension and longest path prefix matches, respectively.

<property name="alternatedocroot_1"
   value="from=/my.jpg dir=/srv/images/jpg"/>
<property name="alternatedocroot_2"
   value="from=*.jpg dir=/srv/images/jpg"/>
<property name="alternatedocroot_3"
   value="from=/jpg/* dir=/src/images"/>

The value of each alternate docroot has two components: The first component, from, specifies the alternate docroot’s URI pattern, and the second component, dir, specifies the alternate docroot’s physical location (directory). Spaces are allowed in the dir component.
You can set this property for a specific web application. For details, see "glassfish-web-app" in Eclipse GlassFish Application Deployment Guide.

send-error_n

Specifies custom error page mappings for the virtual server, which are inherited by all web applications deployed on the virtual server. A web application can override these custom error page mappings in its web.xml deployment descriptor. The value of each send-error_n property has three components, which may be specified in any order:

  • The first component, code, specifies the three-digit HTTP response status code for which the custom error page should be returned in the response.

  • The second component, path, specifies the absolute or relative file system path of the custom error page. A relative file system path is interpreted as relative to the domain-dir/config directory.

  • The third component, reason, is optional and specifies the text of the reason string (such as Unauthorized or Forbidden) to be returned.

For example:

<property name="send-error_1"
   value="code=401 path=/myhost/401.html reason=MY-401-REASON"/>

This example property definition causes the contents of /myhost/401.html to be returned with 401 responses, along with this response line:

HTTP/1.1 401 MY-401-REASON
redirect_n

Specifies that a request for an old URL is treated as a request for a new URL. These properties are inherited by all web applications deployed on the virtual server. The value of each redirect_n property has two components, which may be specified in any order:

  • The first component, from, specifies the prefix of the requested URI to match.

  • The second component, url-prefix, specifies the new URL prefix to return to the client. The from prefix is simply replaced by this URL prefix.

For example:

<property name="redirect_1" value="from=/dummy url-prefix=http://etude"/>
valve_n

Specifies a fully qualified class name of a custom valve, where n is a positive integer that allows specification of more than one. The valve class must implement the org.apache.catalina.Valve interface from Tomcat or previous Eclipse GlassFish releases, or the org.glassfish.web.valve.GlassFishValve interface from the current Eclipse GlassFish release. For example:

<property name="valve_1" value="org.glassfish.extension.Valve"/>

You can set this property for a specific web application. For details, see "glassfish-web-app" in Eclipse GlassFish Application Deployment Guide.

listener_n

Specifies a fully qualified class name of a custom Catalina listener, where n is a positive integer that allows specification of more than one. The listener class must implement the org.apache.catalina.ContainerListener or org.apache.catalina.LifecycleListener interface. For example:

<property name="listener_1"
   value="org.glassfish.extension.MyLifecycleListener"/>

You can set this property for a specific web application. For details, see "glassfish-web-app" in Eclipse GlassFish Application Deployment Guide.

docroot

Absolute path to root document directory for server. Deprecated. Replaced with a virtual-server attribute, docroot, that is accessible using the get, set, and list subcommands.

accesslog

Absolute path to server access logs. Deprecated. Replaced with a virtual-server attribute , access-log, that is accessible using the get, set, and list subcommands.

accessLoggingEnabled

If true, access logging is enabled for this virtual server. Deprecated. Replaced with a virtual-server attribute, access-logging-enabled, that is accessible using the get, set, and list subcommands.

sso-enabled

If true, single sign-on is enabled for web applications on this virtual server that are configured for the same realm. Deprecated. Replaced with a virtual-server attribute, sso-enabled, that is accessible using the get, set, and list subcommands.

ssoCookieSecure

Sets the Secure attribute of any JSESSIONIDSSO cookies associated with the web applications deployed to this virtual server. Deprecated. Replaced with a virtual-server attribute, sso-cookie-secure, that is accessible using the get, set, and list subcommands.

errorReportValve

Specifies a fully qualified class name of a custom valve that produces default error pages for applications on this virtual server. Specify an empty string to disable the default error page mechanism for this virtual server.

--target

Creates the virtual server only on the specified target. Valid values are as follows:

server

Creates the virtual server on the default server instance. This is the default value.

configuration-name

Creates the virtual server in the specified configuration.

cluster-name

Creates the virtual server on all server instances in the specified cluster.

standalone-instance-name

Creates the virtual server on the specified standalone server instance.

Operands

virtual-server-id

Identifies the unique ID for the virtual server to be created. This ID cannot begin with a number.

Examples

Example 1   Creating a Virtual Server

The following command creates a virtual server named sampleServer:

asadmin> create-virtual-server --hosts pigeon,localhost
--property authRealm=ldap sampleServer
Command create-virtual-server executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-admin-object

Removes the administered object with the specified JNDI name.

Synopsis

asadmin [asadmin-options] delete-admin-object [--help]
[--target target] jndi_name

Description

The delete-admin-object subcommand removes an administered object with the specified JNDI name.

This subcommand is supported in remote mote only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This is the name of the targets for which the administered object is to be deleted. Valid values are:

Resources are always created for a domain as a whole but are only active for targets for which a <resource-ref> has been created using the --target option when the resource was created. This means that deleting a resource only deletes the <resource-ref> element for the specified --target, and does not delete the resource from the domain as a whole unless domain is specified as the --target for the deletion.

server

Deletes the administered object for the default server instance server and is the default value.

configuration_name

Deletes the administered object for the specified configuration.

cluster_name

Deletes the administered object for the specified cluster.

instance_name

Deletes the administered object for a particular server instance.

Operands

jndi_name

JNDI name of the administered object to be deleted.

Examples

Example 1   Deleting an Administered Object

This example deletes the administered object named jms/samplelqueue.

asadmin> delete-admin-object jms/samplequeue
Command delete-admin-object executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-application-ref

Removes a reference to an application

Synopsis

asadmin [asadmin-options] delete-application-ref [--help]
[--target target]
[--cascade=false] reference_name

Description

The delete-application-ref subcommand removes a reference from a cluster or an unclustered server instance to an application. This effectively results in the application element being undeployed and no longer available on 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 application the next time they start.

Removal of the reference does not result in removal of the application from the domain. The bits are removed only by the undeploy subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are removing the application reference. Valid values are

  • server - Specifies the default server instance as the target.
    server is the name of the default server instance and is the default value.

  • cluster_name - Specifies a certain cluster as the target.

  • instance_name - Specifies a certain stand-alone server instance as the target.

--cascade

For a connector module, indicates whether the resources dependent on the module should also be recursively deleted. The default is false. The connector module can be either a stand-alone RAR file or a module within an EAR file.

Operands

reference_name

The name of the application or module, which can be a Jakarta EE application module, Web module, EJB module, connector module, application client module, or lifecycle module.
The name can include an optional version identifier, which follows the name and is separated from the name by a colon (:). The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash (-), and period (.) characters. To delete references to multiple versions, you can use an asterisk (*) as a wildcard character. For more information about module and application versions, see "Module and Application Versions" in Eclipse GlassFish Application Deployment Guide.

Examples

Example 1   Deleting an Application Reference

The following example removes a reference to the Web module MyWebApp from the unclustered server instance NewServer.

asadmin> delete-application-ref --target NewServer MyWebApp
Command delete-application-ref executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-audit-module

Removes the named audit-module

Synopsis

asadmin [asadmin-options] delete-audit-module [--help]
[--target target]
audit_module_name

Description

This subcommand removes the named audit module. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are deleting the audit module. Valid values are as follows:

server

Deletes the audit module for the default server instance server and is the default value.

configuration_name

Deletes the audit module for the named configuration.

cluster_name

Deletes the audit module for every server instance in the cluster.

instance_name

Deletes the audit module for a particular server instance.

Operands

audit_module_name

The name of the audit module to be deleted.

Examples

Example 1   Deleting an audit module

asadmin> delete-audit-module sampleAuditModule
Command delete-audit-module executed successfully

Exit Status

0

command executed successfully

1

error in executing the command

delete-auth-realm

Removes the named authentication realm

Synopsis

asadmin [asadmin-options] delete-auth-realm [--help]
[--target target]
auth_realm-name

Description

The delete-auth-realm subcommand removes the named authentication realm. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are deleting the authentication realm. Valid values are

server

Deletes the realm for the default server instance server and is the default value.

configuration_name

Deletes the realm for the named configuration.

cluster_name

Deletes the realm for every server instance in the cluster.

instance_name

Deletes the realm for a particular server instance.

Operands

auth_realm_name

Name of the realm to be deleted.

Examples

Example 1   Deleting an Authentication Realm

This example deletes the authentication realm db.

asadmin> delete-auth-realm db
Command delete-auth-realm executed successfully

Exit Status

0

command executed successfully

1

error in executing the command

delete-cluster

Deletes a Eclipse GlassFish cluster

Synopsis

asadmin [asadmin-options] delete-cluster [--help]
[--autohadboverride={true|false}] [--node-agent=node-agent--name]
cluster-name

Description

The delete-cluster subcommand deletes a Eclipse GlassFish cluster. A cluster can be deleted only if the cluster contains no Eclipse GlassFish instances. If a cluster that you are deleting contains any instances, stop and delete the instances before deleting the cluster.

If the cluster’s named configuration was created automatically for the cluster and no other clusters or unclustered instances refer to the configuration, the configuration is deleted when the cluster is deleted. A configuration that is created automatically for a cluster is named cluster-name`-config`, where cluster-name is the name of the cluster.

This command is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--autohadboverride

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--nodeagent

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

cluster-name

The name of the cluster to delete.

Examples

Example 1   Deleting a Eclipse GlassFish Cluster

This example deletes the Eclipse GlassFish cluster adccluster.

asadmin> delete-cluster adccluster
Command delete-cluster executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-config

Deletes an existing named configuration

Synopsis

asadmin [asadmin-options] delete-config [--help]
configuration-name

Description

The delete-config subcommand deletes an existing named configuration from the configuration of the domain administration server (DAS). You can delete a configuration only if no Eclipse GlassFish instances or clusters refer to the configuration. A standalone configuration is automatically deleted when the instance or cluster that refers to it is deleted. You cannot delete the default-config configuration that is copied to create standalone configurations.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

configuration-name

The name of the configuration that you are deleting.

Examples

Example 1   Deleting a Named Configuration

This example deletes the named configuration pmdconfig.

asadmin> delete-config pmdconfig

Command delete-config executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-connector-connection-pool

Removes the specified connector connection pool

Synopsis

asadmin [asadmin-options] delete-connector-connection-pool [--help]
[--target target]
[--cascade={false|true}] poolname

Description

The delete-connector-connection-pool subcommand removes the specified connector connection pool.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

--cascade

When set to true, all connector resources associated with the pool, and the pool itself, are deleted. When set to false, the deletion of pool fails if any resources are associated with the pool. The resource must be deleted explicitly or the option must be set to true. Default is false.

Operands

poolname

The name of the connection pool to be removed.

Examples

Example 1   Deleting a Connector Connection Pool

This example deletes the connector connection pool named jms/qConnPool.

asadmin> delete-connector-connection-pool
--cascade=false jms/qConnPool
Command delete-connector-connection-pool executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-connector-resource

Removes the connector resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] delete-connector-resource [--help]
[--target target] jndi_name

Description

The delete-connector-resource subcommand removes the connector resource with the specified JNDI name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target from which you want to remove the connector resource. Valid targets are:

Resources are always created for a domain as a whole but are only active for targets for which a <resource-ref> has been created using the --target option when the resource was created. This means that deleting a resource only deletes the <resource-ref> element for the specified --target, and does not delete the resource from the domain as a whole unless domain is specified as the --target for the deletion.

server

Deletes the connector resource from the default server instance. This is the default value.

domain

Deletes the connector resource from the domain.

cluster_name

Deletes the connector resource from every server instance in the cluster.

instance_name

Deletes the connector resource from a specified server instance.

Operands

jndi_name

The JNDI name of this connector resource.

Examples

Example 1   Deleting a Connector Resource

This example deletes a connector resource named jms/qConnFactory.

asadmin> delete-connector-resource jms/qConnFactory
Command delete-connector-resource executed successfully

Example 2   Using the delete-connector-resource subcommand

This example shows the usage of this subcommand.

asadmin> delete-connector-resource jms/qConnFactory
Command delete-connector-resource executed successfully

Where jms/qConnFactory is the connector resource that is removed.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-connector-security-map

Deletes a security map for the specified connector connection pool

Synopsis

asadmin [asadmin-options] delete-connector-security-map [--help]
--poolname connector_connection_pool_name [--target target] mapname

Description

The delete-connector-security-map subcommand deletes a security map for the specified connector connection pool.

For this subcommand to succeed, you must have first created a connector connection pool using the create-connector-connection-pool subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--poolname

Specifies the name of the connector connection pool to which the security map that is to be deleted belongs.

--target

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

mapname

Name of the security map to be deleted.

Examples

Example 1   Deleting a Connector Security Map

This example deletes securityMap1 for the existing connection pool named connector-pool1.

asadmin> delete-connector-security-map
--poolname connector-pool1 securityMap1
Command delete-connector-security-map executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-connector-work-security-map

Deletes a work security map for the specified resource adapter

Synopsis

asadmin [asadmin-options] delete-connector-work-security-map [--help]
--raname raname
mapname

Description

The delete-connector-work-security-map subcommand deletes a security map associated with the specified resource adapter. For this subcommand to succeed, you must have first created and deployed the specified resource adapter.

The enterprise information system (EIS) is any system that holds the data of an organization. It can be a mainframe, a messaging system, a database system, or an application.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--raname

Indicates the connector module name with which the work security map is associated.

Operands

mapname

The name of the work security map to be deleted.

Examples

Example 1   Deleting a Connector Work Security Map

This example deletes the work security map named work_security_map_name for the resource adapter named ra_name.

asadmin delete-connector-work-security-map
--raname ra_name work_security_map_name
Command delete-connector-work-security-map executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-context-service

Removes a context service resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] delete-context-service [--help]
[--target target]
context-service-name

Description

The delete-context-service subcommand removes a context service resource with the specified JNDI name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the resource. Valid targets are:

server

Deletes the resource from the default server instance. This is the default value.

domain

Deletes the resource from the domain.

cluster-name

Deletes the resource from every server instance in the specified cluster.

instance-name

Deletes the resource from the specified server instance.

Operands

context-service-name

The JNDI name of the resource to be deleted.

Examples

Example 1   Deleting a Context Service Resource

This example deletes the context service resource named concurrent/myContextService.

asadmin> delete-context-service concurrent/myContextService
Context service concurrent/myContextService deleted successfully.
Command delete-context-service executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-custom-resource

Removes a custom resource

Synopsis

asadmin [asadmin-options] delete-custom-resource [--help]
[--target target] jndi-name

Description

The delete-custom-resource subcommand removes a custom resource.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option helps specify the location of the custom resources that you are deleting. Valid targets are server, domain, cluster, and instance. The default is server.

Resources are always created for a domain as a whole but are only active for targets for which a <resource-ref> has been created using the --target option when the resource was created. This means that deleting a resource only deletes the <resource-ref> element for the specified --target, and does not delete the resource from the domain as a whole unless domain is specified as the --target for the deletion.

server

Deletes the resource for the default server instance. This is the default value.

domain

Deletes the resource for the domain.

cluster_name

Deletes the resource for every server instance in the cluster.

instance_name

Deletes the resource for a particular server instance.

Operands

jndi-name

The JNDI name of this resource.

Examples

Example 1   Deleting a Custom Resource

This example deletes a custom resource named mycustomresource.

asadmin> delete-custom-resource mycustomresource
Command delete-custom-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-domain

Deletes a domain

Synopsis

asadmin [asadmin-options] delete-domain [--help]
[--domaindir domaindir] domain-name

Description

The delete-domain subcommand deletes the specified domain. The domain must already exist and must be stopped.

This subcommand is supported in local mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--domaindir

The directory where the domain to be deleted is located. If specified, the path must be accessible in the file system. If not specified, the domain under the domain root directory, which defaults to as-install/domains, is deleted.

Operands

domain-name

The unique name of the domain you want to delete.

Examples

Example 1   Deleting a Domain

This example deletes a domain named mydomain4 from the default domains directory.

asadmin> delete-domain mydomain4
Domain mydomain4 deleted.
Command delete-domain executed successfully.

Example 2   deleting a Domain From an Alternate Location

This example deletes a domain named sampleDomain from the /home/someuser/domains directory.

asadmin> delete-domain --domaindir /home/someuser/domains sampleDomain
Domain sampleDomain deleted
Command delete-domain executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-file-user

Removes the named file user

Synopsis

asadmin [asadmin-options] delete-file-user [--help]
[--authrealmname auth_realm_name]
[--target target]
username

Description

The delete-file-user subcommand deletes the entry in the keyfile for the specified username.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--authrealmname

The name of the authentication realm with which the user was created.

--target

This is the name of the target on which the command operates. The valid targets are:

server

Deletes the file user on the default server instance. This is the default value

domain

Deletes the file user in the domain.

cluster_name

Deletes the file user from every server instance in the cluster.

instance_name

Deletes the file user from a particular server instance.

Operands

username

This is the name of file user to be deleted.

Examples

Example 1   Deleting a User From a File Realm

The following example shows how to delete user named sample_user from a file realm.

asadmin> delete-file-user
sample_user
Command delete-file-user executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-http

Removes HTTP parameters from a protocol

Synopsis

asadmin [asadmin-options] delete-http [--help]
[--target target]
protocol-name

Description

The delete-http subcommand removes the specified HTTP parameter set from a protocol. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the HTTP parameter set only from the specified target. Valid values are as follows:

server

Deletes the HTTP parameter set from the default server instance. This is the default value.

configuration-name

Deletes the HTTP parameter set from the specified configuration.

cluster-name

Deletes the HTTP parameter set from all server instances in the specified cluster.

standalone-instance-name

Deletes the HTTP parameter set from the specified standalone server instance.

Operands

protocol-name

The name of the protocol from which to delete the HTTP parameter set.

Examples

Example 1   Deleting an HTTP Parameter Set

The following command deletes the HTTP parameter set from a protocol named http-1:

asadmin> delete-http http-1
Command delete-http executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-http-health-checker

Deletes the health-checker for a specified load balancer configuration

Synopsis

asadmin [asadmin-options] delete-http-health-checker [--help]
[--config config_name]
 target

Description

The delete-http-health-checker subcommand deletes the health checker from a load balancer configuration. A health checker is unique for the combination of target and load balancer configuration.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--config

The load balancer configuration from which you delete the health-checker.

Operands

target

Specifies the target from which you are deleting the health checker.
Valid values are:

  • cluster_name - The name of a target cluster.

  • instance_name - The name of a target server instance.

Examples

Example 1   Deleting a Health Checker from a Load Balancer Configuration

This example deletes the health checker for load balancer configuration named mycluster-http-lb-config on a cluster named mycluster.

asadmin> delete-http-health-checker --user admin
--passwordfile password.txt --config mycluster-http-lb-config mycluster

Command delete-http-health-checker executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-http-lb

Deletes a load balancer

Synopsis

asadmin [asadmin-options] delete-http-lb [--help]
load_balancer_name

Description

Use the delete-http-lb subcommand to delete a physical load balancer.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

load_balancer_name

The name of the load balancer to be deleted.

Examples

Example 1   Deleting a Load Balancer Configuration

This example deletes the load balancer configuration named mylb.

asadmin> delete-http-lb mylb

Command delete-http-lb executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-http-lb-config

Deletes a load balancer configuration

Synopsis

asadmin [asadmin-options] delete-http-lb-config [--help]
config_name

Description

Use the delete-http-lb-config subcommand to delete a load balancer configuration. The load balancer configuration must not reference any clusters or server instances enabled for load balancing. In addition, the load balancer configuration must not be referenced by any physical load balancers.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

config_name

The name of the load balancer configuration to delete. The configuration must not reference any clusters or server instances enabled for load balancing, or be used by any physical load balancers.

Examples

Example 1   Deleting a Load Balancer Configuration

This example deletes a load balancer configuration named mylbconfig

asadmin> delete-http-lb-config mylbconfig
Command delete-http-lb-config executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-http-lb-ref

Deletes the cluster or server instance from a load balancer

Synopsis

asadmin [asadmin-options] delete-http-lb-ref [--help]
--config config_name | --lbname load_balancer_name
[--force=false] target

Description

Use the delete-http-lb-ref subcommand to remove a reference to a cluster or standalone server instance from a load balancer configuration or load balancer. So that you do not interrupt user requests, make sure the standalone server instance or all server instances in the cluster are disabled before you remove them from the load balancer configuration. If the force option is set to true, the references are deleted even if server instances or clusters are enabled.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--config

Specifies which load balancer configuration to delete cluster and server instance references from.
Specify either a load balancer configuration or a load balancer. Specifying both results in an error.

--lbname

Specifies the load balancer to delete cluster and server instance references from.
Specify either a load balancer configuration or a load balancer. Specifying both results in an error.

--force

If force is set to true, then the references are deleted even if there are currently enabled applications or instances. The default is false.

Operands

target

Specifies which cluster or instance to remove from the load balancer. Valid values are:

  • cluster_name- The name of a target cluster.

  • instance_name- The name of a target server instance.

Examples

Example 1   Deleting a Cluster Reference from a Load Balancer

Configuration

This example deletes the reference to cluster named cluster2 from a load balancer configuration named mycluster-http-lb-config.

asadmin> delete-http-lb-ref --config mycluster-http-lb-config cluster2

Command delete-http-lb-ref executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-http-listener

Removes a network listener

Synopsis

asadmin [asadmin-options] delete-http-listener [--help]
[--target target]
listener-id

Description

The delete-http-listener subcommand removes the specified network listener.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the network listener only from the specified target. Valid values are as follows:

server

Deletes the network listener from the default server instance. This is the default value.

configuration-name

Deletes the network listener from the specified configuration.

cluster-name

Deletes the network listener from all server instances in the specified cluster.

standalone-instance-name

Deletes the network listener from the specified standalone server instance.

Operands

listener-id

The unique identifier for the network listener to be deleted.

Examples

Example 1   Using the delete-http-listener subcommand

The following command deletes the network listener named sampleListener:

asadmin> delete-http-listener sampleListener
Command delete-http-listener executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-http-redirect

Removes an HTTP redirect

Synopsis

delete-http-redirect [--help]
[--target target]
protocol-name

Description

The delete-http-redirect subcommand removes the specified HTTP redirect. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the HTTP redirect only from the specified target. Valid values are as follows:

server

Deletes the HTTP redirect from the default server instance. This is the default value.

configuration-name

Deletes the HTTP redirect from the specified configuration.

cluster-name

Deletes the HTTP redirect from all server instances in the specified cluster.

standalone-instance-name

Deletes the HTTP redirect from the specified standalone server instance.

Operands

protocol-name

The name of the associated protocol.

Exit Status

0

command executed successfully

1

error in executing the command

delete-iiop-listener

Removes an IIOP listener

Synopsis

delete-iiop-listener [--help] [--target target] listener_id

Description

The delete-iiop-listener subcommand removes the specified IIOP listener. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the IIOP listener. Valid values are

server

Deletes the listener from the default server instance server and is the default value.

configuration_name

Deletes the listener from the named configuration.

cluster_name

Deletes the listener from every server instance in the cluster.

instance_name

Deletes the listener from a particular server instance.

Operands

listener_id

The unique identifier for the IIOP listener to be deleted.

Examples

Example 1   Deleting an IIOP Listener

The following command deletes the IIOP listener named sample_iiop_listener:

asadmin> delete-iiop-listener sample_iiop_listener
Command delete-iiop-listener executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-instance

Deletes a Eclipse GlassFish instance

Synopsis

asadmin [asadmin-options] delete-instance [--help]
instance-name

Description

The delete-instance subcommand deletes a Eclipse GlassFish instance. This subcommand requires the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured on the host where the domain administration server (DAS) is running and on the host that is represented by the node where the instance resides.

DCOM or SSH is not required if the instance resides on a node of type CONFIG that represents the local host. A node of type CONFIG is not enabled for remote communication over DCOM or SSH.

You may run this subcommand from any host that can contact the DAS.

The subcommand can delete any Eclipse GlassFish instance, regardless of how the instance was created. For example, this subcommand can delete an instance that was created by using the create-local-instance(1) subcommand.

The instance that is being deleted must not be running. Otherwise, an error occurs.

The subcommand deletes an instance by performing the following actions:

  • Removing the instance from the configuration of the domain administration server (DAS)

  • Deleting the instance’s files from file system

If the instance that is being deleted is the only instance that is using the node directory, that directory is also removed.

If a standalone instance is deleted, the instance’s standalone configuration is also deleted. A standalone instance refers to a configuration that is named instance-name`-config` to which no other clusters or unclustered instances refer.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

instance-name

The name of the instance to delete.

Examples

Example 1   Deleting a Eclipse GlassFish Instance

This example deletes the Eclipse GlassFish instance pmdsainst.

asadmin> delete-instance pmdsainst

Command delete-instance executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-jacc-provider

Enables administrators to delete JACC providers defined for a domain

Synopsis

asadmin [asadmin-options] delete-jacc-provider [--help]
[--target target] jacc-provider-name

Description

The delete-jacc-provider subcommand enables administrators to delete JACC providers defined for a domain. JACC providers are defined as jacc-provider elements in the security-service element in the domain’s domain.xml file. JACC providers can be created using the Eclipse GlassFish Admin Console or the create-jacc-provider subcommand.

The default Eclipse GlassFish installation includes two JACC providers, named default and simple. These default providers should not be deleted.

The JACC provider used byEclipse GlassFish for authorization is identified by the jacc-provider element of security-service in domain.xml. Therefore, if you delete the jacc-provider provider, make sure you change jacc-provider to the name of some other JACC provider that exists under security-service.

If you change the jacc-provider element to point to a different JACC provider, you must restart Eclipse GlassFish.

This subcommand is supported in remote mode only.

Options

If an option has a short option name, then the short option precedes the long option name. Short options have one dash whereas long options have two dashes.

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the JACC provider. The following values are valid:

server

Deletes the JACC provider on the default server instance. This is the default value.

configuration_name

Deletes the JACC provider in the specified configuration.

cluster_name

Deletes the JACC provider on all server instances in the specified cluster.

instance_name

Deletes the JACC provider on a specified server instance.

Operands

jacc-provider-name

The name of the JACC provider to be deleted.

Examples

Example 1   Deleting a JACC provider

The following example shows how to delete a JACC provider named testJACC from the default domain.

asadmin> delete-jacc-provider testJACC

Command delete-jacc-provider executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jdbc-connection-pool

Removes the specified JDBC connection pool

Synopsis

asadmin [asadmin-options] delete-jdbc-connection-pool [--help]
[--cascade={false|true}]
[--target target]
jdbc_connection_pool_id

Description

The delete-jdbc-connection-pool subcommand deletes a JDBC connection pool. Before running this subcommand, all associations to the JDBC connection pool must be removed.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--cascade

If the option is set to true, all the JDBC resources associated with the pool, apart from the pool itself, are deleted. When set to false, the deletion of pool fails if any resources are associated with the pool. Resources must be deleted explicitly or the option must be set to true. The default value is false.

--target

Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.

Operands

jdbc_connection_pool_id

The name of the JDBC resource to be removed.

Examples

Example 1   Deleting a JDBC Connection Pool

This example deletes the sample_derby_pool JDBC connection pool.

asadmin> delete-jdbc-connection-pool --cascade=false sample_derby_pool
Command delete-jdbc-connection-pool executed correctly.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jdbc-resource

Removes a JDBC resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] delete-jdbc-resource [--help]
[--target target] jndi_name

Description

The delete-jdbc-resource subcommand removes a JDBC resource. Ensure that all associations to the JDBC resource are removed before running this subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option helps specify the target from which you are removing the JDBC resource. Valid targets are:

server

Removes the resource from the default server instance. This is the default value.

domain

Removes the resource from the domain.

cluster_name

Removes the resource from every server instance in the cluster.

instance_name

Removes the resource from a particular server instance.

Resources are always created for a domain as a whole but are only active for targets for which a <resource-ref> has been created using the --target option when the resource was created. This means that deleting a resource only deletes the <resource-ref> element for the specified --target, and does not delete the resource from the domain as a whole unless domain is specified as the --target for the deletion.

Operands

jndi_name

The JNDI name of this JDBC resource to be removed.

Examples

Example 1   Deleting a JDBC Resource

The following example deletes the JDBC resource named jdbc/DerbyPool.

asadmin> delete-jdbc-resource jdbc/DerbyPool
Command delete-jdbc-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jmsdest

Removes a JMS physical destination

Synopsis

asadmin [asadmin-options] delete-jmsdest [--help]
--desttype type
[--target target]
dest_name

Description

The delete-jmsdest subcommand removes the specified Java Message Service (JMS) physical destination.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--desttype

The type of the JMS destination. Valid values are topic and queue.

--target

Deletes the physical destination only from the specified target. Although the delete-jmsdest subcommand is related to resources, a physical destination is deleted using the JMS Service (JMS Broker), which is part of the configuration. A JMS Broker is configured in the config section of domain.xml. Valid values are as follows:

server

Deletes the physical destination from the default server instance. This is the default value.

configuration-name

Deletes the physical destination from the specified configuration.

cluster-name

Deletes the physical destination from every server instance in the specified cluster.

instance-name

Creates the physical destination from the specified server instance.

Operands

dest_name

The unique identifier of the JMS destination to be deleted.

Examples

Example 1   Deleting a physical destination

The following subcommand deletes the queue named PhysicalQueue.

asadmin> delete-jmsdest --desttype queue PhysicalQueue
Command delete-jmsdest executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jms-host

Removes a JMS host

Synopsis

asadmin [asadmin-options] delete-jms-host [--help]
[--target target]
jms_host_name

Description

The delete-jms-host subcommand removes the specified Java Message Service (JMS) host.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Deleting the default JMS host, named default_JMS_host, is not recommended.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the JMS host only from the specified target. Valid values are as follows:

server

Deletes the JMS host from the default server instance. This is the default value.

configuration-name

Deletes the JMS host from the specified configuration.

cluster-name

Deletes the JMS host from every server instance in the specified cluster.

instance-name

Deletes the JMS host from the specified server instance.

Operands

jms_host_name

The name of the host to be deleted.

Examples

Example 1   Deleting a JMS host

The following subcommand deletes the JMS host named MyNewHost.

asadmin> delete-jms-host MyNewHost
Command delete-jms-host executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jms-resource

Removes a JMS resource

Synopsis

asadmin [asadmin-options] delete-jms-resource [--help]
[--target target]
jndi_name

Description

The delete-jms-resource subcommand removes the specified Java Message Service (JMS) resource. Ensure that you remove all references to this resource before executing this subcommand.

This subcommand is supported in remote mode only. Remote asadmin subcommands require a running domain administration server (DAS).

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the JMS resource only from the specified target. Valid values are as follows:

Resources are always created for a domain as a whole but are only active for targets for which a <resource-ref> has been created using the --target option when the resource was created. This means that deleting a resource only deletes the <resource-ref> element for the specified --target, and does not delete the resource from the domain as a whole unless domain is specified as the --target for the deletion.

server

Deletes the JMS resource from the default server instance. This is the default value.

domain

Deletes the JMS resource from the domain.

cluster-name

Deletes the JMS resource from every server instance in the specified cluster.

instance-name

Deletes the JMS resource from the specified server instance.

Operands

jndi_name

The JNDI name of the JMS resource to be deleted.

Examples

Example 1   Deleting a JMS destination resource

The following subcommand deletes the JMS destination resource named jms/MyQueue.

asadmin> delete-jms-resource jms/MyQueue
Administered object jms/MyQueue deleted.
Command delete-jms-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jndi-resource

Removes a JNDI resource

Synopsis

asadmin [asadmin-options] delete-jndi-resource [--help]
[--target target] jndi_name

Description

The delete-jndi-resource subcommand removes the specified JNDI resource. You must remove all associations to the JNDI resource before running this subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Valid targets are described below.

Resources are always created for a domain as a whole but are only active for targets for which a <resource-ref> has been created using the --target option when the resource was created. This means that deleting a resource only deletes the <resource-ref> element for the specified --target, and does not delete the resource from the domain as a whole unless domain is specified as the --target for the deletion.

server

Deletes the resource from the default server instance. This is the default value

domain

Deletes the resource from the domain

cluster_name

Deletes the resource for every server instance in the cluster

instance_name

Deletes the resource from the specified server instance

Operands

jndi_name

The name of the JNDI resource to be removed.

Examples

Example 1   Deleting a JNDI Resource

This example removes an existing JNDI resource named sample_jndi_resource.

asadmin> delete-jndi-resource sample_jndi_resource
Command delete-jndi-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-jvm-options

Removes one or more options for the Java application launcher

Synopsis

asadmin [asadmin-options] delete-jvm-options [--help]
[--target target] [--profiler={true|false}]
(jvm-option-name[=jvm-option-value]) [:jvm-option-name[=jvm-option-name]]*

Description

The delete-jvm-options subcommand removes one or more command-line options for the Java application launcher. These options are removed from the Java configuration java—config element or the profiler profiler element of the domain.xml file. To see the Java application launcher options that can be deleted, use the list-jvm-options(1) subcommand.

The deletion of some options requires a server restart for changes to become effective. Other options are set immediately in the environment of the domain administration server (DAS) and do not require a restart.

Whether a restart is required depends on the type of option.

  • Restart is not required for Java system properties whose names do not start with -Djava. or -Djavax. (including the trailing period). For example, restart is not required for the following Java system property:

    -Denvironment=Production

  • Restart is required for the following options:

    • Java system properties whose names start with -Djava. or -Djavax. (including the trailing period). For example:

      -Djava.security.manager

    • Startup parameters for the Java application launcher. For example:

      -client

      -Xmx1024m

      -d64

To restart the DAS, use the restart-domain(1) command.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are removing Java application launcher options. Valid values are as follows:

server

Specifies the DAS (default).

instance-name

Specifies a Eclipse GlassFish instance.

cluster-name

Specifies a cluster.

configuration-name

Specifies a named configuration.

--profiler

Indicates whether the Java application launcher options are for the profiler. The option must have been set for a profiler for this option to be true.

Operands

jvm-option-name

One or more options delimited by a colon (:). The format of the operand depends on the following:

  • If the option has a name and a value, the format is option-name=value.

  • If the option has only a name, the format is option-name. For example, -Xmx2048m.

If an option name or option value contains a colon, the backslash (\) must be used to escape the colon in the name or value. Other characters might also require an escape character. For more information about escape characters in subcommand options, see the asadmin(1M) man page.

Examples

Example 1   Deleting Java Application Launcher Options

This example removes multiple Java application launcher options.

asadmin> delete-jvm-options -Doption1=value1
"-Doption1=value1:-Doption2=value2"
Command delete-jvm-options executed successfully

Example 2   Deleting a Java Application Launcher Option From the Profiler

This example removes a Java application launcher startup parameter for the profiler.

asadmin> delete-jvm-options --profiler=true -XX:MaxPermSize=192m
Command delete-jvm-options executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

For more information about the Java application launcher, see the reference page for the operating system that you are using:

delete-lifecycle-module

Removes the lifecycle module

Synopsis

asadmin [asadmin-options] delete-lifecycle-module [--help]
[--target target] module_name

Description

The delete-lifecycle-module subcommand removes a lifecycle module. A lifecycle module provides a means of running a short or long duration Java-based task at a specific stage in the server life cycle. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Indicates the location where the lifecycle module is to be deleted. Valid values are

  • server- Specifies the default server instance as the target for deleting the lifecycle module. server is the name of the default server instance and is the default value for this option.

  • cluster_name- Specifies a particular cluster as the target for deleting the lifecycle module.

  • instance_name- Specifies a particular server instance as the target for deleting the lifecycle module.

Operands

module_name

This operand is a unique identifier for the deployed server lifecycle event listener module.

Examples

Example 1   Deleting a Lifecycle Module

The following example deletes a lifecycle module named customSetup.

asadmin> delete-lifecycle-module customSetup
Command delete-lifecycle-module executed successfully

Exit Status

0

command executed successfully

1

error in executing the command

delete-local-instance

Deletes a Eclipse GlassFish instance on the machine where the subcommand is run

Synopsis

asadmin [asadmin-options] delete-local-instance [--help]
[--nodedir node-dir] [--node node-name]
[instance-name]

Description

The delete-local-instance subcommand deletes a Eclipse GlassFish instance on the machine where the subcommand is run. This subcommand does not require the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured. You must run this command from the machine where the instance resides.

The subcommand can delete any Eclipse GlassFish instance, regardless of how the instance was created. For example, this subcommand can delete an instance that was created by using the create-instance(1) subcommand.

The instance that is being deleted must not be running. Otherwise, an error occurs.

The subcommand deletes an instance by performing the following actions:

  • Removing the instance from the configuration of the domain administration server (DAS)

  • Deleting the instance’s files from file system

If the instance that is being deleted is the only instance that is using the node directory, that directory is also removed.

If a standalone instance is deleted, the instance’s standalone configuration is also deleted. A standalone instance refers to a configuration that is named instance-name`-config` to which no other clusters or unclustered instances refer.

The delete-local-instance subcommand does not contact the DAS to determine the node on which the instance resides. To determine the node on which the instance resides, the subcommand searches the directory that contains the node directories. If multiple node directories exist, the node must be specified as an option of the subcommand.

If no operand is specified and only one instance resides on the specified node, the subcommand deletes the instance. If no operand is specified and multiple instances reside on the node, an error occurs.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--nodedir

Specifies the directory that contains the instance’s node directory. The instance’s files are stored in the instance’s node directory. The default is as-install/nodes.

--node

Specifies the node on which the instance resides. This option may be omitted only if the directory that the --nodedir option specifies contains only one node directory. Otherwise, this option is required.

Operands

instance-name

The name of the instance to delete. This operand may be omitted if only one instance resides on the specified node. Otherwise, this operand is required.

Examples

Example 1   Deleting an Instance

This example deletes the instance pmdsainst.

asadmin> delete-local-instance pmdsainst

Command delete-local-instance executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-mail-resource

Removes a Jakarta Mail session resource

Synopsis

asadmin [asadmin-options] delete-mail-resource [--help]
[--target target] jndi_name

Description

The delete-mail-resource subcommand removes the specified Jakarta Mail session resource. Ensure that you remove all references to this resource before running this subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target from which you are deleting the Jakarta Mail session resource. Valid values are:

server

Deletes the resource from the default server instance. This is the default value.

domain

Deletes the resource from the domain.

cluster_name

Deletes the resource from every server instance in the cluster.

instance_name

Deletes the resource from a particular server instance.

Operands

jndi_name

The JNDI name of the Jakarta Mail session resource to be deleted.

Examples

Example 1   Deleting a Jakarta Mail Resource

This example deletes the Jakarta Mail session resource named mail/MyMailSession.

asadmin> delete-mail-resource mail/MyMailSession
Command delete-mail-resource executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-managed-executor-service

Removes a managed executor service resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] delete-managed-executor-service [--help]
[--target target]
managed_executor_service_name

Description

The delete-managed-executor-service subcommand removes a managed executor service resource with the specified JNDI name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the resource. Valid targets are:

server

Deletes the resource from the default server instance. This is the default value.

domain

Deletes the resource from the domain.

cluster_name

Deletes the resource from every server instance in the specified cluster.

instance_name

Deletes the resource from the specified server instance.

Operands

managed_executor_service_name

The JNDI name of the resource to be deleted.

Examples

Example 1   Deleting a Managed Executor Service Resource

This example deletes the managed executor service resource named concurrent/myExecutor.

asadmin> delete-managed-executor-service concurrent/myExecutor
Managed executor service concurrent/myExecutor deleted successfully.
Command delete-managed-executor-service executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-managed-scheduled-executor-service

Removes a managed scheduled executor service resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] delete-managed-scheduled-executor-service [--help]
[--target target]
managed_scheduled_executor_service_name

Description

The delete-managed-scheduled-executor-service subcommand removes a managed scheduled executor service resource with the specified JNDI name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the resource. Valid targets are:

server

Deletes the resource from the default server instance. This is the default value.

domain

Deletes the resource from the domain.

cluster_name

Deletes the resource from every server instance in the specified cluster.

instance_name

Deletes the resource from the specified server instance.

Operands

managed_scheduled_executor_service_name

The JNDI name of the resource to be deleted.

Examples

Example 1   Deleting a Managed Scheduled Executor Service Resource

This example deletes the managed scheduled executor service resource named concurrent/myScheduledExecutor.

asadmin> delete-managed-scheduled-executor-service concurrent/myScheduledExecutor
Managed scheduled executor service concurrent/myScheduledExecutor deleted successfully.
Command delete-managed-scheduled-executor-service executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-managed-thread-factory

Removes a managed thread factory resource with the specified JNDI name

Synopsis

asadmin [asadmin-options] delete-managed-thread-factory [--help]
[--target target]
managed_thread_factory_name

Description

The delete-managed-thread-factory subcommand removes a managed thread factory resource with the specified JNDI name.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the resource. Valid targets are:

server

Deletes the resource from the default server instance. This is the default value.

domain

Deletes the resource from the domain.

cluster_name

Deletes the resource from every server instance in the specified cluster.

instance_name

Deletes the resource from the specified server instance.

Operands

managed_thread_factory_name

The JNDI name of the resource to be deleted.

Examples

Example 1   Deleting a Managed Thread Factory Resource

This example deletes the managed thread factory resource named concurrent/myThreadFactory.

asadmin> delete-managed-thread-factory concurrent/myThreadFactory
Managed thread factory concurrent/myThreadFactory deleted successfully.
Command delete-managed-thread-factory executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-message-security-provider

Enables administrators to delete a message security provider

Synopsis

asadmin [asadmin-options] delete-message-security-provider [--help]
[--target target]
--layer message_layer
provider_name

Description

The delete-message-security-provider subcommand enables administrators to delete a message security provider.

In terms of what happens when this subcommand is run, the provider-config sub-element for the given message layer (message-security-config element of domain.xml is deleted. The domain.xml file specifies parameters and properties to the Eclipse GlassFish). The options specified in the list below apply to attributes within the message-security-config and provider-config sub-elements of the domain.xml file.

If the message-layer (message-security-config attribute) does not exist, it is created, and then the provider-config is created under it.

This command is supported in remote mode only.

Options

If an option has a short option name, then the short option precedes the long option name. Short options have one dash whereas long options have two dashes.

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are deleting the message security provider. Valid values are

server

Deletes the message security provider from the default server instance server and is the default value

domain

Deletes the message security provider from the domain.

cluster_name

Deletes the message security provider from every server instance in the cluster.

instance_name

Deletes the message security provider from a particular sever instance.

--layer

The message-layer from which the provider has to be deleted. The default value is HttpServlet.

Operands

provider_name

The name of the provider used to reference the provider-config element.

Examples

Example 1   Deleting a message security provider

The following example shows how to delete a message security provider for a client.

asadmin> delete-message-security-provider
--layer SOAP mySecurityProvider

Exit Status

0

command executed successfully

1

error in executing the command

delete-module-config

Removes the configuration of a module from domain.xml

Synopsis

asadmin [asadmin-options] delete-module-config [--help]
[--target target]
service_name

Description

The delete-module-config subcommand removes the configuration of a module from domain.xml and causes the module to use the default configuration included in the module.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which the configuration is to be deleted. Possible values are as follows:

server

Deletes the configuration from the default server instance. This is the default value.

domain

Deletes the configuration from the default domain.

cluster-name

Deletes the configuration from every server instance in the specified cluster.

instance-name

Deletes the configuration from the specified instance.

Operands

service_name

The name of the module for which configuration is to be removed.

Examples

Example 1   Deleting a Default Configuration From domain.xml

This example deletes the configuration of the web container module from domain1 in server-config (the default configuration).

asadmin> delete-module-config web-container
Command delete-module-config executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-network-listener

Removes a network listener

Synopsis

asadmin [asadmin-options] delete-network-listener [--help]
[--target target]
listener-name

Description

The delete-network-listener subcommand removes the specified network listener. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the network listener only from the specified target. Valid values are as follows:

server

Deletes the network listener from the default server instance. This is the default value.

configuration-name

Deletes the network listener from the specified configuration.

cluster-name

Deletes the network listener from all server instances in the specified cluster.

standalone-instance-name

Deletes the network listener from the specified standalone server instance.

Operands

listener-name

The name of the network listener to be deleted.

Examples

Example 1   Deleting a Network Listener

The following command deletes the network listener named sampleListener:

asadmin> delete-network-listener sampleListener
Command delete-network-listener executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-node-config

Deletes a node that is not enabled for remote communication

Synopsis

asadmin [asadmin-options] delete-node-config [--help]
node-name

Description

The delete-node-config subcommand deletes a node that is not enabled for remote communication from the domain. This subcommand does not require the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured.

This subcommand can delete only a node that is not enabled for remote communication. The subcommand for deleting other types of nodes depends on the type of the node:

  • A node that is enabled for remote communication over DCOM must be deleted by using the delete-node-dcom(1) subcommand.

  • A node that is enabled for remote communication over SSH must be deleted by using the delete-node-ssh(1) subcommand.

To determine whether a node is enabled for remote communication, use the list-nodes(1) subcommand.

No Eclipse GlassFish instances must reside on the node that is being deleted. Otherwise, the subcommand fails. Before running this subcommand, delete any instances that reside on the node by using, for example, the delete-instance(1) subcommand or the delete-local-instance(1) subcommand.

The predefined node localhost-domain cannot be deleted.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

node-name

The name of the node to delete. The node must not be enabled for communication over DCOM or SSH. Otherwise, an error occurs.

Examples

Example 1   Deleting a Node That Is Not Enabled for Remote Communication

This example deletes the node sj03, which is not enabled for remote communication.

asadmin> delete-node-config sj03

Command delete-node-config executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-node-dcom

Deletes a node that is enabled for communication over DCOM

Synopsis

asadmin [asadmin-options] delete-node-dcom [--help]
[--uninstall={false|true}] [--force={false|true}]
node-name

Description

The delete-node-dcom subcommand deletes a node that is enabled for communication over the Distributed Component Object Model (DCOM) remote protocol from the domain. The DCOM protocol is available only on Windows systems. This subcommand does not require DCOM to be configured.

This subcommand can delete only a node that is enabled for communication over DCOM. The subcommand for deleting other types of nodes depends on the type of the node:

  • A node that is enabled for communication over secure shell (SSH) must be deleted by using the delete-node-ssh(1) subcommand.

  • A node that is not enabled for communication must be deleted by using the delete-node-config(1) subcommand.

To determine whether a node is enabled for communication over DCOM, use the list-nodes(1) subcommand.

No Eclipse GlassFish instances must reside on the node that is being deleted. Otherwise, the subcommand fails. Before running this subcommand, delete any instances that reside on the node by using, for example, the delete-instance(1) subcommand or the delete-local-instance(1) subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--uninstall

Specifies whether the Eclipse GlassFish software is uninstalled from host that the node represents. Possible values are as follows:

false

The Eclipse GlassFish software is not uninstalled from the host (default).

true

The Eclipse GlassFish software is uninstalled from the host. By default, if any node except the predefined node localhost-domain resides on any host from which Eclipse GlassFish software is being uninstalled, the subcommand fails.
To uninstall the Eclipse GlassFish software from a host on which user-defined nodes reside, set the --force option to true.
If the --force option is true, the subcommand removes the entire content of the parent of the base installation directory.

--force

If --uninstall is true, specifies whether the subcommand uninstalls the Eclipse GlassFish software from a host even if a user-defined node resides on the host. Possible values are as follows:

false

If a user-defined node resides on a host, the software is not uninstalled and the subcommand fails (default).
If the --force option is false, the subcommand removes only the Eclipse GlassFish software files. Other content if the parent of the base installation directory, such as configuration files, are not removed.

true

The subcommand uninstalls the Eclipse GlassFish software from the host even if a user-defined node resides on the host.
If the --force option is true, the subcommand removes the entire content of the parent of the base installation directory.

Operands

node-name

The name of the node to delete. The node must enabled for communication over DCOM. Otherwise, an error occurs.

Examples

Example 1   Deleting a Node That Is Enabled for Communication Over DCOM

This example deletes the node xkyd, which is enabled for communication over DCOM.

asadmin> delete-node-dcom xkyd
Command delete-node-dcom executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-node-ssh

Deletes a node that is enabled for communication over SSH

Synopsis

asadmin [asadmin-options] delete-node-ssh [--help]
[--uninstall={false|true}] [--force={false|true}]
node-name

Description

The delete-node-ssh subcommand deletes a node that is enabled for communication over secure shell (SSH) from the domain. This subcommand does not require SSH to be configured.

This subcommand can delete only a node that is enabled for communication over SSH. The subcommand for deleting other types of nodes depends on the type of the node:

  • A node that is enabled for communication over the Distributed Component Object Model (DCOM) remote protocol must be deleted by using the delete-node-dcom(1) subcommand.

  • A node that is not enabled for remote communication must be deleted by using the delete-node-config(1) subcommand.

To determine whether a node is enabled for communication over SSH, use the list-nodes(1) subcommand.

No Eclipse GlassFish instances must reside on the node that is being deleted. Otherwise, the subcommand fails. Before running this subcommand, delete any instances that reside on the node by using, for example, the delete-instance(1) subcommand or the delete-local-instance(1) subcommand.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--uninstall

Specifies whether the Eclipse GlassFish software is uninstalled from host that the node represents. Possible values are as follows:

false

The Eclipse GlassFish software is not uninstalled from the host (default).

true

The Eclipse GlassFish software is uninstalled from the host. By default, if any node except the predefined node localhost-domain resides on any host from which Eclipse GlassFish software is being uninstalled, the subcommand fails. To uninstall the Eclipse GlassFish software from a host on which user-defined nodes reside, set the --force option to true. If the --force option is true, the subcommand removes the entire content of the parent of the base installation directory.

--force

If --uninstall is true, specifies whether the subcommand uninstalls the Eclipse GlassFish software from a host even if a user-defined node resides on the host. Possible values are as follows:

false

If a user-defined node resides on a host, the software is not uninstalled and the subcommand fails (default).
If the --force option is false, the subcommand removes only the Eclipse GlassFish software files. Other content if the parent of the base installation directory, such as configuration files, are not removed.

true

The subcommand uninstalls the Eclipse GlassFish software from the host even if a user-defined node resides on the host.
If the --force option is true, the subcommand removes the entire content of the parent of the base installation directory.

Operands

node-name

The name of the node to delete. The node must enabled for communication over SSH. Otherwise, an error occurs.

Examples

Example 1   Deleting a Node That Is Enabled for Communication Over SSH

This example deletes the node eg1, which is enabled for communication over SSH.

asadmin> delete-node-ssh eg1
Command delete-node-ssh executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-password-alias

Deletes a password alias

Synopsis

asadmin [asadmin-options] delete-password-alias [--help]
aliasname

Description

This subcommand deletes a password alias.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

Operands

aliasname

This is the name of the substitute password as it appears in domain.xml.

Examples

Example 1   Deleting a Password Alias

asadmin>delete-password-alias
jmspassword-alias

Command delete-password-alias executed successfully

Exit Status

0

command executed successfully

1

error in executing the command

delete-profiler

Removes the profiler element

Synopsis

asadmin [asadmin-options] delete-profiler [--help]
[--target target_name]

Description

The delete-profiler subcommand deletes the profiler element in the Java configuration. Only one profiler can exist at a time. If you attempt to create a profiler while one already exists, an error message is displayed and the existing profiler must be deleted.

For changes to take effect, the server must restarted.

This command is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target profiler element which you are deleting. Valid values are

server

Deletes the profiler element for the default server instance server and is the default value.

configuration_name

Deletes the profiler element for the named configuration.

cluster_name

Deletes the profiler element for every server instance in the cluster.

instance_name

Deletes the profiler element for a particular server instance.

Examples

Example 1   Deleting a Profile

This example deletes the profiler named sample_profiler.

asadmin> delete-profiler sample_profiler
Command delete-profiler executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-protocol

Removes a protocol

Synopsis

asadmin [asadmin-options] delete-protocol [--help]
[--target target]
protocol-name

Description

The delete-protocol subcommand removes the specified protocol. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the protocol only from the specified target. Valid values are as follows:

server

Deletes the protocol from the default server instance. This is the default value.

configuration-name

Deletes the protocol from the specified configuration.

cluster-name

Deletes the protocol from all server instances in the specified cluster.

standalone-instance-name

Deletes the protocol from the specified standalone server instance.

Operands

protocol-name

The name of the protocol to be deleted.

Examples

Example 1   Deleting a Protocol

The following command deletes the protocol named http-1:

asadmin> delete-protocol http-1
Command delete-protocol executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-protocol-filter

Removes a protocol filter

Synopsis

asadmin [asadmin-options] delete-protocol-filter [--help]
--protocol protocol-name
[--target server]
protocol-filter-name

Description

The delete-protocol-filter subcommand removes the specified protocol filter. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--protocol-name

The name of the associated protocol.

--target

Deletes the protocol filter only from the specified target. Valid values are as follows:

server

Deletes the protocol filter from the default server instance. This is the default value.

configuration-name

Deletes the protocol filter from the specified configuration.

cluster-name

Deletes the protocol filter from all server instances in the specified cluster.

standalone-instance-name

Deletes the protocol filter from the specified standalone server instance.

Operands

protocol-filter-name

The name of the protocol filter to be deleted.

Examples

Example 1   Deleting a Protocol Filter

The following command deletes the protocol filter named http1-filter:

asadmin> delete-protocol-filter --protocol http1 http1-filter
Command delete-protocol-filter executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-protocol-finder

Removes a protocol finder

Synopsis

asadmin [asadmin-options] delete-protocol-finder [--help]
--protocol protocol-name
[--target server]
protocol-finder-name

Description

The delete-protocol-finder subcommand removes the specified protocol finder. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--protocol-name

The name of the associated protocol.

--target

Deletes the protocol finder only from the specified target. Valid values are as follows:

server

Deletes the protocol finder from the default server instance. This is the default value.

configuration-name

Deletes the protocol finder from the specified configuration.

cluster-name

Deletes the protocol finder from all server instances in the specified cluster.

standalone-instance-name

Deletes the protocol finder from the specified standalone server instance.

Operands

protocol-finder-name

The name of the protocol finder to be deleted.

Exit Status

0

command executed successfully

1

error in executing the command

delete-resource-adapter-config

Deletes the resource adapter configuration

Synopsis

asadmin [asadmin-options] delete-resource-adapter-config [--help]
raname

Description

The delete-resource-adapter-config subcommand deletes the configuration information for the connector module.

This command is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option is deprecated.

Operands

raname

Specifies the connector module name.

Examples

Example 1   Deleting a Resource Adapter Configuration

This example deletes the configuration information for ra1.

asadmin> delete-resource-adapter-config ra1
Command delete-resource-adapter-config executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-resource-ref

Removes a reference to a resource

Synopsis

asadmin [asadmin-options] delete-resource-ref [--help]
[--target target] reference_name

Description

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.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target from which you are removing the resource reference. Valid values are

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.

Operands

reference_name

The name or JNDI name of the resource.

Examples

Example 1   Removing a Reference to a Resource

This example removes a reference to the JMS destination resource jms/Topic on the cluster cluster1.

asadmin> delete-resource-ref --target cluster1 jms/Topic
resource-ref jms/Topic deleted successfully.
Command delete-resource-ref executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-ssl

Deletes the SSL element in the selected HTTP listener, IIOP listener, or IIOP service

Synopsis

asadmin [asadmin-options] delete-ssl [--help]
[--target target]
--type listener_or_service_type
listener_id

Description

The delete-ssl subcommand deletes the SSL element in the selected HTTP listener, IIOP listener, or IIOP service.

The listener_id is not required if the --type is iiop-service.

This subcommand is supported in remote mode only.

Options

If an option has a short option name, then the short option precedes the long option name. Short options have one dash whereas long options have two dashes.

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Specifies the target on which you are configuring the ssl element. The following values are valid:

server

Specifies the server in which the iiop-service or HTTP/IIOP listener is to be unconfigured for SSL.

config

Specifies the configuration that contains the HTTP/IIOP listener or iiop-service for which SSL is to be unconfigured.

cluster

Specifies the cluster in which the HTTP/IIOP listener or iiop-service is to be unconfigured for SSL. All the server instances in the cluster will get SSL unconfigured for the respective listener or iiop-service.

instance

Specifies the instance in which the HTTP/IIOP listener or iiop-service is to be unconfigured for SSL.

--type

The type of service or listener for which the SSL is deleted. The type must be one of the following types:

  • http-listener

  • iiop-listener

  • iiop-service

Operands

listener_id

The ID of the listener from which the SSL element is to be deleted.
The listener_id operand is not required if the --type is iiop-service.

Examples

Example 1   Deleting an SSL element from an HTTP listener

The following example shows how to delete an SSL element from an HTTP listener named http-listener-1.

asadmin> delete-ssl
--type http-listener http-listener-1
Command delete-ssl executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-system-property

Removes a system property of the domain, configuration, cluster, or server instance, one at a time

Synopsis

asadmin [asadmin-options] delete-system-property [--help]
[--target target_name ]
[property_name]

Description

The delete-system-property subcommand deletes a system property of a domain, configuration, cluster, or server instance. Make sure that the system property is not referenced elsewhere in the configuration before deleting it.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target on which you are deleting the system properties. The valid targets for this subcommand are instance, cluster, configuration, domain, and server. Server is the default option.

Operands

property_name

The name of the system property to remove.

Examples

Example 1   Deleting a System Property

This example deletes the system property named http-listener-port.

asadmin> delete-system-property http-listener-port
Command delete-system-property executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-threadpool

Removes a thread pool

Synopsis

asadmin [asadmin-options] delete-threadpool [--help]
[--target target] threadpool-id

Description

Removes the thread pool with the specified ID. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target from which you are removing the thread pool. Valid values are as follows:

server

Deletes the thread pool for the default Eclipse GlassFish instance server and is the default value.

configuration-name

Deletes the thread pool for the named configuration.

cluster-name

Deletes the thread pool for every instance in the cluster.

instance-name

Deletes the thread pool for a particular instance.

Operands

threadpool-id

An ID for the work queue, for example, thread-pool1, threadpool-2, and so forth.

Examples

Example 1   Deleting a Thread Pool

This example deletes threadpool-l.

asadmin> delete-threadpool threadpool-1
Command delete-threadpool executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

delete-transport

Removes a transport

Synopsis

asadmin [asadmin-options] delete-transport [--help]
[--target target]
transport-name

Description

The delete-transport subcommand removes the specified transport. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the transport only from the specified target. Valid values are as follows:

server

Deletes the transport from the default server instance. This is the default value.

configuration-name

Deletes the transport from the specified configuration.

cluster-name

Deletes the transport from all server instances in the specified cluster.

standalone-instance-name

Deletes the transport from the specified standalone server instance.

Operands

transport-name

The name of the transport to be deleted.

Examples

Example 1   Deleting a Transport

The following command deletes the transport named http1-trans:

asadmin> delete-transport http1-trans
Command delete-transport executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

delete-virtual-server

Removes a virtual server

Synopsis

asadmin [asadmin-options] delete-virtual-server [--help]
[--target target] virtual-server-id

Description

The delete-virtual-server subcommand removes the virtual server with the specified virtual server ID. This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

Deletes the virtual server only from the specified target. Valid values are as follows:

server

Deletes the virtual server from the default server instance. This is the default value.

configuration-name

Deletes the virtual server from the specified configuration.

cluster-name

Deletes the virtual server from all server instances in the specified cluster.

standalone-instance-name

Deletes the virtual server from the specified standalone server instance.

Operands

virtual-server-id

The unique identifier for the virtual server to be deleted.

Examples

Example 1   Deleting a Virtual Server

The following command deletes the virtual server named sample_vs1:

asadmin> delete-virtual-server sample_vs1
Command delete-virtual-server executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

deploy

Deploys the specified component

Synopsis

asadmin [asadmin-options] deploy [--help]
[--force={false|true}]
[--virtualservers virtual_servers]
[--contextroot context_root]
[--precompilejsp={false|true}]
[--verify={false|true}]
[--name component_name]
[--upload={true|false}]
[--retrieve local_dirpath]
[--dbvendorname dbvendorname]
[--createtables={true|false}|--dropandcreatetables={true|false}]
[--uniquetablenames={true|false}]
[--deploymentplan deployment_plan]
[--altdd alternate_deploymentdescriptor]
[--runtimealtdd runtime_alternate_deploymentdescriptor]
[--deploymentorder deployment_order]
[--enabled={true|false}]
[--generatermistubs={false|true}]
[--availabilityenabled={false|true}]
[--asyncreplication={true|false}]
[--lbenabled={true|false}]
[--keepstate={false|true}]
[--libraries jar_file[,jar_file]*]
[--target target]
[--type pkg-type]
[--properties(name=value)[:name=value]*]
[file_archive|filepath]

Description

The deploy subcommand deploys applications to the server. Applications can be enterprise applications, web applications, Enterprise JavaBeans (EJB) modules, connector modules, and application client modules. If the component is already deployed or already exists, it is forcibly redeployed if the --force option is set to true (default is false).

The --createtables and --dropandcreatetables options are boolean flags and therefore can take the values of true or false. These options are only used during deployment of CMP beans that have not been mapped to a database (that is, no sun-cmp-mappings.xml descriptor is provided in the module’s META-INF directory). They are ignored otherwise.

The --createtables and --dropandcreatetables options are mutually exclusive; only one should be used. If drop and/or create tables fails, the deployment does not fail; a warning message is provided in the log file.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--force

If set to true, redeploys the component even if the specified component has already been deployed or already exists. Default is false.

--virtualservers

One or more virtual server IDs. Multiple IDs are separated by commas.

--contextroot

Valid only if the archive is a web module. It is ignored for other archive types; it will be the value specified by default-context-path in web.xml, if specified; defaults to filename without extension.

--precompilejsp

By default this option does not allow the JSP to be precompiled during deployment. Instead, JSPs are compiled during runtime. Default is false.

--verify

If set to true and the required verifier packages are installed from the Update Tool, the syntax and semantics of the deployment descriptor is verified. Default is false.

--name

Name of the deployable component.
The name can include an optional version identifier, which follows the name and is separated from the name by a colon (:). The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash (-), and period (.) characters. For more information about module and application versions, see "Module and Application Versions" in Eclipse GlassFish Application Deployment Guide.

--upload

Specifies whether the subcommand uploads the file to the DAS. In most situations, this option can be omitted.
Valid values are as follows:

false

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.

true

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.

If a directory filepath is specified, this option is ignored.

--retrieve

Retrieves the client stub JAR file from the server machine to the local directory.

--dbvendorname

Specifies the name of the database vendor for which tables are created. Supported values include db2, mssql, mysql, oracle, derby, javadb, postgresql, and sybase. These values are case-insensitive. If not specified, the value of the database-vendor-name attribute in glassfish-ejb-jar.xml is used. If no value is specified, a connection is made to the resource specified by the jndi-name subelement of the cmp-resource element in the glassfish-ejb-jar.xml file, and the database vendor name is read. If the connection cannot be established, or if the value is not recognized, SQL-92 compliance is presumed.

--createtables

If specified as true, creates tables at deployment of an application with unmapped CMP beans. If specified as false, tables are not created. If not specified, the value of the create-tables-at-deploy entry in the cmp-resource element of the glassfish-ejb-jar.xml file determines whether or not tables are created. No unique constraints are created for the tables.

--dropandcreatetables

If specified as true when the component is redeployed, the tables created by the previous deployment are dropped before creating the new tables. Applies to deployed applications with unmapped CMP beans. Preexisting tables will not be dropped on the initial deployment of an application or on a deployment that follows an explicit undeploy. If specified as false, tables are neither dropped nor created. If not specified, the tables are dropped if the drop-tables-at-undeploy entry in the cmp-resource element of the glassfish-ejb-jar.xml file is set to true, and the new tables are created if the create-tables-at-deploy entry in the cmp-resource element of the glassfish-ejb-jar.xml file is set to true.

--uniquetablenames

Guarantees unique table names for all the beans and results in a hash code added to the table names. This is useful if you have an application with case-sensitive bean names. Applies to applications with unmapped CMP beans.

--deploymentplan

Deploys the deployment plan, which is a JAR file that contains Eclipse GlassFish descriptors. Specify this option when deploying a pure EAR file. A pure EAR file is an EAR without Eclipse GlassFish descriptors.

--altdd

Deploys the application using a Jakarta EE standard deployment descriptor that resides outside of the application archive. Specify an absolute path or a relative path to the alternate deployment descriptor file. The alternate deployment descriptor overrides the top-level deployment descriptor packaged in the archive. For example, for an EAR, the --altdd option overrides application.xml. For a standalone module, the --altdd option overrides the top-level module descriptor such as web.xml.

--runtimealtdd

Deploys the application using a Eclipse GlassFish runtime deployment descriptor that resides outside of the application archive. Specify an absolute path or a relative path to the alternate deployment descriptor file. The alternate deployment descriptor overrides the top-level deployment descriptor packaged in the archive. For example, for an EAR, the --runtimealtdd option overrides glassfish-application.xml. For a standalone module, the --runtimealtdd option overrides the top-level module descriptor such as glassfish-web.xml. Applies to Eclipse GlassFish deployment descriptors only (glassfish-*.xml); the name of the alternate deployment descriptor file must begin with glassfish-. Does not apply to sun-*.xml deployment descriptors, which are deprecated.

--deploymentorder

Specifies the deployment order of the application. This is useful if the application has dependencies and must be loaded in a certain order at server startup. The deployment order is specified as an integer. The default value is 100. Applications with lower numbers are loaded before applications with higher numbers. For example, an application with a deployment order of 102 is loaded before an application with a deployment order of 110. If a deployment order is not specified, the default value of 100 is assigned. If two applications have the same deployment order, the first application to be deployed is the first application to be loaded at server startup.
The deployment order is typically specified when the application is first deployed but can also be specified or changed after initial deployment using the set subcommand. You can view the deployment order of an application using the get subcommand.

--enabled

Allows users to access the application. If set to false, users will not be able to access the application. This option enables the application on the specified target instance or cluster. If you deploy to the target domain, this option is ignored, since deploying to the domain doesn’t deploy to a specific instance or cluster. The default is true.

--generatermistubs

If set to true, static RMI-IIOP stubs are generated and put into the client.jar. If set to false, the stubs are not generated. Default is false.

--availabilityenabled

This option controls whether high-availability is enabled for web sessions and for stateful session bean (SFSB) checkpointing and potentially passivation. If set to false (default) all web session saving and SFSB checkpointing is disabled for the specified application, web application, or EJB module. If set to true, the specified application or module is enabled for high-availability. Set this option to true only if high availability is configured and enabled at higher levels, such as the server and container levels.

--asyncreplication

This option controls whether web session and SFSB states for which high availability is enabled are first buffered and then replicated using a separate asynchronous thread. If set to true (default), performance is improved but availability is reduced. If the instance where states are buffered but not yet replicated fails, the states are lost. If set to false, performance is reduced but availability is guaranteed. States are not buffered but immediately transmitted to other instances in the cluster.

--lbenabled

This option controls whether the deployed application is available for load balancing. The default is true.

--keepstate

This option controls whether web sessions, SFSB instances, and persistently created EJB timers are retained between redeployments.
The default is false. This option is supported only on the default server instance, named server. It is not supported and ignored for any other target.
Some changes to an application between redeployments prevent this feature from working properly. For example, do not change the set of instance variables in the SFSB bean class.
For web applications, this feature is applicable only if in the glassfish-web-app.xml file the persistence-type attribute of the session-manager element is file.
For stateful session bean instances, the persistence type without high availability is set in the server (the sfsb-persistence-type attribute) and must be set to file, which is the default and recommended value.
If any active web session, SFSB instance, or EJB timer fails to be preserved or restored, none of these will be available when the redeployment is complete. However, the redeployment continues and a warning is logged.
To preserve active state data, Eclipse GlassFish serializes the data and saves it in memory. To restore the data, the class loader of the newly redeployed application deserializes the data that was previously saved.

--libraries

A comma-separated list of library JAR files. Specify the library JAR files by their relative or absolute paths. Specify relative paths relative to domain-dir`/lib/applibs`. The libraries are made available to the application in the order specified.

--target

Specifies the target to which you are deploying. Valid values are:

server

Deploys the component to the default server instance server and is the default value.

domain

Deploys the component to the domain. If domain is the target for an initial deployment, the application is deployed to the domain, but no server instances or clusters reference the application. If domain is the target for a redeployment (the --force option is set to true), and dynamic reconfiguration is enabled for the clusters or server instances that reference the application, the referencing clusters or server instances automatically get the new version of the application. If redeploying, and dynamic configuration is disabled, the referencing clusters or server instances do not get the new version of the application until the clustered or standalone server instances are restarted.

cluster_name

Deploys the component to every server instance in the cluster.

instance_name

Deploys the component to a particular stand-alone sever instance.

--type

The packaging archive type of the component that is being deployed. Possible values are as follows:

car

The component is packaged as a CAR file.

ear

The component is packaged as an EAR file.

ejb

The component is an EJB packaged as a JAR file.

osgi

The component is packaged as an OSGi bundle.

rar

The component is packaged as a RAR file.

war

The component is packaged as a WAR file.

--properties or --property

Optional keyword-value pairs that specify additional properties for the deployment. The available properties are determined by the implementation of the component that is being deployed or redeployed. The --properties option and the --property option are equivalent. You can use either option regardless of the number of properties that you specify.
You can specify the following properties for a deployment:

jar-signing-alias

Specifies the alias for the security certificate with which the application client container JAR file is signed. Java Web Start will not run code that requires elevated permissions unless it resides in a JAR file signed with a certificate that the user’s system trusts. For your convenience, Eclipse GlassFish signs the JAR file automatically using the certificate with this alias from the domain’s keystore. Java Web Start then asks the user whether to trust the code and displays the Eclipse GlassFish certificate information. To sign this JAR file with a different certificate, add the certificate to the domain keystore, then use this property. For example, you can use a certificate from a trusted authority, which avoids the Java Web Start prompt, or from your own company, which users know they can trust. Default is s1as, the alias for the self-signed certificate created for every domain.

java-web-start-enabled

Specifies whether Java Web Start access is permitted for an application client module. Default is true.

compatibility

Specifies the Eclipse GlassFish release with which to be backward compatible in terms of JAR visibility requirements for applications. The only allowed value is v2, which refers to Sun GlassFish Enterprise Server version 2 or Sun Java System Application Server version 9.1 or 9.1.1.Beginning in Jakarta EE 6, the Jakarta EE platform specification imposed stricter requirements than Jakarta EE 5 did on which JAR files can be visible to various modules within an EAR file. In particular, application clients must not have access to EJB JAR files or other JAR files in the EAR file unless references use the standard Java SE mechanisms (extensions, for example) or the Jakarta EE library-directory mechanism. Setting this property to v2 removes these restrictions.

keepSessions={false|true}

Superseded by the --keepstate option.
If the --force option is set to true, this property can by used to specify whether active sessions of the application that is being redeployed are preserved and then restored when the redeployment is complete. Applies to HTTP sessions in a web container. Default is false.

false

Active sessions of the application are not preserved and restored (default).

true

Active sessions of the application are preserved and restored.
If any active session of the application fails to be preserved or restored, none of the sessions will be available when the redeployment is complete. However, the redeployment continues and a warning is logged.
To preserve active sessions, Eclipse GlassFish serializes the sessions and saves them in memory. To restore the sessions, the class loader of the newly redeployed application deserializes any sessions that were previously saved.

preserveAppScopedResources

If set to true, preserves any application-scoped resources and restores them during redeployment. Default is false.

Other available properties are determined by the implementation of the component that is being redeployed.
For components packaged as OSGi bundles (--type=osgi), the deploy subcommand accepts properties arguments to wrap a WAR file as a WAB (Web Application Bundle) at the time of deployment. The subcommand looks for a key named UriScheme and, if present, uses the key as a URL stream handler to decorate the input stream. Other properties are used in the decoration process. For example, the Eclipse GlassFish OSGi web container registers a URL stream handler named webbundle, which is used to wrap a plain WAR file as a WAB. For more information about usage, see the example in this help page.

Operands

file_archive|filepath

The path to the archive that contains the application that is being deployed. This path can be a relative path or an absolute path.
The archive can be in either of the following formats:

  • An archive file, for example, /export/JEE_apps/hello.war.
    If the --upload option is set to true, this is the path to the deployable file on the local client machine. If the --upload option is set to false, this is the path to the file on the server machine.

  • A directory that contains the exploded format of the deployable archive. This is the path to the directory on the server machine.

If you specify a directory, the --upload option is ignored.

Examples

Example 1   Deploying an Enterprise Application

This example deploys the enterprise application packaged in the Cart.ear file to the default server instance server. You can use the --target option to deploy to a different server instance or to a cluster.

asadmin> deploy Cart.ear
Application deployed successfully with name Cart.
Command deploy executed successfully

Example 2   Deploying a Web Application With the Default Context Root

This example deploys the web application in the hello.war file to the default server instance server. You can use the --target option to deploy to a different server instance or to a cluster.

asadmin> deploy hello.war
Application deployed successfully with name hello.
Command deploy executed successfully

Example 3   Forcibly Deploying a Web Application With a Specific Context Root

This example forcibly deploys the web application in the hello.war file. The context root of the deployed web application is greetings. If the application has already been deployed, it is redeployed.

asadmin> deploy --force=true --contextroot greetings hello.war
Application deployed successfully with name hello.
Command deploy executed successfully

Example 4   Deploying an Enterprise Bean

This example deploys a component based on the EJB specification (enterprise bean) with CMP and creates the database tables used by the bean.

This example uses the --target option. The target in this example is an existing cluster, cluster1.

asadmin> deploy --createtables=true --target cluster1 EmployeeEJB.jar
Application deployed successfully with name EmployeeEJB.
Command deploy executed successfully

Example 5   Deploying a Connector Module

This example deploys a connector module that is packaged in a RAR file.

This example uses the --target option. The target in this example is an existing standalone server instance that does not belong to a cluster.

asadmin> deploy --target myinstance jdbcra.rar
Application deployed successfully with name jdbcra.
Command deploy executed successfully

Example 6   Specifying the Deployment Order for an Application

This example specifies the deployment order for two applications. The cart application is loaded before the horse application at server startup.

Some lines of output are omitted from this example for readability.

asadmin> deploy --deploymentorder 102 --name cart cart.war
...
asadmin> deploy --deploymentorder 110 --name horse horse.war
...

Example 7   Deploying an Application Using an Alternate Jakarta EE Deployment Descriptor File

This example deploys an application using a Jakarta EE standard deployment descriptor file that resides outside of the application archive.

asadmin> deploy --altdd path_to_alternate_descriptor cart.ear
Application deployed successfully with name cart.
Command deploy executed successfully

Example 8   Deploying an Application Using an Alternate

Eclipse GlassFish Deployment Descriptor File

This example deploys an application using a Eclipse GlassFish runtime deployment descriptor file that resides outside of the application archive.

asadmin> deploy --runtimealtdd path_to_alternate_runtime_descriptor horse.ear
Application deployed successfully with name horse.
Command deploy executed successfully

Example 9   Wrapping a WAR File as a WAB

This example wraps a plain WAR file as a WAB when an OSGi bundle is deployed, and is specific to components packaged as OSGi bundles.

The backslash (\) character is used to escape characters in the command. For more information about escape characters in options for the asadmin utility, see the asadmin(1M) help page.

asadmin deploy --type osgi \
--properties "UriScheme=webbundle:Bundle-SymbolicName=bar:\
Import-Package=javax.servlet;javax.servlet.http;
%20version\\=3.0;resolution\\:
=mandatory:Web-ContextPath=/foo" \
/tmp/test_sample1.war
Application deployed successfully with name sample1.
Command deploy executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

deploydir

Deploys an exploded format of application archive

Synopsis

asadmin [asadmin-options] deploydir [--help]
[--force={false|true}]
[--virtualservers virtual_servers]
[--contextroot context_root]
[--verify={false|true}]
[--precompilejsp={false|true}]
[--name component-name]
[--retrieve local_dirpath]
[--uniquetablenames={true|false}]
[--dbvendorname dbvendorname]
[--createtables={false|true}|--dropandcreatetables={false|true}]
[--deploymentplan deployment_plan]
[--altdd alternate_deploymentdescriptor]
[--runtimealtdd runtime_alternate_deploymentdescriptor]
[--deploymentorder deployment_order]
[--enabled={true|false}]
[--generatermistubs={false|true}]
[--availabilityenabled={false|true}]
[--asyncreplication={true|false}]
[--lbenabled={true|false}]
[--keepstate={false|true}]
[--libraries jar_file[,jar_file]*]
[--target target]
[--type pkg-type]
[--properties(name=value)[:name=value]*]
dirpath

Description

The deploydir subcommand is deprecated. Use the deploy subcommand instead.

The deploydir subcommand deploys an application directly from a development directory. The appropriate directory hierarchy and deployment descriptors conforming to the Jakarta EE specification must exist in the deployment directory.

Directory deployment is for advanced developers only. Do not use deploydir in production environments. Instead, use the deploy subcommand. Directory deployment is only supported on localhost, that is, the client and server must reside on the same machine. For this reason, the only values for the --host option are:

  • localhost

  • The value of the $HOSTNAME environment variable

  • The IP address of the machine

If the --uniquetablenames, --createtables, and --dropandcreatetables options are not specified, the entries in the deployment descriptors are used.

The --force option makes sure the component is forcefully (re)deployed even if the specified component has already been deployed or already exists. Set the --force option to false for an initial deployment. If the specified application is running and the --force option is set to false, the subcommand fails.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--force

If set to true, redeploys the component even if the specified component has already been deployed or already exists. Default is false.

--virtualservers

One or more virtual server IDs. Multiple IDs are separated by commas.

--contextroot

Valid only if the archive is a web module. It is ignored for other archive types; it will be the value specified by default-context-path in web.xml, if specified; defaults to filename without extension.

--precompilejsp

By default this option does not allow the JSP to be precompiled during deployment. Instead, JSPs are compiled during runtime. Default is false.

--verify

If set to true and the required verifier packages are installed from the Update Tool, the syntax and semantics of the deployment descriptor is verified. Default is false.

--name

Name of the deployable component.
The name can include an optional version identifier, which follows the name and is separated from the name by a colon (:). The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash (-), and period (.) characters. For more information about module and application versions, see " Module and Application Versions" in Eclipse GlassFish Application Deployment Guide.

--retrieve

Retrieves the client stub JAR file from the server machine to the local directory.

--dbvendorname

Specifies the name of the database vendor for which tables are created. Supported values include db2, mssql, mysql, oracle, derby, javadb, postgresql, and sybase. These values are case-insensitive. If not specified, the value of the database-vendor-name attribute in glassfish-ejb-jar.xml is used. If no value is specified, a connection is made to the resource specified by the jndi-name subelement of the cmp-resource element in the glassfish-ejb-jar.xml file, and the database vendor name is read. If the connection cannot be established, or if the value is not recognized, SQL-92 compliance is presumed.

--createtables

If specified as true, creates tables at deployment of an application with unmapped CMP beans. If specified as false, tables are not created. If not specified, the value of the create-tables-at-deploy entry in the cmp-resource element of the glassfish-ejb-jar.xml file determines whether or not tables are created. No unique constraints are created for the tables.

--dropandcreatetables

If specified as true when the component is redeployed, the tables created by the previous deployment are dropped before creating the new tables. Applies to deployed applications with unmapped CMP beans. Preexisting tables will not be dropped on the initial deployment of an application or on a deployment that follows an explicit undeploy. If specified as false, tables are neither dropped nor created. If not specified, the tables are dropped if the drop-tables-at-undeploy entry in the cmp-resource element of the glassfish-ejb-jar.xml file is set to true, and the new tables are created if the create-tables-at-deploy entry in the cmp-resource element of the glassfish-ejb-jar.xml file is set to true.

--uniquetablenames

Guarantees unique table names for all the beans and results in a hash code added to the table names. This is useful if you have an application with case-sensitive bean names. Applies to applications with unmapped CMP beans.

--deploymentplan

Deploys the deployment plan, which is a JAR file that contains Eclipse GlassFish descriptors. Specify this option when deploying a pure EAR file. A pure EAR file is an EAR without Eclipse GlassFish descriptors.

--altdd

Deploys the application using a Jakarta EE standard deployment descriptor that resides outside of the application archive. Specify an absolute path or a relative path to the alternate deployment descriptor file. The alternate deployment descriptor overrides the top-level deployment descriptor packaged in the archive. For example, for an EAR, the --altdd option overrides application.xml. For a standalone module, the --altdd option overrides the top-level module descriptor such as web.xml.

--runtimealtdd

Deploys the application using a Eclipse GlassFish runtime deployment descriptor that resides outside of the application archive. Specify an absolute path or a relative path to the alternate deployment descriptor file. The alternate deployment descriptor overrides the top-level deployment descriptor packaged in the archive. For example, for an EAR, the --runtimealtdd option overrides glassfish-application.xml. For a standalone module, the --runtimealtdd option overrides the top-level module descriptor such as glassfish-web.xml. Applies to Eclipse GlassFish deployment descriptors only (glassfish-.xml); the name of the alternate deployment descriptor file must begin with glassfish-. Does not apply to sun-.xml deployment descriptors, which are deprecated.

--deploymentorder

Specifies the deployment order of the application. This is useful if the application has dependencies and must be loaded in a certain order at server startup. The deployment order is specified as an integer. The default value is 100. Applications with lower numbers are loaded before applications with higher numbers. For example, an application with a deployment order of 102 is loaded before an application with a deployment order of 110. If a deployment order is not specified, the default value of 100 is assigned. If two applications have the same deployment order, the first application to be deployed is the first application to be loaded at server startup.
The deployment order is typically specified when the application is first deployed but can also be specified or changed after initial deployment using the set subcommand. You can view the deployment order of an application using the get subcommand

--enabled

Allows users to access the application. If set to false, users will not be able to access the application. This option enables the application on the specified target instance or cluster. If you deploy to the target domain, this option is ignored, since deploying to the domain doesn’t deploy to a specific instance or cluster. The default is true.

--generatermistubs

If set to true, static RMI-IIOP stubs are generated and put into the client.jar. If set to false, the stubs are not generated. Default is false.

--availabilityenabled

This option controls whether high-availability is enabled for web sessions and for stateful session bean (SFSB) checkpointing and potentially passivation. If set to false (default) all web session saving and SFSB checkpointing is disabled for the specified application, web application, or EJB module. If set to true, the specified application or module is enabled for high-availability. Set this option to true only if high availability is configured and enabled at higher levels, such as the server and container levels.

--asyncreplication

This option controls whether web session and SFSB states for which high availability is enabled are first buffered and then replicated using a separate asynchronous thread. If set to true (default), performance is improved but availability is reduced. If the instance where states are buffered but not yet replicated fails, the states are lost. If set to false, performance is reduced but availability is guaranteed. States are not buffered but immediately transmitted to other instances in the cluster.

--lbenabled

This option controls whether the deployed application is available for load balancing. The default is true.

--keepstate
  • This option controls whether web sessions, SFSB instances, and persistently created EJB timers are retained between redeployments.
    The default is false. This option is supported only on the default server instance, named server. It is not supported and ignored for any other target.

  • Some changes to an application between redeployments prevent this feature from working properly. For example, do not change the set of instance variables in the SFSB bean class.
    For web applications, this feature is applicable only if in the glassfish-web-app.xml file the persistence-type attribute of the session-manager element is file.

  • For stateful session bean instances, the persistence type without high availability is set in the server (the sfsb-persistence-type attribute) and must be set to file, which is the default and recommended value.

  • If any active web session, SFSB instance, or EJB timer fails to be preserved or restored, none of these will be available when the redeployment is complete. However, the redeployment continues and a warning is logged.

  • To preserve active state data, Eclipse GlassFish serializes the data and saves it in memory. To restore the data, the class loader of the newly redeployed application deserializes the data that was previously saved.

--libraries

A comma-separated list of library JAR files. Specify the library JAR files by their relative or absolute paths. Specify relative paths relative to domain-dir`/lib/applibs`. The libraries are made available to the application in the order specified.

--target

Specifies the target to which you are deploying. Valid values are:

server

Deploys the component to the default server instance server and is the default value.

domain

Deploys the component to the domain. If domain is the target for an initial deployment, the application is deployed to the domain, but no server instances or clusters reference the application. If domain is the target for a redeployment (the --force option is set to true), and dynamic reconfiguration is enabled for the clusters or server instances that reference the application, the referencing clusters or server instances automatically get the new version of the application. If redeploying, and dynamic configuration is disabled, the referencing clusters or server instances do not get the new version of the application until the clustered or standalone server instances are restarted.

cluster_name

Deploys the component to every server instance in the cluster.

instance_name

Deploys the component to a particular stand-alone server instance.

--type

The packaging archive type of the component that is being deployed. Possible values are as follows:

car

The component is packaged as a CAR file.

ear

The component is packaged as an EAR file.

ejb

The component is an EJB packaged as a JAR file.

osgi

The component is packaged as an OSGi bundle.

rar

The component is packaged as a RAR file.

war

The component is packaged as a WAR file.

--properties or --property

Optional keyword-value pairs that specify additional properties for the deployment. The available properties are determined by the implementation of the component that is being deployed or redeployed. The --properties option and the --property option are equivalent. You can use either option regardless of the number of properties that you specify.
You can specify the following properties for a deployment:

jar-signing-alias

Specifies the alias for the security certificate with which the application client container JAR file is signed. Java Web Start will not run code that requires elevated permissions unless it resides in a JAR file signed with a certificate that the user’s system trusts. For your convenience, Eclipse GlassFish signs the JAR file automatically using the certificate with this alias from the domain’s keystore. Java Web Start then asks the user whether to trust the code and displays the Eclipse GlassFish certificate information. To sign this JAR file with a different certificate, add the certificate to the domain keystore, then use this property. For example, you can use a certificate from a trusted authority, which avoids the Java Web Start prompt, or from your own company, which users know they can trust. Default is s1as, the alias for the self-signed certificate created for every domain.

java-web-start-enabled

Specifies whether Java Web Start access is permitted for an application client module. Default is true.

compatibility

Specifies the Eclipse GlassFish release with which to be backward compatible in terms of JAR visibility requirements for applications. The only allowed value is v2, which refers to Sun GlassFish Enterprise Server version 2 or Sun Java System Application Server version 9.1 or 9.1.1. Beginning in Jakarta EE 6, the Jakarta EE platform specification imposed stricter requirements than Jakarta EE 5 did on which JAR files can be visible to various modules within an EAR file. In particular, application clients must not have access to EJB JAR files or other JAR files in the EAR file unless references use the standard Java SE mechanisms (extensions, for example) or the Jakarta EE library-directory mechanism. Setting this property to v2 removes these restrictions.

keepSessions={false|true}

Superseded by the --keepstate option.
If the --force option is set to true, this property can by used to specify whether active sessions of the application that is being redeployed are preserved and then restored when the redeployment is complete. Applies to HTTP sessions in a web container. Default is

false.
false

Active sessions of the application are not preserved and restored (default).

true

Active sessions of the application are preserved and restored.
If any active session of the application fails to be preserved or restored, none of the sessions will be available when the redeployment is complete. However, the redeployment continues and a warning is logged.
To preserve active sessions, Eclipse GlassFish serializes the sessions and saves them in memory. To restore the sessions, the class loader of the newly redeployed application deserializes any sessions that were previously saved.

preserveAppScopedResources

If set to true, preserves any application-scoped resources and restores them during redeployment. Default is false.

Other available properties are determined by the implementation of the component that is being redeployed.
For components packaged as OSGi bundles (--type=osgi), the deploy subcommand accepts properties arguments that can be used to wrap a WAR file as a WAB (Web Application Bundle). The subcommand looks for a key named UriScheme and, if present, uses the key as a URL stream handler to decorate the input stream. Other properties are used in the decoration process. The Eclipse GlassFish OSGi web container registers a URL stream handler named webbundle, which is used to wrap a plain WAR file as a WAB. For more information about usage, see the related example in the deploy(1) help page.

Operands

dirpath

Path to the directory containing the exploded format of the deployable archive. This is the path to the directory on the server machine.

Examples

Example 1   Deploying an Application From a Directory

In this example, the exploded application to be deployed is in the /home/temp/sampleApp directory. Because the --force option is set to true, if an application of that name already exists, the application is redeployed.

asadmin> deploydir --force=true --precompilejsp=true /home/temp/sampleApp
Application deployed successfully with name sampleApp.
WARNING : deploydir command deprecated. Please use deploy command instead.
Command deploydir executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

disable

Disables the component

Synopsis

asadmin [asadmin-options] disable [--help]
[--target target_name] component_name

Description

The disable subcommand immediately disables the specified deployed component. If the component has not been deployed, an error message is returned.

This subcommand is supported in remote mode only.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--target

This option specifies the target on which you are disabling the component. Valid values are:

server

Disables the component on the default server instance server and is the default value.

domain_name

Disables the component on the named domain.

cluster_name

Disables the component on every server instance in the cluster.

instance_name

Disables the component on a particular clustered or stand-alone server instance.

Operands

component_name

name of the component to be disabled.
The name can include an optional version identifier, which follows the name and is separated from the name by a colon (:). The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash (-), and period (.) characters. To disable multiple versions, you can use an asterisk (*) as a wildcard character. For more information about module and application versions, see "Module and Application Versions" in Eclipse GlassFish Application Deployment Guide.

Examples

Example 1   Disabling a Component

This example disables the deployed component sampleApp.

asadmin> disable sampleApp
Command disable executed successfully

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

disable-http-lb-application

Disables an application managed by a load balancer

Synopsis

asadmin [asadmin-options] disable-http-lb-application [--help]
[--timeout 30]
--name application_name target

Description

The disable disable-http-lb-application subcommand disables an application for load balancing. The disabled application goes offline for load balancing with minimal impact to users. Disabling an application gives a finer granularity of control than disabling a server instance and is most useful when a cluster is hosting multiple independent applications.

Once the application is disabled and the changes have been applied to the load balancer, new requests for the application are not forwarded to the target. Existing sessions continue to access the application until the timeout is reached. This process is known as quiescing.

If an application is deployed across multiple clusters, use this subcommand to disable it in one cluster while leaving it enabled in others.

If an application is deployed to a single server instance, use this subcommand to disable it in that instance while leaving the instance itself enabled.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--timeout

The timeout (in minutes) to wait before disabling the specified application. This time allows for the graceful shutdown (quiescing) of the specified application. The default value is 30 minutes. The minimum value is 1 minute.

--name

The name of the application to be disabled.

Operands

target

This operand specifies the server instance or cluster on which to disable the application. Valid values are:

  • cluster_name- The name of a target cluster.

  • instance_name- The name of a target server instance.

Examples

Example 1   Disabling an Application for Load Balancing

This example, disables an application for load balancing

asadmin> disable-http-lb-application --name webapps-simple mycluster

Command disable-http-lb-application executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

disable-http-lb-server

Disables a sever or cluster managed by a load balancer

Synopsis

asadmin [asadmin-options] disable-http-lb-server [--help]
[--timeout 30]
target

Description

The disable-http-lb-server subcommand disables a standalone server or cluster of servers for load balancing. The disabled server instance or cluster goes offline for load balancing with a minimum impact to users.

Once the target has been disabled and the changes have been applied to the load balancer, the load balancer stops assigning new requests to the target. Session requests with sessions created before disabling the target continue to be assigned to that target until the timeout is reached. This process is known as quiescing.

Changes are applied the load balancer automatically. You can also manually export the configuration using export-http-lb-config and copy it to the load balancer.

This subcommand is only applicable to Eclipse GlassFish. This subcommand is not applicable to Eclipse GlassFish.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin(1M) help page.

--help
-?

Displays the help text for the subcommand.

--timeout

The timeout (in minutes) to wait before disabling the specified target. This time allows for the graceful shutdown (quiescing) of the specified target. The default value is 30 minutes. The minimum value is 1 minute.

Operands

target

This operand specifies which server instances and clusters to disable. Valid values are:

  • cluster_name- The name of a target cluster.

  • instance_name- The name of a target server instance.

Examples

Example 1   Disabling a Cluster for Load Balancing

This example disables load balancing for a cluster named mycluster.

asadmin> disable-http-lb-server mycluster

Command disable-http-lb-server executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

disable-monitoring

Disables monitoring for the server or for specific monitorable modules

Synopsis

asadmin [asadmin-options] disable-monitoring [--help]
[--modules module-name][:module-name]*

Description

The disable-monitoring subcommand is used to turn off monitoring for Eclipse GlassFish or for particular modules during runtime. Changes are dynamic, that is, server restart is not required.

Running the disable-monitoring subcommand without the