The Sun Java System (GlassFish) Application Server includes a command line administration utility known as asadmin. The asadmin utility can be used to perform any of the application server's administrative tasks, including those for administrating JBI Components.
The asadmin Utility uses the following guidelines:
All asadmin commands and options are case sensitive.
Option arguments are preceded by a single dash (-) or two dashes (--). Double dashes are used to specify long option arguments and a single dash specify the short option argument. Not all arguments will have a short option. Most options require argument values except boolean options which toggle to switch a feature ON or OFF.
For more information on options and their use, see the JBI Command Options and Values Table.
The asadmin utility can be run in interactive and non-interactive modes. Interactive mode will prompt the user for input, and is the default mode.
The command syntax is:
asadmin command [-short_option] [short_option_argument]* [--long_option [long_option_argument]* [operand]* |
JBI command name syntax is:
verb-jbi-noun |
For example: start-jbi-component or deploy-jbi-service-assembly.
This convention distinguishes JBI commands from other application server commands, and provides a name that describes the purpose of the command.
Help can be obtained by issuing the following commands:
asadmin --help (displays general help)
asadmin command --help (displays help for the specified command)
The following table contains JBI CLI commands and options used to administer JBI components. Some of these CLI commands have had options added to them to support the Java CAPS.
Command Name |
Options and Values |
Operand and Example |
|
---|---|---|---|
install-jbi-component: Installs a service engine or binding component into the JBI environment. |
For more information on options and their use, see JBI Command Options and Values Table |
The file path or component name: The archive file that will contain the component attributes, or the name of the component that has been previously installed to the domain. |
|
start-jbi-component: Starts a service engine or binding component on the specified target. If no target is specified, the component is started on the embedded DAS server. |
|
The component name: The name of the binding component or service engine to start. |
|
stop-jbi-component: Stops a service engine or binding component on the specified target. If no target is specified, the component is stopped on the embedded DAS server. |
|
The component name: The name of the binding component or service engine to stop. |
|
shut-down-jbi-component: Shuts down a service engine or binding component on the specified target. If no target is specified, the component is shutdown on the embedded DAS server. |
For more information on options and their use, see JBI Command Options and Values Table |
The component name: The name of the component to shutdown. |
|
uninstall-jbi-component: Uninstalls a service engine or binding component on the specified target. If no target is specified, the component will be uninstalled from the embedded DAS server. |
|
The component name: The name of the component to uninstall. |
|
deploy-jbi-service-assembly: Deploys a service assembly into the JBI Environment. The Target option (--target) is only relevant for Application Server Enterprise Edition. |
|
The file path or service assembly name: The archive file that will contain the service assembly attributes, or the name of the service assembly that has been previously deployed to the domain. |
|
start-jbi-service-assembly: Starts a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
For more information on options and their use, see JBI Command Options and Values Table |
The service assembly name: The name of the service assembly to start. |
|
stop-jbi-service-assembly: Starts a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
|
The service assembly name: The name of the service assembly to stop. |
|
shut-down-jbi-service-assembly: Shuts down a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
|
The service assembly name: The name of the service assembly to shutdown. |
|
undeploy-jbi-service-assembly: Undeploys a service assembly on the specified target. If no target is specified, the command is executed against the server instance. |
For more information on options and their use, see JBI Command Options and Values Table |
The service assembly name: The name of the service assembly to undeploy. |
|
install-jbi-shared-library: Installs a shared library into the JBI Environment. |
|
The file path: The archive file that will contain the shared library. |
|
uninstall-jbi-shared-library: Uninstalls a shared library from the specified target instance or cluster. If no target is specified, the shared library is uninstalled from the embedded DAS server. |
|
The shared library name: The name of the shared library to uninstall. |
|
list-jbi-service-engines: Lists the service engines that are installed in the JBI Environment. If no filters are specified, the list includes all installed service engines. |
For more information on options and their use, see JBI Command Options and Values Table |
None. |
|
list-jbi-binding-components: Lists the binding components that are installed in the JBI Environment. If no filters are specified, the list includes all installed binding components. |
|
None. |
|
list-jbi-shared-libraries: Lists the shared libraries that are installed in the JBI Environment. If no filters are specified, the list includes all installed shared libraries. |
|
None. |
|
list-jbi-service-assemblies: Lists the service assemblies that are installed in the JBI Environment. If no filters are specified, the list includes all installed service assemblies. |
For more information on options and their use, see JBI Command Options and Values Table |
None. |
|
show-jbi-service-engine: Shows detail information about the specified service engine. General information is displayed by default. Additional information is shown if the configuration, loggers, or descriptor options are specified. |
|
The name of the service engine. Example: show-jbi-service-engine sun-javaee-engine |
|
show-jbi-binding-component: Shows detailed information about the specified binding component. General information is displayed by default. Additional information is shown if the configuration, loggers, or descriptor options are specified. |
|
The name of the binding component. Example: show-jbi-binding-component sun-http-binding |
|
show-jbi-shared-library: Shows detailed information about the specified shared library. General information is displayed by default. Descriptor information is shown if the descriptor option is specified. |
For more information on options and their use, see JBI Command Options and Values Table |
The name of the shared library. Example: show-jbi-shared-library cli_test_sns1 |
|
show-jbi-service-assembly: Shows detailed information about the specified service assembly. General information is displayed by default. Descriptor information is shown if the descriptor option is specified. |
|
The name of the service assembly. Example: show-jbi-service-assembly PingApp |
|
upgrade-jbi-component: Upgrades a service engine or binding component that is currently installed in the JBI Environment. |
|
The name of the component that currently installed in the domain. Example: upgrade-jbi-component --upgradefile=cli-test-engine4-1.jar cli_test_engine4 |
|
set-jbi-runtime-logger: Sets the log level for a logger in the JBI runtime. |
For more information on options and their use, see JBI Command Options and Values Table |
Contains name=value pairs separated by a comma, or the name of a file that contains the name=value pairs for the loggers that are set. If the operand contains spaces, it must be placed within double quotes. Spaces or white space inside the quotes is taken literally. The value specified must be text that represents a legal logger level, or the text “DEFAULT” can be specified. If “DEFAULT” is used, the logger is reset to its initial state, which is to inherit the logger level from the parent. Example: set-jbi-runtime-logger com.sun.jbi.messaging=WARNING |
|
set-jbi-component-logger: Sets the log level for a specified component. |
|
Contains name=value pairs separated by a comma, or the name of a file that contains the name=value pairs for the loggers that are set. If the operand contains spaces the operand must be placed within double quotes. Spaces or white space inside the quotes is taken literally. The value specified must be text that represents a legal logger level, or the text “DEFAULT” can be specified. If “DEFAULT” is used, the logger is reset to its initial state, which is to inherit the logger level from the parent. Example: set-jbi-component-logger --component=sun-http-binding sun-http-binding.com.sun.jbi.httpsoapbc.HttpSoapBindingDeployer=INFO |
|
set-jbi-runtime-configuration: Sets the JBI runtime configuration values. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the configuration values that will be set. If the operand contains spaces, the operand must be placed within double quotes. The exact name of the configuration variable must be specified. Use the show-jbi-runtime-configuration command to view the names and current values for the runtime configuration. Example: set-jbi-runtime-configuration heartBeatInterval=6000 |
|
set-jbi-component-configuration: Sets the binding component or service engine configuration values for the given component name . |
For more information on options and their use, see JBI Command Options and Values Table |
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the configuration values that will be set. If the operand contains spaces, the operand must be placed within double quotes. The exact name of the configuration variable must be specified. Use the show-jbi-binding-component or show-jbi-service-engine command with the --configuration option to view the names and current values of the component configuration. Example: set-jbi-component-configuration OutboundThreads=5,ProxyPort=2345 |
|
update-jbi-application-configuration: Updates the application configuration for the specified component. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the application configuration values that will be updated. If the operand contains spaces, the operand must be placed within double quotes. Example: update-jbi-application-configuration --component=cli-config-binding --configname=testConfig ConfigData.properties |
|
update-jbi-application-variable: Updates the application variables for the specified component. Application variables are set using the format name=typevalue. If the type is not specified, the default type, String will be used. The valid types are String, Number, Boolean, and Password. When updating a variable, the type of the variable specified must match the type of the variable when it was created. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the application variables that will be updated. If the operand contains spaces or contains the square brackets specifying the type, the operand must be placed within double quotes. The type specified must match what was originally specified in the create command. Example: update-jbi-application-variable --component=cli-config-binding some-property-file.properties |
|
create-jbi-application-configuration: Creates an application configuration for the specified component. |
For more information on options and their use, see JBI Command Options and Values Table |
Contains name=value pairs separated by a comma, or a name of a file that contains the name=value pairs for the application configuration values that will be created. If the operand contains spaces, the operand must be placed within double quotes. Example: create-jbi-application-configuration --component=cli-config-binding --configname=testConfig ConfigData.properties |
|
create-jbi-application-variable: Creates application variables for the specified component. Application variables are set using the format name=[type]value. If the type is not specified, the default type, String will be used. The valid types are String, Number, Boolean, and Password. |
|
Contains name=value pairs separated by a comma, or a name of a file that contains the name=[type]value pairs for the application variables to be updated. If the operand contains spaces or contains square brackets specifying the type, the operand must be placed within double quotes. Example: create-jbi-application-variable --component=cli-config-binding some-property-file.properties |
|
delete-jbi-application-configuration: Deletes an application configuration for a specified component. |
|
The name of the application configuration to be deleted. Example: delete-jbi-application-configuration --component=cli-config-binding testConfig |
|
delete-jbi-application-variable: Deletes an application variable. |
For more information on options and their use, see JBI Command Options and Values Table |
The name or names of the application variables to be deleted. If the operand contains spaces, the operand must be in cased within double quotes. Spaces are taken literally. Example: delete-jbi-application-variable --component cli-config-binding FirstName |
|
list-jbi-application-configurations: Lists the JBI Application Configurations for the specified component. |
|
None. Example: list-jbi-application-configurations --component=cli-config-binding |
|
list-jbi-application-variables: Lists the JBI Application Variables for the specified component. |
|
None. Example: list-jbi-application-variables --component=cli-config-binding |
|
show-jbi-runtime-loggers: Shows the JBI runtime loggers. |
For more information on options and their use, see JBI Command Options and Values Table |
None. Example: show-jbi-runtime-loggers |
|
show-jbi-runtime-configuration: Shows the JBI runtime configuration values. |
|
None. Example: show-jbi-runtime-configuration |
|
show-jbi-statistics: Shows JBI statistics, filtered using the specified option values. To show more then one statistical category the user can specify more then one option value on the command line. |
|
None. Example: show-jbi-statistics --nmr |
The Following table provides a description of the JBI command options.
Option |
Value |
Description |
---|---|---|
Common Options: These options are common to most of the JBI Component asadmin commands. |
||
--echo | -e |
true | false |
true indicates that the command specified on the command line is echoed to system output. |
--interactive| -I |
true | false |
true (default) indicates that only the required password options are prompted. |
--terse | -t |
true | false |
true indicates that the output is reduced to the minimal amount. |
--port | -p |
The port number |
The HTTP/S port for administration. Default port for PE: 4848, default port for EE: 4849 |
--secure | -s |
true | false |
true indicates that SSL/TLS is used to communicate with the domain administration server. |
--host | -H |
localhost |
The machine name where the JBI application is running. The default value is localhost. |
--user | -u |
The admin user |
The authorized domain administration server administrative username. |
--passwordfile |
filename |
The name of a file containing the password entries. |
--target |
target name | [server]|domain |
The name of the target. |
--help |
Displays the help text for the command. |
|
Specialized Options: These options are for specific JBI Component asadmin commands only. |
||
--assemblyname |
service assembly name |
Lists the components that have ASA deployed as part of the service assembly unit with the specified service assembly name. |
--component |
component name |
The name of the referenced component. |
--componentname |
component name |
Lists the shared libraries referenced by the specified component. |
--configuration |
true|[false] |
Displays the component's configuration values. |
--descriptor |
true|[false] |
Displays the component's XML desriptor. |
--enabled |
true|false |
true indicates that the service assembly starts automatically when the system starts up. Users are allowed to access the service assembly. For EE, this option enables the deployment on the specified instance or cluster. This option is ignored when the service assembly is deployed on the target domain. |
--endpoint |
endpoint name |
Displays the endpoint statistics. |
--force| -F |
true|[false] |
true indicates that the component will be forcefully shut down. |
--framework |
true|[false] |
Displays the framework statistics. |
--keeparchive |
true|[false] |
true indicates that the component will remain in the domain. |
--libraryname |
shared library name |
Lists the components that currently use the specified shared library. |
--lifecyclestate |
shutdown|started|stopped |
The list can be filtered on the lifecycle state of the components. |
--loggers |
true|[false] |
Displays the component's loggers and their levels. |
--nmr |
true|[false] |
Displays the NMR (Normalized Message Router) statistics. |
--serviceassembly |
service assembly name |
Displays the component's statistics. |
--upgradefile |
[filepath] |
The new archive file path that is used to update the component. |
--upload |
[true]|false |
true indicates that it uploads the file to the administration server. If the filepath of the installable file is mounted to the server machine, or if the administration server is running locally, set the upload option to false. |
To start the asadmin utility from the command line, go to the install-dir/bin directory, where install-dir is the application server installation directory, and enter the command: asadmin.
For directions on how to configure a Windows Environment to use the asadmin Utility tools, see GlassFish Quick Start Guide.
For more information about using the asadmin Utility, see GlassFish JBICLI Project Plan and JBI ADMIN CLI