Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Upgrade and Migration Guide

- Previous: Command Line Interface: start-appserv and stop-appserv
- Next: Chapter 2 J2EE 1.4 Compatibility Issues

# Command Line Interface: asadmin

The following sections describe changes to the command line utility `asadmin`:

- Subcommands

- Error Codes for Start and Stop Subcommands

- Options

- Dotted Names

- Tokens in Attribute Values

- Nulls in Attribute Values

For more information about the `asadmin` commands, see the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Reference Manual.

## Subcommands

Subcommands are backward compatible except as noted below.

The following subcommand is deprecated and ignored:

- `reconfig`

The following subcommands are not supported in Application Server 8.1:

- `show-instance-status` (use `list-instances`)

- `restart-instance` (use `stop-instance` followed by `start-instance`)

- `configure-session-persistence` (renamed to `configure-ha-persistence`)

- `create-session-store` (renamed to `create-ha-store`)

- `clear-session-store` (renamed to `clear-ha-store`)

The following subcommands are no longer supported in Application Server 8.1, because the software license key and web core were removed, and because controlled functions from web server features are no longer supported:

- `install-license`

- `display-license`

- `create-http-qos`

- `delete-http-qos`

- `create-mime`

- `delete-mime`

- `list-mime`

- `create-authdb`

- `delete-authdb`

- `list-authdbs`

- `create-acl`

- `delete-acl`

- `list-acls`

## Error Codes for Start and Stop Subcommands

For Application Server 7, the exit codes returned by the `start` and `stop` subcommands of the `asadmin` command were based on the desired end state. For example, for `asadmin start-domain`, if the domain was already running, the exit code was 0 (success). If domain startup failed, the exit code was 1 (error).

For Application Server 8.1, the exit codes are based on whether the commands execute as expected. For example, the `asadmin start-domain` command returns exit code 1 if the domain is already running or if domain startup fails. Similarly, `asadmin stop-domain` returns exit code 1 if the domain is already not running or cannot be stopped.

## Options

Options in the following table are deprecated or no longer supported.

Table 1–3 Deprecated and Unsupported `asadmin` Options

Option | Deprecated or Unsupported in Subcommands
--- | ---
`--acceptlang` | Deprecated for the `create-virtual-server` subcommand.
`--acls` | Deprecated for the `create-virtual-server` subcommand.
`--adminpassword` | Deprecated for all relevant subcommands. Use `--passwordfile` instead.
`--blockingenabled` | Deprecated for the `create-http-listener` subcommand.
`--configfile` | Deprecated for the `create-virtual-server` subcommand.
`--defaultobj` | Deprecated for the `create-virtual-server` subcommand.
`--domain` | Deprecated for the `stop-domain` subcommand.
`--family` | Deprecated for the `create-http-listener` subcommand.
`--instance` | Deprecated for all remote subcommands. Use `--target` instead.
`--mime` | Deprecated for the `create-virtual-server` subcommand.
`--optionsfile` | No longer supported for any commands.
`--password` | Deprecated for all remote subcommands. Use `--passwordfile` instead.
`--path` | Deprecated for the `create-domain` subcommand. Use `--domaindir` instead.
`--resourcetype` | Deprecated for all relevant subcommands. Use `--restype` instead.
`--storeurl` | No longer supported for any commands.
`--target` | Deprecated for all `jdbc-connection-pool`, `connector-connection-pool`, `connector-security-map`, and `resource-adapter-config` subcommands.
`--type` | Deprecated for all relevant subcommands.

## Dotted Names

The following use of dotted names in `asadmin get` and `set` subcommands are not backward compatible:

- Default server name is `server` instead of `server1`

- server_instance.resource becomes domain.resources.resource

- server_instance.app-module becomes domain.applications.app-module

- Attributes names format is different, for example, poolResizeQuantity is now pool-resize-quantity

- Some aliases supported in Application Server 7 are not supported in Application Server 8.1

In Application Server 8.1, the `---passwordfile` option of the `asadmin` command does not read the `password.conf` file, and the upgrade tool does not upgrade this file. For information about creating a password file in Application Server 8.1, see the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide.

The table below displays a one-to-one mapping of the incompatibilities in dotted names between Application Server 7 and 8.1. The compatible dotted names are not listed in this table.

Table 1–4 Incompatible Dotted Names Between Versions

Application Server 7 Dotted Names | Application Server 8 Dotted Names
--- | ---
server_instance`.http-listener.`listener_idserver_instance`.http-service.http-listener.`listener_id | server_instance`.http-service.http-listener.`listener_idconfig_name`.http-service.http-listener.`listener_id
server_instance`.orb` server_instance`.iiop-service` | server_instance`.iiop-service` config_name`.iiop-service`
server_instance`.orblistener` server_instance`.iiop-listener` | server_instance`.iiop-service.iiop-listener.`listener_idconfig_name`.iiop-service.iiop-listener.`listener_id
server_instance`.jdbc-resource.`jndi_name | server_instance`.resources.jdbc-resource.`jndi_name `domain.resources.jdbc-resource.`jndi_name
server_instance`.jdbc-connection-pool.`pool_id | server_instance`.resources.jdbc-connection-pool.`pool_id `domain.resources.jdbc-connection-pool.`pool_id
server_instance`.external-jndi-resource.`jndi_nameserver_instance`.jndi-resource.`jndi_name | server_instance`.resources.external-jndi-resource.`jndi_name `domain.resources.external.jndi-resource.`jndi_name
server_instance`.custom-resource.`jndi_name | server_instance`.resources.custom-resource.`jndi_name `domain.resources.custom-resource.`jndi_name
server_instance`.web-container.logLevel` (see note below) | server_instance`.log-service.module-log-levels.web-container` config_name`.log-service.module-log-levels.web-container`
server_instance`.web-container.monitoringEnabled` (see note below) | server_instance`.monitoring-service.module-monitoring-levels.web-container` config_name`.monitoring-service.module-monitoring-levels.web-container`
server_instance`.j2ee-application.`application_nameserver_instance`.application.`application_name | server_instance`.applications.j2ee-application.`application_name `domain.applications.j2ee-application.`application_name
server_instance`.ejb-module.`ejb-module_name | server_instance`.applications.ejb-module.`ejb-module_name `domain.applications.ejb-module.`ejb-module_name
server_instance`.web-module.`web-module_name | server_instance`.applications.web-module.`web-module_name `domain.applications.web-module.`web-module_name
server_instance`.connector-module.`connector_module_name | server_instance`.applications.connector-module.`connector_module_name `domain.applications.connector-module.`connector_module_name
server_instance`.lifecycle-module.`lifecycle_module_name | server_instance`.applications.lifecycle-module.`lifecycle_module_name `domain.application.lifecycle-module.`lifecycle_module_name
server_instance`.virtual-server-class` | N/A
server_instance.`virtual-server`.virtual-server_id | server_instance`.`http-service.virtual-server.virtual-server_idconfig_name.http-service.virtual-server.virtual-server_id
server_instance`.mime`.mime_id | N/A
server_instance.`acl`.acl_id | N/A
server_instance.`virtual-server`.virtual-server_id.`auth-db`.auth-db_id | N/A
server_instance.`authrealm`.realm_idserver_instance.`security-service.authrealm`.realm_id | server_instance`.security-service.auth-realm.`realm_idconfig_name`.security-service-auth-realm.`realm_id
server_instance`.persistence-manager-factory-resource.`jndi_nameserver_instance`.resources.persistence-manager-factory-resource.`jndi_name | server_instance`.resources.persistence-manager-factory-resource.`jndi_name `domain.resources.persistence-manager-factory-resource.`jndi_name
server_instance`.http-service.acl.`acl_id | N/A
server_instance`.mail-resource.`jndi_name | server_instance`.resources.mail-resource.`jndi_name `domain.resources.mail-resource.`jndi_name
server_instance`.profiler` | server_instance`.java-config.profiler` config_name`.java-config.profiler`

Note –

Rows with note in previous table describe attribute names. In these instances, there is not a one-to-one relationship with the dotted names between Application Server 7 and 8.1.

## Tokens in Attribute Values

The asadmin `get` command shows raw values in Application Server 8.1 instead of resolved values as in Application Server 8. These raw values may be tokens. For example, executing the following command:

    asadmin get domain.log-root

displays the following value:

    ${com.sun.aas.instanceRoot}/logs

## Nulls in Attribute Values

In Application Server 8, attributes with no values contained nulls. This caused problems in attributes that specified paths. In Application Server 8.1, attributes with no values contain empty strings, as they did in Application Server 7.

- Previous: Command Line Interface: start-appserv and stop-appserv
- Next: Chapter 2 J2EE 1.4 Compatibility Issues

- © 2010, Oracle Corporation and/or its affiliates