Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Application Server 7 Administrator's Guide

Appendix A
Using the Command Line Interface

This appendix provides instructions for using the command line interface (the asadmin utility), in singlemode (that is, you run one command at a time from the command prompt) at the system prompt, in multimode (that is, you can run multiple commands without needing to reenter environment-level information), and in scripts and programs. You can use the command line interface in place of the Administration interface screens.

This appendix contains the following sections:


About the Command Line Interface

This section contains the following topics:

About the asadmin Utility

The asadmin utility performs all configuration and administration tasks. You can use this utility in place of using the Administration interface.

About Ant Tasks

Many developers use Ant to accelerate the development process for J2EE applications. Ant scripts leverage the asadmin utility for some tasks. Developers use the Ant tasks for building applications, deploying and undeploying modules and applications and for controlling the Sun ONE Application Server.

For more information on the Ant tasks, see the Sun ONE Application Server Developer’s Guide.

For more information on Ant, see the Jakarta Project site at http://jakarta.apache.org/ant/.

About Other Command Line Utilities

Sun ONE Application Server contains additional command line utilities. The following table lists the utilities and gives a brief description of each one.

Table A-1  Other Command-Line Utilities

Utility

Definition

appclient

Launches the Application Client Container and invokes the client application packaged in the application JAR file.

capture-schema

Gets the database schema and mapping information.

flexanlg

Generates statistics about your server.

htpasswd

Creates the user authentication files.

package-appclient

Packs the application client container libraries and jar files. For more information, see the Sun ONE Application Server Developer's Guide to Clients.

verifier

Validates the J2EE deployment descriptors with the DTDs. For more information, see the Sun ONE Application Server Developer’s Guide.

wscompile

Takes the service definition interface and generates the client stubs or server-side skeletons; or generates a set of WSDL for the provided interface.

wsdeploy

Generates a deployable WAR file.

For more information on these utilities, see their online help.


Using asadmin

The asadmin utility has a set of commands for performing administrative tasks. You can use these commands to most of the tasks that you can perform using the Administration interface. You can find the asadmin utility at install_dir/bin and run it from there. On Windows, double-click the asadmin.bat file and the asadmin utility launches in a command window, running in multimode.

Please note that some HTTP-server-related properties and the Administration Server properties cannot be set using the command line; they must be set using the Administration interface. You can set all properties stored in the server.xml configuration file, but not the ones stored in init.conf or obj.conf. For more information on the configuration files, see the Sun ONE Application Server Administrator’s Configuration File Reference.

For more information on individual commands, see "Command Reference" and the help for the commands.

This section contains the following topics:

Understanding the Command Syntax

The asadmin utility has the following syntax:

asadmin command -short-option argument --long-option argument operand

Command

The command is the operation or task performed. The command is case-sensitive.

Options

Options modify how the utility performs a command. Options are case-sensitive. Notice that the short options have a single dash (-) in front of them, and the long options have two dashes (--) in front of them. For many options, you can use either a long or short form; for example, user can be either --user or -u. Some options are required and some are optional. Optional options are shown in brackets in a command’s syntax. You must include all required options when you run a command or you receive an error message and the command does not execute.

For a list of available long and short option names available see the "Short and Long Options, Default Values, and Environment Variables" table in "Command Reference".

Most options require argument values, for example --port port_number. The exceptions are boolean options, which toggle to switch a feature on or off and don’t require argument values.

You can also save options in the environment variables. For more information, see "Using the Environment Commands". For a complete list of the environment variable equivalent of options, see "Long and Short Option Formats, Default Values, and Environment Variable Equivalents".

Boolean Options

A boolean options toggles on or off (for example --interactive puts you in interactive mode where you are prompted for options; --no-interactive turns off interactive mode). Putting --no- in front of the long option toggles the option off. Specifying the short option name always sets the opposite of the default value.

You can group short boolean options. For example, you can use -Ie to specify interactive (short option -I) and echo (short option -e).

Operands

Operands are set off by a space or a tab. They can come in any order in the command syntax. You can use -- with no option after it to separate the options from the operands. Any following arguments are treated as operands, even if they begin with a dash (-). For example, in

asadmin> create-jvm-options --instance server1 -- -Xmx1500m

-XMx1500m is treated as an operand, even though it begins with a dash.

Syntax Example

asadmin create-instance [--user admin_user] [--password admin_password] [-H host_name] [--port port_number] [--sysuser sys_user] [--domain domain_name] [--local=true/false] [--passwordfile file_name] [--secure | -s] --instanceport instance_port instance_name

In this syntax example -H is the short option for hostname, --user is a long option with admin_user as its argument, and instance_name is an operand. Optional options are inside brackets.

The following example shows the syntax with real values. Some of the optional options are not used in the example.

asadmin create-instance --user admin --password password -H austen --port 4848 --instanceport 1024 server2

Using Singlemode and Multimode

You can run asadmin either in singlemode or multimode. In singlemode you run one command at a time from the command prompt. In multimode you can run multiple commands without needing to reenter environment-level information.

If you are using input from a file, and a command fails, in singlemode the program exits. If you are using multimode and a command fails, you return to the asadmin prompt.

Singlemode

If you invoke a single command in the command line interface from a command prompt, you are running in singlemode. The command line interface runs the command and exits back to the command prompt. To run the command line interface from a command prompt, go to the directory install_dir/appserv/bin and type your command at the command prompt:

> asadmin command options arguments

For example:

> asadmin create-instance --user admin --password password -H austen --port 4848 --instanceport 1024 server2

Multimode

Multimode lets you set your environment at the outset so that you can run multiple commands without needing to re-enter certain environment-level information, such as your server name, port, and your password. One significant advantage of using multimode is that commands can be entered end executed significantly faster, since asadmin stays in memory. If these environment variables are set at the operating system level, multimode picks up those settings. The asadmin utility uses these settings until you change them.

On Windows, you are automatically in multimode when you run the asadmin.bat file.

On UNIX, to start the asadmin utility in multimode from the command line, type:

> asadmin multimode

When you are in multimode, the command prompt changes to asadmin. You can then type your commands into the asadmin prompt. You do not need to use the utility name. For example:

asadmin> create-instance --user admin --password password -H austen --port 4848 --instanceport 1024 server2

Exit multimode by typing exit or quit. You return to the command prompt.

Multiple Multimode

You can also invoke multimode from within a multimode session, by using the command:

asadmin> multimode

Once you exit the second multimode environment, you return to your original multimode environment.

For example, if you are administering server1 in multimode, and you want to administer server2 to compare the two, you can invoke multimode for server2 from within multimode for server1. Because you do not need to exit your current multimode session, you can retain your environment settings. When you exit the multimode session you’re using for server2, you return to your server1 multimode environment.

Using Interactive and Non-Interactive Options

When you use the command line interface, you can use it in interactive or non-interactive mode. If you choose to use interactive mode, you are prompted for the password if you don’t specify it. Interactive mode is enabled by default.

You can disable and enable interactive mode by setting the interactive environment variable using the export command. For more information, see the "Environment Variables Used with export Command" table.

You can use the interactive option in singlemode under all circumstances. You can use the interactive option in multimode when you run one command at a time from the command prompt, and when you run in multimode from a file. However, commands in multimode when piped from an input stream and commands invoked from another program cannot run in interactive mode.

Using the Environment Commands

The asadmin utility contains a set of environment variables that you can set using environment commands. In multimode, once you set these variables you do not need to reset your environment until you exit multimode. You can also set these environment variables at the operating system level; if you do, they are automatically picked up when you enter multimode and they persist after you exit from multimode.

Environment variables are name/value pairs that you can set at any time by assignment. Environment variable constitutes of AS_ADMIN_ prefix to the option name in capitals. For example, to set the Administration Server user, you can type:

export AS_ADMIN_USER=administrator

Where administrator is the administrator’s username.

This also makes the value for AS_ADMIN_USER available to asadmin commands; for example:

asadmin multimode
asadmin> export AS_ADMIN_HOST=austen

For as long as you are in this multimode session, the Administration Server hostname is set to austen, unless you reassign it.

You can also set and export values for multiple environment variables in one step, for example:

asadmin> export AS_ADMIN_PORT=4848 AS_ADMIN_USER=admin

To see your current environment variable settings, use the export command without arguments:

asadmin> export
AS_ADMIN_HOST=austen
AS_ADMIN_PORT=4848
AS_ADMIN_USER=admin

Use the unset command to remove a variable and its value from the environment. For example:

asadmin> unset AS_ADMIN_HOST

You can override the set value for an environment variable either by resetting the variable, or by setting a different value as part of an asadmin command. For example:

asadmin> export AS_ADMIN_HOST=dickens
asadmin> show-instance-status --host austen instance-name

This example shows the instance status for an instance in the Administration Server host austen, because that value overrides the earlier host value of dickens.

If you do not use exported variables, you must provide the following options with most commands or use the default values (for a list of default values, see "Long and Short Option Formats, Default Values, and Environment Variable Equivalents"):

The following table, "Environment Variables Used with export Command," describes some of the environment variables to use with the export command. These variables are the most commonly used, as they specifically deal with setting up the environment. The first column shows the environment variable name, and the second column shows what it is used for, and the default value if none is set. For a complete list of the environment variables, see "Long and Short Option Formats, Default Values, and Environment Variable Equivalents"

Table A-2  Environment Variables Used with export Command

Environment Variable

Use

AS_ADMIN_HOST

Hostname of the Administration Server. If no value is specified, uses localhost.

AS_ADMIN_PORT

Port number of the Administration Server. If no value is specified, uses 4848.

AS_ADMIN_USER

Username of the user to run the commands.

AS_ADMIN_PASSWORD

Password of the username that runs the commands. The username and password are used to authenticate the user, to verify that the user is allowed to administer the server. It is the same as the authentication that takes place when you access the Administration Server through the Administration interface.

AS_ADMIN_SECURE

=true if secure.

AS_ADMIN_INSTANCE

Sets the instance of the Sun ONE Application Server. Any subsequent commands that use the instance name as an argument (but not those that use it as an operand) use this specified instance.

Using the Password File Option

If you do not want to type the passwords on the command line or set environment variables for the passwords, you can create a password file and use it as an option from the command line.

Every command which has the a password option also has the passwordfile option that you can use instead. The password file contains the following lines:

AS_ADMIN_PASSWORD=value

AS_ADMIN_ADMINPASSWORD=value

AS_ADMIN_USERPASSWORD=value

If you use the passwordfile option, the passwords in the file are exported to the multimode environment, and subsequent commands without the password options specified use these values.

If you specify both a password and a password file option at the command line, the values in the password file are exported to the multimode environment, but the current command uses the password specified in the password option, because the password option takes precedence over the password file.

Running asadmin Locally or Remotely

Usually the asadmin utility sends its commands through the Administration Server. Therefore, you do not need to run asadmin on the system where the Sun ONE Application Server is installed. However, the Administration Server must be running in order for most asadmin commands to work.

Some commands have the option of being run locally, for example, create-instance. If you use the --local=true option with create-instance, you must run it on the machine where the server is installed, but you do not need to have the Administration Server running in order to create the instance.

Some commands must be run locally. For example, start-appserv, which starts the Administration Server and all its instances, cannot be run remotely because the Administration Server is not running until the command starts it.

For more information on the Administration Server, see Chapter 2, "Setting Administration Server Preferences."

The following commands can be run both locally and remotely:

For these commands, you can choose to run a command locally without specifying the local option. By default, if you specify a value for user, password, host, or port in the command syntax the command is treated as a remote command (though you can still specify local values for these options). If you do not specify values for these options, the command is run locally by default.

When a command is executed locally, if there is a domain option it is required by the command (unless there is only one domain).When a command is executed remotely it ignores the domain option if you specify it.

Using Command Line Invocations

You can invoke a command line in many ways, as described in the following topics:

Using asadmin from the Command Line

The simplest way to use the commands is one at a time, from the command line. You type in the utility, command, its options and arguments. In multimode you type multiple commands without needing to retype the utility name and environment options (if you have set the environment variables). You can run either singlemode or multimode commands interactively (prompted for additional required input, for example, a password) or non-interactively.

For more information on singlemode and multimode, see "Using Singlemode and Multimode".

For more information on using commands interactively, see "Using Interactive and Non-Interactive Options".

Example from Command Line

> asadmin create-instance --user admin --password password --host austen --port 4848 --instanceport 1024 server2

After the command completes, you return to the operating system prompt.

Using asadmin with Input from a File (Script)

You can create a script which includes many asadmin commands. With scripts you can process commands in a batch, set up a job to run at specific times, and otherwise simplify and automate your administration tasks.

To call a script that is in a file, use the syntax:

> asadmin multimode --file filename

The following is an example of a simple script in a file that you can call in this manner:

# Create new instance and start it.
export AS_ADMIN_USER=admin AS_ADMIN_PASSWORD=mypassword AS_ADMIN_HOST=austen AS_ADMIN_PORT=4848
create-instance --instanceport 9000 austen3
start-instance austen3

This script sets the environment, creates an instance called austen3 and starts the new instance. Lines that begin with a number sign (#) are treated as comments and ignored.

Using asadmin with Standard Input (Pipe)

You can pipe input into the asadmin utility using the following syntax:

cat filename | asadmin multimode

This syntax may not work on Windows.

Using Escape Characters

Some characters, the colon (:), the asterisk (*), and the backslash (\), cause errors if you use them in the command syntax unless you use escape characters to set them off. The possibilities for using escape characters vary depending upon what platform you use and whether you use singlemode or multimode.


Note

You do not need to use escape characters for colons in the get and set commands.


This section contains the following topics:

Escape Characters on UNIX in Singlemode

On Solaris, you can use either two backslashes (\\) or double-quotes (“ ”) to escape restricted characters.

Escape with Backslashes (\\)

For example, when creating a JDBC connection pool with a option whose value includes colons, you could use backslashes (example assumes the environment variables have been set for some properties):

asadmin create-jdbc-connection-pool --instance server1 --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvalidatereq=true --property url=jdbc\\:oracle\\:thin\\:@asperfsol8\\:1521\\:V8i:user=staging_lo okup_app:password=staging_lookup_app OraclePoollookup

Escape with Quotes

To use quotes in the same example as above, you would enclose the value in double quotes (”) and escape the double quotes with the backslash.

asadmin create-jdbc-connection-pool --instance server1 --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvalidatereq=true --property url=\"jdbc:oracle:thin:@asperfsol8:1521:V8i\":user=staging_lookup_a pp:password=staging_lookup_app OraclePoollookup

You can also use the methods described in "Escape Characters on All Platforms in Singlemode".

Escape Characters on Windows in Singlemode

On windows, you can escape using the backslash character. For example, when creating a JDBC connection pool with a option whose value includes colons, you could use backslashes (example assumes the environment variables have been set for some properties):

asadmin create-jdbc-connection-pool --instance server1 --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvalidatereq=true --property url=jdbc\:oracle\:thin\:@asperfsol8\:1521\:V8i:user=staging_lookup_ app:password=staging_lookup_app OraclePoollookup

You can also use the methods described in "Escape Characters on All Platforms in Singlemode".

Escape Characters on All Platforms in Singlemode

On any platform, you can use backslashes to escape the character and enclose the value containing the escaped characters in double quotes. For example, when creating a JDBC connection pool with a option whose value includes colons, you could use the escape characters as follows (example assumes the environment variables have been set for some properties):

asadmin create-jdbc-connection-pool --instance server1 --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvalidatereq=true --property url="jdbc\:oracle\:thin\:@iasperfsol8\:1521\:V8i":user=staging_look up_app:password=staging_lookup_app OraclePoollookup

Escape Characters on All Platforms in Multimode

In multimode you can use the following syntax, which only requires quotes, not slashes or backslashes:

asadmin> create-jdbc-connection-pool --instance server1 --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvalidatereq=true --property url="jdbc:oracle:thin:@asperfsol8:1521:V8i":user=staging_lookup_app :password=staging_lookup_app OraclePoollookup

Using get and set Commands

Use the get and set commands to access and change configuration settings in the Sun ONE Application Server. In most cases, asadmin commands only set the required properties. Use the set command to change values for optional properties.

Table A-3  get and set Commands

Command

Arguments

Use

get

(scope) where scope represents an attribute and is a valid name.

Gets the value of the attribute.

set

(scope=value) where scope represents an attribute and is a valid name, and value is the value you want to set for that attribute.

Sets the value of the attribute.

reconfig

instance-name

After running any command that modifies the configuration files, you need to run reconfig in order for the changes to be applied to the server. For more information on applying changes/reconfiguring the server, see "Applying Changes to an Application Server Instance".

You can get or set multiple attribute values in a single command by using spaces between the attributes. For example:

set server1.appReloadPollInterval=20 server1.mime.mime1.file=mime.types

You can also use the AS_ADMIN_PREFIX environment variable to set a prefix that will be used by subsequent get and set commands. A period (“.”) is implicitly inserted between the prefix string and the operand in the get and set commands. For example:

asadmin>export AS_ADMIN_PREFIX=server1
asadmin>get *
server1.locale = en_US
server1.appReloadPollInterval = 2
server1.name = server1
...

Because the get and set commands require period separators, if an item contains periods in its name you must use the escape character backslash (\) before them. The following example shows a server instance name server2.sun.com with the periods preceded by backslashes:

get server2\.sun\.com.*

If you do not include the backslashes, you get an error message.

get and set Command Examples

The following examples show how to use the get command to get the values of attributes, and how to use the set command to set values.

MDB Container Service Example

If the application server instance is server1, you can get the values of all mdb-container attributes by using the following command in multimode, with your environment set:

asadmin> get server1.mdb-container.*

The following is an example of the output from this command, showing current values for the attributes:

server1.mdb-container.logLevel = null
server1.mdb-container.steadyPoolSize = 10
server1.mdb-container.idleInPoolTimeoutInSeconds = 600
server1.mdb-container.maxPoolSize = 60
server1.mdb-container.monitoringEnabled = false
server1.mdb-container.poolResizeQuantity = 2

To get just the value of the MDB container attribute monitoringEnabled, use the following:

asadmin> get server1.mdb-container.montioringEnabled

To set the value of the monitoringEnabled attribute to true, use the following:

asadmin> set server1.mdb-container.montioringEnabled=true

JMS Resource Example

For configuring any of the resources, the attribute should look like:

instancename.resource.primary_key_value.attribute_name

For example:

asadmin> get server1.jms-resource.myjms.*

Gets all the attributes for the JMS destination resource called myjms. For example:

server1.jms-resource.myjms.resType = javax.jms.Topic
server1.jms-resource.myjms.enabled = true
server1.jms-resource.myjms.name = myjms
server1.jms-resource.myjms.description = null

To get the value for a single attribute, for example resType:

asadmin> get server1.jms-resource.myjms.resType

To set an attribute, for example description:

asadmin> set server1.jms-resource.myjms.description=mydescription

This example sets the description to mydescription.

Getting and Setting Multiple Values Examples

You can get and set multiple values with the same command. To set two attributes at the same time, separate the attributes by spaces. For example:

set server1.appReloadPollInterval=20 server1.mime.mime1.file=mime.types

Also, you can use the environment variable AS_ADMIN_PREFIX to set a prefix to use for a number of get and set commands.

Monitoring Using get and set Commands

You can also use the get and set commands to monitor a running server. A list command also exists for monitoring. You can set an option, monitor, to true or false. If set to true, you monitor the attributes specified. For more information on using the command-line interface to monitor the Sun ONE Application Server, see "Extracting Monitoring Data Using the CLI".

Using Help

Help for every asadmin command is available from the command prompt by typing -h or --help. For example, for help on asadmin, type:

asadmin --help

You see a list of all asadmin commands.

To get a help for a specific asadmin command, type:

asadmin command -h

or

asadmin command --help

The help contains a synopsis, a description of the command, syntax information, examples, and a list of related commands.

Please note that if you use -h or --help anywhere in a command, you will get help for the command. The command will not execute.

You can also access the command-line help pages as manpages in a UNIX environment. For an unbundled installation, add install_dir/man to your MANPATH environment variable. Once this is done, you can access manpages for Sun ONE Application Server utilities, for example, by typing man asadmin at the command prompt.

Viewing Output and Errors

When a command executes successfully, you see a message informing you of what was done. If the command fails, you see an error message.

This section contains the following topics:

Viewing the Exit Status

In addition to an error message, asadmin commands always exit with an exit status. The exit status is 0 if the command is successful and 1 if the command fails.

Exit Status on UNIX

You can check for the exit status at the command prompt by typing echo $?.

You can also use the exit codes in scripting; for example, the following Korn shell script uses the exit status to indicate whether the list-instances command succeeded or failed:

#!/bin/ksh
asadmin list-instances
if [[ $? = 0 ]]
  then
    echo "success"
  else
    echo "error"
fi

Exit Status on Windows

On Windows you can check the exit status in your .bat scripts. For example, the following two scripts show a successful script and the output it returns, and an unsuccessful script and the output it returns:

Success Condition

myscript.bat
------------
echo off
echo Processing Command
call asadmin list-instances --domain domain1
if not %errorlevel% EQU 0 goto end
echo Command Succesful
goto program-end
:end
echo Command Failed
:program-end

Output:

Processing Command
admin-server <not running>
server1 <not running>
Command Succesful

Error Condition

myscript.bat
-------------
echo off
echo Processing Command
call asadmin list-instances
if not %errorlevel% EQU 0 goto end
echo Command Succesful
goto program-end
:end
echo Command Failed
:program-end

Output:

Processing Command
No default domain. Need to enter a domain.
Command Failed

Viewing Usage

If you type the command without arguments, you get an error message that includes the syntax for the command. For example:

asadmin> create-instance

Invalid number of operands received

USAGE: create-instance [--user admin_user] [--password admin_password] [--host localhost] [--port 4848] [--sysuser sys_user] [--domain domain_name] [--local=false] [--passwordfile file_name] [secure | -s] --instanceport instanceport instancename


Security Considerations

When you run the command line interface from a command line, you must supply your password with all commands. If you are running in multimode, you must supply your password initially when you set up the environment. If you exit multimode, when you start multimode again you must set up your environment again, including your password. You set passwords using the environment commands. For more information see "Using the Environment Commands".

You can also set up a password file so you do not need to type your passwords at the command line. For more information, see "Using the Password File Option".

Without the authentication information of a valid username and password, the commands will not execute.

The command line interface has the security measures you’ve set up for your Sun ONE Application Server. For more information regarding security in the Sun ONE Application Server, see the Sun ONE Application Server Administrator’s Security Guide.


Concurrent Access Considerations

It is possible that more than one person could attempt to configure a server concurrently using the command line interface and/or the Administration interface. If that happens, the second configuration request is queued until the first one completes. If the request is queued for too long, it times out.

For some commands, the changes don’t take effect until you use the reconfig command. That means more than one person could edit an attribute before the changes are applied to the server. For more information on reconfig, see "Applying Changes to an Application Server Instance".


Command Reference

This section contains the following topics:

List of Commands

The following table shows all the asadmin commands and their purpose. For more information on a command’s syntax and usage, see the online help.

The left column shows the command name, and the right column shows its use.

Table A-4  asadmin Commands

Command

Use

add-resources

Adds one or more resources of type jdbc, jms, or javamail.

create-acl

Creates an ACL (access control list).

create-authdb

Creates an authentication database.

create-auth-realm

Creates an authentication realm.

create-custom-resource

Creates a custom resource.

create-domain

Creates a domain.

create-file-user

Creates a file realm user in the keyfile.

create-http-listener

Creates an HTTP listener.

create-http-qos

Creates HTTP quality of service settings for the application server instance or virtual server.

create-iiop-listener

Creates an IIOP listener.

create-instance

Creates an application server instance.

create-javamail-resource

Creates a Java Mail resource.

create-jdbc-connection-pool

Creates a JDBC connection pool.

create-jdbc-resource

Creates a JDBC resource.

create-jmsdest

Creates a JMS (Java Message Service) destination.

create-jms-resource

Creates a JMS resource.

create-jndi-resource

Creates a JNDI resource.

create-jvm-options

Creates JVM options in java-config or profiler elements.

create-lifecycle-module

Creates a lifecycle module.

create-mime

Creates a MIME types file.

create-persistence-resource

Creates a persistence manager factory resource.

create-profiler

Creates a profiler for the JVM.

create-ssl

Creates SSL settings for an HTTP listener, IIOP listener, or IIOP service.

create-virtual-server

Creates a virtual server.

delete-acl

Deletes an ACL.

delete-authdb

Deletes an authentication database.

delete-auth-realm

Deletes an authentication realm.

delete-custom-resource

Deletes a custom resource.

delete-domain

Deletes a domain. This command can only be executed locally.

delete-file-user

Deletes a file realm user from the keyfile.

delete-http-listener

Deletes an HTTP listener.

delete-http-qos

Deletes HTTP quality of service settings for the application server instance or virtual server.

delete-iiop-listener

Deletes an IIOP listener

delete-instance

Deletes an application server instance.

delete-javamail-resource

Deletes a Java Mail resource.

delete-jdbc-connection-pool

Deletes a JDBC connection pool.

delete-jdbc-resource

Deletes a JDBC resource.

delete-jmsdest

Deletes a JMS destination.

delete-jms-resource

Deletes a JMS resource.

delete-jndi-resource

Deletes a JNDI resource.

delete-jvm-options

Deletes JVM options in java-config or profiler elements.

delete-lifecycle-module

Deletes a lifecycle module.

delete-mime

Deletes a MIME types file.

delete-persistence-resource

Deletes a persistence manager factory resource.

delete-profiler

Deletes a JVM profiler.

delete-ssl

Deletes SSL settings for an HTTP listener, IIOP listener, or IIOP service.

delete-virtual server

Deletes a virtual server.

deploy

Deploys an EJB, WEB, connector, appclient, or application component to the application server instance.

deploydir

Deploys an EJB, WEB, connector, appclient, or application component that is in the directory to the application server instance.

disable

Disables a deployed component in the application server instance.

display-license

Displays license information. This command can only be executed locally.

enable

Enables (allows to run) a deployed component in the application server instance.

export

Exports the value of an asadmin environment variable so that it can be used by the subsequent asadmin commands.

get

Gets the value of an attribute.

help

Displays help (description, usage, syntax, examples) for a given command, or general help for asadmin.

install-license

Installs the license file. This command can only be executed locally.

jms-ping

Pings the JMS provider to see if it is running.

list

Lists the configurable elements.

list-acls

Lists ACLs for an application server instance.

list-authdbs

Lists authentication databases.

list-auth-realms

Lists authentication realms.

list-components

Lists the deployed components for a server instance.

list-custom-resources

Lists custom resources in a server instance

list-domains

Lists domains.

list-file-users

Lists all the file realm users in a server instance.

list-file-groups

Lists all the groups for a specified file realm user. If you do not specify a user, lists all groups for a server instance.

list-http-listeners

Lists HTTP listeners for a server instance.

list-instances

Lists application server instances in the domain.

list-iiop-listeners

Lists IIOP listeners for a server instance.

list-javamail-resources

Lists Java Mail resources for a server instance.

list-jdbc-connection-pools

Lists JDBC connection pools for a server instance.

list-jdbc-resources

Lists JDBC resources for a server instance.

list-jmsdest

Lists JMS destinations for a server instance.

list-jms-resources

Lists JMS resources for a server instance

list-jndi-resources

Lists JNDI resources for a server instance.

list-lifecycle-modules

Lists lifecycle modules for a server instance.

list-mimes

Lists MIME types files for a server instance.

list-persistence-resources

Lists persistence manager factory resources for a server instance.

list-profilers

Lists JVM profilers for a server instance.

list-sub-components

Lists one or more EJBs or Servlets in a deployed module or in a module of the deployed application.

list-virtual-servers

Lists virtual servers for a server instance.

multimode

Allows you to execute multiple command while retaining your environment settings and remaining within asadmin.

reconfig

Applies change to the server. Most changes do not take effect until they are applied.

restart-instance

Restarts the server instance.

set

Sets the value of an attribute.

show-component-status

Shows the status of a deployed component.

show-instance-status

Shows the status of a server instance (that is, whether it is running or not).

shutdown

Shuts down the Administration Server.

start-appserv

Starts the Administration Server and all the server instances. This command can only be executed locally.

start-domain

Starts all instances in the domain. This command can only be executed locally.

start-instance

Starts the server instance.

stop-appserv

Stops the Administration Server and all the server instances. This command can only be executed locally.

stop-domain

Stops all instances in the domain.

stop-instance

Stops the server instance.

undeploy

Removes the deployed component from the server instance.

unset

Unsets the exported environment variables for asadmin.

update-file-user

Updates an existing file realm user.

version

Displays version information for the Sun ONE Application Server.

List of Dotted Names and Attributes

When you use the get and set commands to get and set attributes, you need to know the names asadmin uses for the services, resources, and so forth so you can use the name to get the attributes for that particular object.

Because the syntax for using these names involves separating names between periods, these names are called dotted names.

Dotted Names Used in asadmin

The following tables list the names used to configure items using the asadmin. They are broken out into the following categories:

Service Names

The following table shows the service names to use to get and set attributes for the services:

Table A-5  Service Names for Command-Line Interface

Service

Dotted Name

JMS service configuration

jms-service

Transaction service configuration

transaction-service

MDB container configuration

mdb-container

EJB container configuration

ejb-container

Web container configuration

web-container

JVM configuration

java-config

ORB configuration

orb or iiop-service

ORB listener configuration

orblistener or iiop-listener

Note that orblistener or iiop-listener are not valid names as is; both require the names of the listener to follow. For example:

ORB listener configuration
orblistener.<listener name> or iiop-listener.<listener name>

Log configuration

log-service

Security configuration

security-service

HTTP configuration

http-service

Resource Names

The following table shows resource names to use to get and set attributes for the resources. Note that these names are not valid by themselves; they require the name of a resource to follow the resource name.

Table A-6  Resource Names for Command-Line Interface

Resource

Dotted Name

JDBC resource configuration

jdbc-resource

JNDI resource configuration

jndi-resource

JDBC connection pool resource configuration

jdbc-connection-pool

Custom resource configuration

custom-resource

JMS resource configuration

jms-resource

Persistence manager factory resource configuration

persistence-manager-factory-resource

Java mail resource configuration

mail-resource

Application Names

The following table shows the dotted names to use to get and set attributes application-related configuration. Note that these names are not valid by themselves; they require the name of the application to follow.

Table A-7  Application Names for Command-Line Interface

Application Component

Dotted Name

Application configuration

application

EJB module configuration

ejb-module

Web module configuration

web-module

Connector module configuration

connector-module

Other Names

The following table shows the dotted names of other items you can configure using get and set. Note that these names are not valid by themselves; they require the name of the application to follow; for example, http-listener.listener_name, lifecycle-module.module-name, etc.

Table A-8  Other Item Names for Command-Line Interface

Item

Dotted Name

HTTP listener

http-listener or http-server.http-listener

MIME types file

mime

ACL

acl

Virtual server

virtual-server

Authentication databases

auth-db

Security realms

authrealm

Lifecycle module

lifecycle-module

Profiler configuration

profiler

Server configuration

server configuration (name of server instance)

Attributes

The following sections show the attributes for each named item listed above, and provide usage examples. Note that some attributes are read-only (that is, they can only be used with the get command, not the set command).


Note

The examples in this section assume the user, password, host and port are defined in the environment variables, and don’t list those options in the syntax.


jms-service

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-9  JMS Service Attributes

server.xml Name

asadmin Name

port

port

admin-username

adminUserName

admin-password

adminPassword

log-level

logLevel

enabled

enabled

init-timeout-in-seconds

initTimeoutInSeconds

start-args

startArgs

To get all the attributes from an instance (server1):

asadmin> get server1.jms-service.*

To get an attribute called adminPassword:

asadmin> get server1.jms-service.adminPassword

To set an attribute called adminPassword to a value of admin:

asadmin> set server1.jms-service.adminPassword=admin

transaction-service

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-10  Transaction Service Attributes

server.xml Name

asadmin Name

automatic-recovery

automaticTransactionRecovery

timeout-in-seconds

transactionRecoveryTimeout

tx-log-dir

transactionLogFile

heuristic-decision

heuristicDecision

keypoint-interval

keypointInterval

log-level

logLevel

monitoring-enabled

monitoringEnabled

To get all the attributes from an instance (server1):

asadmin> get server1.transaction-service.*

To get an attribute called transactionRecoveryTimeout:

asadmin> get server1.transaction-service.transactionRecoveryTimeout

To set an attribute called transactionRecoveryTimeout to a value of 49:

asadmin> set server1.transaction-service.transactionRecoveryTimeout=49

mdb-container

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-11  MDB Container Attributes

server.xml Name

asadmin Name

steady-pool-size

steadyPoolSize

pool-resize-quantity

poolResizeQuantity

max-pool-size

maxPoolSize

idle-timeout-in-seconds

idleInPoolTimeoutInSeconds

log-level

logLevel

monitoring-enabled

monitoringEnabled

To get all the attributes from an instance (server1):

asadmin> get server1.mdb-container.*

To get an attribute called steadyPoolSize:

asadmin> get server1.mdb-container.steadyPoolSize

To set an attribute called steadyPoolSize to a value of 10:

asadmin> set server1.mdb-container.steadyPoolSize=10

ejb-container

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-12  EJB Container Attributes

server.xml Name

asadmin Name

steady-pool-size

steadyPoolSize

pool-resize-quantity

poolResizeQuantity

max-pool-size

maxPoolSize

cache-resize-quantity

cacheResizeQuantity

max-cache-size

maxCacheSize

pool-idle-timeout-in-seconds

idleInPoolTimeoutInSeconds

cache-idle-timeout-in-seconds

idleInCacheTimeoutInSeconds

removal-timeout-in-seconds

removalTimeoutInSeconds

victim-selection-policy

victimSelectionPolicy

commit-option

commitOption

log-level

logLevel

monitoring-enabled

monitoringEnabled

To get all the attributes from an instance (server1):

asadmin> get server1.ejb-container.*

To get an attribute called maxPoolSize:

asadmin> get server1.ejb-container.maxPoolSize

To set an attribute called maxPoolSize to a value of 12:

asadmin> set server1.ejb-container.maxPoolSize=12

web-container

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-13  Web Container Attributes

server.xml Name

asadmin Name

log-level

logLevel

monitoring-enabled

monitoringEnabled (not used)

To get all the attributes from an instance (server1):

asadmin> get server1.web-container.*

To get an attribute called logLevel:

asadmin> get server1.web-container.logLevel

To set an attribute called monitoringEnabled to be WARNING:

asadmin> set server1.web-container.logLevel=WARNING

java-config

The following table shows the sserver.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-14  JVM Attributes

server.xml Name

asadmin Name

java-home

javahome

debug-enabled

debugEnabled

debug-options

debugOptions

javac-options

javacoptions

rmic-options

rmicoptions

classpath-prefix

classpathprefix

server-classpath

serverClasspath

classpath-suffix

classpathsuffix

native-library-path-prefix

libpathprefix

native-library-path-suffix

libpathsuffix

env-classpath-ignored

envpathignore

To get all the attributes from an instance (server1):

asadmin> get server1.java-config.*

To get an attribute called classpathprefix:

asadmin> get server1.java-config.classpathprefix

To set an attribute called classpathprefix to a value of com.sun:

asadmin> set server1.java-config.classpathprefix=com.sun

orb or iiop-service

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-15  ORB/IIOP Service Attributes

server.xml Name

asadmin Name

message-fragment-size

msgSize

steady-thread-pool-size

minThreads

max-thread-pool-size

maxThreads

max-connections

maxConnections

idle-thread-timeout-in-seconds

idleThreadTimeout

log-level

log

monitoring-enabled

monitor

cert-nickname

cert

ssl2-enabled

ssl2

ssl2-ciphers

ssl2Ciphers

ssl3-enabled

ssl3

ssl3-tls-ciphers

ssl3Ciphers

tls-enabled

tls

tls-rollback-enabled

tlsRollback

client-auth-enabled

clientAuth

To get all the attributes from an instance (server1):

asadmin> get server1.orb.*

or

asadmin> get server1.iiop-service.*

To get an attribute called msgSize:

asadmin> get server1.orb.msgSize

or

asadmin> get server1.iiop-service.msgSize

To set an attribute called idleThreadTimeout to 300:

asadmin> set server1.orb.idleThreadTimeout=300

or

asadmin> set server1.iiop-service.idleThreadTimeout=300

orblistener or iiop-listener

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-16  IIOP Listener Attributes

server.xml Name

asadmin Name

id

id

address

address

port

port

enabled

enabled

cert-nickname

cert

ssl2-enabled

ssl2

ssl2-ciphers

ssl2Ciphers

ssl3-enabled

ssl3

ssl3-tls-ciphers

ssl3Ciphers

tls-enabled

tls

tls-rollback-enabled

tlsRollback

client-auth-enabled

clientAuth

To get all the attributes from an instance (server1):

asadmin> get server1.orblistener.orb_listener_id.*

or

asadmin> get server1.iiop-listener.orb_listener_id.*

To get an attribute called port:

asadmin> get server1.orblistener.orb_listener_id.port

or

asadmin> get server1.iiop-listener.orb_listener_id.port

To set an attribute called address to bluestar:

asadmin> set server1.orblistener.orb_listener_id.address=bluestar

or

asadmin> set server1.iiop-listener.orb_listener_id.address=bluestar

log-service

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-17  Log Configuration Attributes

server.xml Name

asadmin Name

file

file

level

level

log-stdout

stdout

log-stderr

stderr

echo-log-messages-to-stderr

echoToStderr

create-console

createConsole

log-virtual-server-id

LogVirtualServerId

use-system-logging

useSystemLogging

To get all the attributes from an instance (server1):

asadmin> get server1.log-service.*

To get an attribute called level:

asadmin> get server1.log-service.level

To set an attribute called echoToStderr to true:

asadmin> set server1.log-service.echoToStderr=true

security-service

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-18  Security Realm Configuration Attributes

server.xml Name

asadmin Name

default-realm

defaultRealm

default-principal

defaultPrinicpal

default-principal-password

defaultPrinicpalPassword

anonymous-role

anonymousRole

audit-enabled

auditEnabled

log-level

logLevel

To get all the attributes from an instance (server1):

asadmin> get server1.security-service.*

To get an attribute called anonymousRole:

asadmin> get server1.security-service.anonymousRole

To set an attribute called encryptPasswords to true:

asadmin> set server1.security-service.auditEnabled=true

http-service

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-19  HTTP Service Attributes

server.xml Name

asadmin Name

qos-metrics-interval-in-seconds

qos-metrics-interval-in-seconds

qos-recompute-time-interval-in-millis

qos-recompute-time-interval-in-millis

qos-enabled

qos-enabled

bandwidth-limit

bandwidthLimit

enforce-bandwidth-limit

enforceBandwidthLimit

connection-limit

connectionLimit

enforce-connection-limit

enforceConnectionLimit

To get all the attributes from an instance (server1):

asadmin> get server1.http-service.*

To get an attribute called bandwidthLimit:

asadmin> get server1.http-service.bandwidthLimit

To set an attribute called qos-enabled to true:

asadmin> set server1.http-service.qos-enabled=true

jdbc-resource

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-20  JDBC Resource Attributes

server.xml Name

asadmin Name

jndi-name

name

pool-name

pool

enabled

enabled

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.jdbc-resource.jdbc_resource_name.*

To get an attribute called pool:

asadmin> get server1.jdbc-resource.jdbc_resource_name.pool

To set an attribute called enabled to true:

asadmin> set server1.jdbc-resource.jdbc_resource_name.enabled=true

jndi-resource

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-21  JNDI Resource Attributes

server.xml Name

asadmin Name

jndi-name

name

jndi-lookup-name

LookupName

res-type

resType

factory-class

factory

enabled

enabled

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.jndi-resource.jndi_name.*

To get an attribute called factory:

asadmin> get server1.jndi-resource.jndi_name.factory

To set an attribute called factory to com.sun:

asadmin> set server1.jndi-resource.jndi_name.factory=com.sun

jdbc-connection-pool

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-22  JDBC Connection Pool Attributes

server.xml Name

asadmin Name

name

name

datasource-classname

dsClassName

res-type

resType

description

description

steady-pool-size

steadyPoolSize

max-pool-size

maxPoolSize

max-wait-time-in-millis

maxWaitTime

pool-resize-quantity

resizeValue

idle-timeout-in-seconds

idleTimeout

transaction-isolation-level

transactionIsolationLevel

is-isolation-level-guaranteed

isIsolationLevelGuaranteed

connection-validation-method

validationMethod

is-connection-validation-required

isValidationRequired

fail-all-connections

failAll

validation-table-name

validationTable

To get all the attributes from an instance (server1):

asadmin> get server1.jdbc-connection-pool.pool_name.*

To get an attribute called dsClassName:

asadmin> get server1.jdbc-connection-pool.pool_name.dsClassName

To set an attribute called resizeValue to 2:

asadmin> set server1.jdbc-connection-pool.pool_name.resizeValue=2

custom-resource

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-23  Custom Resource Attributes

server.xml Name

asadmin Name

jndi-name

name

res-type

resType

factory-class

factory

enabled

enabled

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.custom-resource.jndi_name.*

To get an attribute called factory:

asadmin> get server1.custom-resource.jndi_name.factory

To set an attribute called factory:

asadmin> set server1.custom-resource.jndi_name.factory=myclass

jms-resource

The following table shows the sserver.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-24  JMS Resource Attributes

server.xml Name

asadmin Name

jndi-name

name

res-type

resType

enabled

enabled

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.jms-resource.jms_resource_name.*

To get an attribute called res-type:

asadmin> get server1.jms-resource.jms_resource_name.resType

To set an attribute called enabled to true:

asadmin> set server1.jms-resource.jms_resource_name.enabled=true

persistence-manager-factory-resource

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-25  Persistence Manager Factory Resource Attributes

server.xml Name

asadmin Name

jndi-name

jndiName

jdbc-resource-jndi-name

JdbcResourceJndiName

factory-class

factoryClass

enabled

enabled

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.persistence-manager-factory-resource.jndi_name

To get an attribute called factoryClass:

asadmin> get server1.persistence-manager-factory-resource.jndi_name.factoryClass

To set an attribute called enabled to true:

asadmin> set server1.persistence-manager-factory-resource.jndi_name.enabled=true

mail-resource

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-26  Java Mail Resource Attributes

server.xml Name

asadmin Name

jndi-name

name

enabled

enabled

store-protocol

storeProtocol

store-protocol-class

storeProtocolClass

transport-protocol

transportProtocol

transport-protocol-class

transportProtocolClass

host

host

user

user

from

from

debug

debug

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.mail-resource.jndi_name.*

To get an attribute called host:

asadmin> get server1.mail-resource.jndi_name.host

To set an attribute called enabled to true:

asadmin> set server1.mail-resource.jndi_name.enabled=true

application

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-27  Application Attributes

server.xml Name

asadmin Name

name

name

location

location

virtual-servers

virtualServers

description

description

enabled

enabled

To get all the attributes from an instance (server1):

asadmin> get server1.application.application_name.*

To get an attribute called location in an application:

asadmin> get server1.application.application_name.location

To set an attribute called location:

asadmin> set server1.application.application_name.location=
"/export/home/as7se/as1/repository/applications/ASConverter"

ejb-module

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-28  EJB Module Attributes

server.xml Name

asadmin Name

name

name

location

location

description

description

enabled

enabled

To get all the attributes of stand-alone EJB module in an instance (server1):

asadmin> get server1.ejb-module.ejb_jar_name.*

To get all the attributes of an EJB module in an application for an instance (server1):

asadmin> get server1.j2ee-application.application_name.ejb-module.ejb_jar_name.*

or

asadmin>get server1.application.application_name.ejb-module.ejb_jar_name.*

To get an attribute called location from a stand-alone EJB module:

asadmin> get server1.ejb-module.ejb_jar_name.location

To get an attribute called location from an EJB module in an application:

asadmin> get server1.j2ee-application.application_name.ejb-module.ejb_jar_name.
location

or

asadmin> get server1.application.application_name.ejb-module.ejb_jar_name.location

To set an attribute called location in the stand-alone EJB module:

asadmin> set server1.ejb-module.ejb_jar_name.location="/export/home/as7se/as1/repos itory/modules/ejb_jar_name"

To set an attribute called location in the EJB module bundled into an application:

asadmin> set server1.j2ee-application.application_name.ejb-module.ejb_jar_name.
location="/export/home/as7se/as1/repository/modules/ejb_jar_name"

or

asadmin>set server1.application.application_name.ejb-module.ejb_jar_name.location="/ex port/home/as7se/as1/repository/modules/ejb_jar_name"

web-module

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-29  WEB Module Attributes

server.xml Name

asadmin Name

name

name

location

location

context-root

contextRoot

virtual-servers

virtualServers

description

description

enabled

enabled

To get all the attributes of stand-alone web module in an instance (server1):

asadmin> get server1.web-module.web_war_name.*

To get all the attributes of a web module in an application for an instance (server1):

asadmin> get server1.web-module.application_name.web_war_name.*

To get an attribute called location from stand-alone web module:

asadmin> get server1.web-module.web_war_name.location

To get an attribute called location from the web module in an application:

asadmin> get server1.web-module.application_name.web_war_name.location

To set an attribute called location in the standalone web module:

asadmin> set server1.web-module.war-ic.location=
"/export/home/as7se/as1/repository/modules/web_war_name"

To set an attribute called location in the web module bundled into an application:

asadmin> set server1.web-module.application_name.web_war_name.location=
"/export/home/as7se/as1/repository/modules/web_war_name"

connector-module

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-30  Connector Module Attributes

server.xml Name

asadmin Name

name

name

location

location

description

description

enabled

enabled

To get all the attributes of standalone connector module in an instance (server1):

asadmin> get server1.connector-module.connector_rar_name.*

To get an attribute called location from standalone connector module:

asadmin> get server1.connector-module.connector_rar_name.location

To set an attribute called location in the standalone connector module:

asadmin> set server1.connector-module.connector_rar_name.location=
"/export/home/as7se/as1/repository/modules/connector_rar_name"

http-listener or http-server.http-listener

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-31  HTTP Listener Attributes

server.xml Name

asadmin Name

id

id

address

address

port

port

family

family

acceptor-threads

acceptorThreads

blocking-enabled

blockingEnabled

security-enabled

securityEnabled

default-virtual-server

defaultVirtualServer

server-name

serverName

enabled

enabled

cert-nickname

cert

ssl2-enabled

ssl2

ssl2-ciphers

ssl2Ciphers

ssl3-enabled

ssl3

ssl3-tls-ciphers

ssl3Ciphers

tls-enabled

tls

tls-rollback-enabled

tlsRollback

client-auth-enabled

clientAuth

To get all the attributes from an instance (server1):

asadmin> get server1.http-listener.http_listener_name.*

or

asadmin> get server1.http-server.http-listener.http_listener_name.*

To get an attribute called factory:

asadmin> get server1.httpl-listener.http_listener_name.address

or

asadmin> get server1.http-server.http-listener.http_listener_name.address

To set an attribute called address to the IP address 0.0.0.0:

asadmin> set server1.http-listener.http_listener_name.address=0.0.0.0

or

asadmin> set server1.http-server.http-listener.http_listener_name.address=0.0.0.0

mime

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-32  MIME Types Attributes

server.xml Name

asadmin Name

id

id

file

file

To get all the attributes from an instance (server1):

asadmin> get server1.mime.mime_name.*

To get an attribute called file:

asadmin> get server1.mime.mime_name.file

To set an attribute called file to mime.types:

asadmin> set server1.mime.mime_name.file=mime.types

acl

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-33  ACL Attributes

server.xml Name

asadmin Name

id

id

file

file

To get all the attributes from an instance (server1):

asadmin> get server1.acl.acl_name.*

To get an attribute called file:

asadmin> get server1.acl.acl_name.file

To set an attribute called file:

asadmin> set server1.acl.acl_name.file=com/as1.acl

virtual-server

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-34  Virtual Server Attributes

server.xml Name

asadmin Name

id

id

http-listeners

httpListeners

config-file

configFile

default-object

defaultObject

accept-language

acceptLanguage

log-file

logFile

default-web-module

defaultWebModule

hosts

hosts

mime

mime

state

state

acls

acls

bandwidth-limit

bandwidthLimit

enforce-bandwidth-limit

enforceBandwidthLimit

connection-limit

connectionLimit

enforce-connection-limit

enforceConnectionLimit

property name="dir" value=

property.dir

property name="nice" value=

property.nice

property name="user" value=

property.user

property name="group" value=

property.group

property name="chroot" value=

property.chroot

property name="docroot" value=

property.docroot

property name="accesslog" value=

property.accesslog

To get all the attributes from an instance (server1):

asadmin> get instance_name.virtual-server.vserver_id.*

For example:

asadmin> get server1.virtual-server.server1.*

To get an attribute called httpListeners for virtual server server1:

asadmin> get server1.virtual-server.server1.httpListeners

To set an attribute called acceptLanguage to false:

asadmin> set server1.virtual-acceptLanguage=false

auth-db

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-35  Authentication Database Attributes

server.xml Name

asadmin Name

id

id

database

database

basedn

basedn

certmaps

certmaps

To get all the attributes from an instance:

asadmin> get instancename.virtual-server.vserver_id.auth-db.authdb_id.*

For example, for the instance server1, virtual server server1:

asadmin> get server1.virtual-server.server1.auth-db.authdb_id.*

To get an attribute called database:

asadmin> get server1.virtual-server.server1.auth-db.authdb_id.database

To set an attribute called database:

asadmin> set server1.virtual-server.server1.auth-db.authdb_id.database=Oracle

authrealm

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-36  Authorization Realm Attributes

server.xml Name

asadmin Name

name

name

classname

classname

To get all the attributes from an instance (server1):

asadmin> get server1.authrealm.authrealm_id.*

To get an attribute called classname:

asadmin> get server1.authrealm.authrealm_id.classname

To set an attribute called classname:

asadmin> set server1.authrealm.authrealm_id.classname=com.sun.as.security.auth.real m.sharedpassword.SharedPasswordRealm

lifecycle-module

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-37  LifeCycle Module Attributes

server.xml Name

asadmin Name

name

name

enabled

enabled

class-name

className

classpath

classPath

load-order

loadOrder

is-failure-fatal

isFailureFatal

description

description

To get all the attributes from an instance (server1):

asadmin> get server1.lifecycle-module.lifecycle_module_id.*

To get an attribute called className for a lifecycle module:

asadmin> get server1.lifecycle-module.lifecycle_module_id.className

To set an attribute called className:

asadmin> set server1.lifecycle-module.lifecycle_module_id.className=com.lifecycle_module_id. lifecycle

profiler

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-38  JVM Profiler Configuration Attributes

server.xml Name

asadmin Name

name

name

classpath

classPath

native-library-path

nativeLibraryPath

enabled

enabled

To get all the attributes from an instance (server1):

asadmin> get server1.profiler.*

To get an attribute called enabled:

asadmin> get server1.profiler.enabled

To set an attribute called enabled to false

asadmin> set server1.profiler.enabled=false

server configuration (name of server instance)

The following table shows the server.xml name for the attribute in the left column, and the name used by asadmin in the right column.

Table A-39  Server Configuration Attributes

server.xml Name

asadmin Name

instance-name

name

locale

locale

log-root

logRoot

session-store

sessionStore

application-root

applicationRoot

dynamic-reload-enabled

appDynamicReloadEnabled

dynamic-reload-poll-interval-in-seconds

appReloadPollInterval

To get all the attributes from an instance (server1):

asadmin> get server1.*

To get an attribute called logRoot:

asadmin> get server1.logRoot

To set an attribute called logRoot:

asadmin> set server1.logRoot="/space/log"

Long and Short Option Formats, Default Values, and Environment Variable Equivalents

The following table lists the long and short formats for command line options. If there is no short format listed, a short format of the option is not available.

Table A-40  Short and Long Options, Default Values, and Environment Variables

Option Name

Long Format

Short Format

Default Value

Environment Variable

acceptlang

--acceptlang

 

 

AS_ADMIN_ACCEPT_

acceptorthreads

--acceptorthreads

 

 

AS_ADMIN_ACCEPTOR_THREADS

acls

--acls

 

 

AS_ADMIN_ACLS

address

--address

 

 

AS_ADMIN_ADDRESS

adminpassword

--adminpassword

 

 

AS_ADMIN_ADMINPASSWD

adminport

--adminport

 

4848

AS_ADMIN_ADMINPORT

adminuser

--adminuser

 

 

AS_ADMIN_ADMINUSER

basedn

--basedn

 

 

AS_ADMIN_BASEDN

blockingenabled

--blockingenabled

 

 

AS_ADMIN_BLOCKINGENABLED

bwlimit

--bwlimit

 

 

AS_ADMIN_BWLIMIT

certmaps

--certmaps

 

 

AS_ADMIN_CERTMAPS

certname

--certname

 

 

AS_ADMIN_CERTNAME

classname

--classname

 

 

AS_ADMIN_CLASSNAME

classpath

--classpath

 

 

AS_ADMIN_CLASSPATH

clientauthenabled

--clientauthenabled

 

 

AS_ADMIN_CLIENTAUTHENABLED

configfile

--configfile

 

 

AS_ADMIN_CONFIGFILE

connectionpoolid

--connectionpoolid

 

AS_ADMIN_CONNECTIONPOOLID

connlimit

--connlimit

 

 

AS_ADMIN_CONNLIMIT

contextroot

--contextroot

 

 

AS_ADMIN_CONTEXTROOT

database

--database

 

 

AS_ADMIN_DATABASE

debug

--debug

false

AS_ADMIN_DEBUG

defaultobj

--defaultobj

 

 

AS_ADMIN_DEFAULTOBJ

defaultwebmodule

--defaultwebmodule

 

AS_ADMIN_DEFAULTWEBMODULE

description

--description

 

AS_ADMIN_DESCRIPTION

discardmanualchanges

--discardmanualchanges

-d

false

AS_ADMIN_DISCARDMANUALCHANGES

echo

--echo

-e

false

AS_ADMIN_ECHO

enabled

--enabled

 

 

AS_ADMIN_ENABLED

enforcebwlimit

--enforcebwlimit

 

 

AS_ADMIN_ENFORCEBWLIMIT

enforceconnlimit

--enforceconnlimit

 

 

AS_ADMIN_ENFORCECONNLIMIT

failconnection

--failconnection

 

false

AS_ADMIN_FAILCONNECTION

failurefatal

--failurefatal

 

false

AS_ADMIN_FAILUREFATAL

family

--family

 

AS_ADMIN_FAMILY

file

--file

-f

 

AS_ADMIN_FILE

force

--force

-F

true

AS_ADMIN_FORCE

help

--help

-h

 

AS_ADMIN_HELP

host

--host

-H

 

AS_ADMIN_HOST

hosts

--hosts

 

 

AS_ADMIN_HOSTS

httplistenerid

--httplistenerid

 

 

AS_ADMIN_HTTPLISTENERID

httplisteners

--httplisteners

 

 

AS_HTTP_LISTENERS

idletimeout

--idletimeout

 

300

AS_ADMIN_IDLETIMEOUT

instance

--instance

-i

server1

AS_ADMIN_INSTANCE

instanceport

--instanceport

 

 

AS_ADMIN_INSTANCEPORT

interactive

--interactive

-I

true

AS_AMDIN_INTERACTIVE

isconnectvalidaterequired

--isconnectvalidaterequired

 

false

AS_ADMIN_ISCONNECTVALIDATEREQUIRED

jdbcjndiname

--jdbcjndiname

-a

 

AS_ADMIN_JDBCJNDINAME

jndilookupname

--jndilookupname

-l

 

AS_ADMIN_JNDILOOKUPNAME

keepmanualchanges

--keepmanualchanges

-k

false

AS_ADMIN_KEEPMANUALCHANGES

loadorder

--loadorder

 

 

AS_ADMIN_LOADORDER

local

--local

-l

false

 

logfile

--logfile

 

 

AS_ADMIN_LOGFILE

maxpoolsize

--maxpoolsize

 

32

AS_ADMIN_MAXPOOLSIZE

maxwait

--maxwait

 

6000

AS_ADMIN_MAXWAIT

mime

--mime

 

 

AS_ADMIN_MIME

mimefile

--mimefile

 

 

AS_ADMIN_MIMEFILE

monitor

--monitor

-m

false

AS_ADMIN_MONITOR

name

--name

-n

 

AS_ADMIN_NAME

nativelibpath

--nativelibpath

 

 

AS_ADMIN_NATIVELIBPATH

objtype

--objtype

-o

 

AS_ADMIN_OBJTYPE

password

--password

-w

 

AS_ADMIN_PASSWORD

poolresize

--poolresize

 

2

AS_ADMIN_POOLRESIZE

port

--port

-p

8000

AS_ADMIN_PORT

prefix

--prefix

-x

 

AS_ADMIN_PREFIX

printprompt

--printprompt

-P

true

AS_ADMIN_PROMPT

property

--property

 

 

AS_ADMIN_PROPERTY

securityenabled

--securityenabled

 

 

AS_ADMIN_SECURITYENABLED

servername

--servername

 

 

AS_ADMIN_SERVERNAME

ssl2ciphers

--ssl2ciphers

 

 

AS_ADMIN_SSL2CIPHERS

ssl2enabled

--ssl2enabled

 

 

AS_ADMIN_SSL2ENABLED

ssl3enabled

--ssl3enabled

 

 

AS_ADMIN_SSL3ENABLED

ssl3tlsciphers

--ssl3tlsciphers

 

 

AS_ADMIN_SSL3TLSCIPHERS

state

--state

 

 

AS_ADMIN_STATE

steadypoolsize

--steadypoolsize

8

 

AS_ADMIN_STEADYPOOLSIZE

storeprotocol

--storeprotocol

 

 

AS_ADMIN_STOREPROTOCOL

storeprotocolclass

--storeprotocolclass

 

 

AS_ADMIN_STOREPROTOCOLCLASS

tlsenabled

--tlsenabled

 

 

AS_ADMIN_TLSENABLED

tlsrollbackenabled

--tlsrollbackenabled

 

 

AS_ADMIN_TLSROLLBACKENABLED

transprotocol

--transprotocol

 

smtp

AS_ADMIN_TRANSPROTOCOL

type

--type

 

 

S_ADMIN_TRANSPROTOCOLCLASS

upload

--upload

-U

true

AS_ADMIN_TYPE

url

--url

 

 

AS_ADMIN_URL

user

--user

-u

 

AS_ADMIN_USER

validationmethod

--validationmethod

 

auto-commit

AS_ADMIN_VALIDATIONMETHOD

validationtable

--validationtable

 

 

AS_ADMIN_VALIDATIONTABLE

version

--version

-v

 

AS_AMDIN_VERSION

virtualserver

--virtualserver

 

 

AS_ADMIN_VIRTUALSERVER



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.