BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   BEA WebLogic Server Administration Guide:   Previous topic   |   Next topic   |   Contents   |  Index

 

WebLogic Server Command-Line Interface Reference

 

The following sections describe the WebLogic Server command-line interface:

About the Command-Line Interface

As an alternative to the Administration Console, WebLogic Server offers a command-line interface to its administration tools, as well as to many configuration and run-time Mbean properties.

Use the command-line interface if:

Before You Begin

The examples in this document are based on the following assumptions:

Before you can run WebLogic Server commands, you must do the following:

  1. Install and configure the WebLogic Server software, as described in the WebLogic Server Installation Guide.

  2. Set CLASSPATH correctly. See "Setting the Classpath Option".

  3. Enable the command-line interface by performing one of the following steps:

Using WebLogic Server Commands

This section presents the syntax and required arguments for using WebLogic Server commands. WebLogic Server commands are not case-sensitive.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] COMMAND arguments

Arguments

The following arguments are required by many WebLogic Server commands.

Argument

Definition

URL

The URL of the WebLogic Server host including the number of the TCP port at which WebLogic Server is listening for client requests. The format is hostname:port. The default is localhost:7001.

Note: The URL used with a server command always refers to the WebLogic Server, while the URL used with run-time and configuration Mbean commands always refers to a specific Administration server.

username

Optional. Username to be authenticated so commands can be executed. Default is guest.

password

Optional. Password to be authenticated so commands can be executed. Default is guest.

An administrator must have the appropriate access control permissions to run commands used to manage run-time Mbeans.

See the following sections:

WebLogic Server Administration Command Reference

Table B-1 presents an overview of WebLogic Server administration commands. The following sections describe command syntax and arguments, and provide an example for each command.

Table B-1 WebLogic Server Administration Commands Overview 

Task

Command

Description

Cancel shut down a WebLogic Server

CANCEL_SHUTDOWN

Cancels the SHUTDOWN command for the WebLogic Server that is specified in the URL.

Connect to WebLogic Server

CONNECT

Makes the specified number of connections to the WebLogic Server and returns two numbers representing the total time for each round trip and the average amount of time (in milliseconds) that each connection is maintained.

Get Help for one or more commands

HELP

Provides syntax and usage information for all WebLogic Server commands (by default) or for a single command if a command value is specified on the HELP command line.

View WebLogic Server licenses

LICENSES

Lists the licenses for all the WebLogic Server instances installed on a specific server.

List JNDI naming tree node bindings

LIST

Lists the bindings of a node in the JNDI naming tree.

Lock WebLogic Server

LOCK

Locks a WebLogic Server against non-privileged logins. Any subsequent login attempt initiates a security exception which may contain an optional string message.

Verify WebLogic Server listening ports

PING

Sends a message to verify that a WebLogic Server is listening on a port, and is ready to accept WebLogic client requests.

Viewing server log files

SERVERLOG

Displays the server log file generated on a specific server.

Shut down a WebLogic Server

SHUTDOWN

Shuts down the WebLogic Server that is specified in the URL.

View threads

THREAD_DUMP

Provides a real-time snapshot of the WebLogic Server threads that are currently running.

Unlock a WebLogic Server

UNLOCK

Unlocks the specified WebLogic Server after a LOCK operation.

View WebLogic Server version

VERSION

Displays the version of the WebLogic Server software that is running on the machine specified by the value of URL.

CANCEL_SHUTDOWN

The CANCEL_SHUTDOWN command cancels the SHUTDOWN command for a specified WebLogic Server.

When you use the SHUT_DOWN command, you can specify a delay (in seconds). An administrator may cancel the shutdown command during the delay period. Be aware that the SHUTDOWN command disables logins, and they remain disabled even after cancelling the shutdown. Use the UNLOCK command to re-enable logins.

See SHUTDOWN and UNLOCK.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] CANCEL_SHUTDOWN

Example

In the following example, a system user named system with a password of gumby1234 requests to cancel the shutdown of the WebLogic Server listening on port 7001 on machine localhost:

java weblogic.Admin -url t3://localhost:7001 -username system 
-password gumby1234 CANCEL_SHUTDOWN

CONNECT

Makes the specified number of connections to the WebLogic Server and returns two numbers representing the total time for each round trip and the average amount of time (in milliseconds) that each connection is maintained.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] CONNECT count

Argument

Definition

count

Number of connections to be made.

Example

In the following example, a user with the name adminuser and the password gumby1234 runs the CONNECT command to establish 25 connections to a server named localhost and return information about those connections:

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234 CONNECT 25

HELP

Provides syntax and usage information for all WebLogic Server commands (by default) or for a single command if a command value is specified on the HELP command line.

Syntax

java weblogic.Admin HELP [COMMAND]

Example

In the following example, information about using the PING command is requested:

java weblogic.Admin HELP PING

The HELP command returns the following to stdout:

Usage: weblogic.Admin [-url url] [-username username] 
[-password password] <COMMAND> <ARGUMENTS>

         PING <count> <bytes>

LICENSES

Lists the licenses for all WebLogic Server instances installed on the specified server.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] LICENSES

Example

In the following example, an administrator using the default username (guest) and default password (guest) requests the license information for a WebLogic Server running on port 7001 of machine localhost:

java weblogic.Admin -url localhost:7001 -username guest 
-password guest LICENSES

LIST

Lists the bindings of a node in the JNDI naming tree.

Syntax

java weblogic.Admin [-username username] [-password password] 
LIST context

Argument

Definition

context

Required. The JNDI context for lookup, for example, weblogic, weblogic.ejb, javax.

Example

In this example, user adminuser, who has a password of gumby1234, requests a list of the node bindings in weblogic.ejb:

java weblogic.Admin -username adminuser -password gumby1234 
LIST weblogic.ejb

LOCK

Locks a WebLogic Server against non-privileged logins. Any subsequent login attempt initiates a security exception which may contain an optional string message.

Note: This command is privileged. It requires the password for the WebLogic Server administrative user.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] LOCK "string_message"

Argument

Definition

"string_message"

Optional. Message, in double quotes, to be supplied in the security exception that is thrown if a non-privileged user attempts to log in while the WebLogic Server is locked.

Example

In the following example, a WebLogic Server is locked.

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234
LOCK "Sorry, WebLogic Server is temporarily out of service."

Any application that subsequently tries to log into the locked server with a non-privileged username and password receives the specified message: Sorry, WebLogic Server is temporarily out of service.

PING

Sends a message to verify that a WebLogic Server is listening on a port, and is ready to accept WebLogic client requests.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] PING [round_trips] [message_length]

Argument

Definition

round_trips

Optional. Number of pings.

message_length

Optional. Size of the packet to be sent in each ping. Requests for pings with packets larger than 10 MB throw exceptions.

Example

In the following example, the command checks a WebLogic Server running on port 7001 of machine localhost ten (10) times.

java weblogic.Admin -url localhost:7001 -username adminuser 
-password gumby1234 PING 10

SERVERLOG

Displays the log file generated on a specific server.

Syntax

java.weblogic.Admin [-url URL] [-username username]
[-password
password] SERVERLOG [[starttime]|[endtime]]

Argument

Definition

starttime

Optional. Earliest time at which messages are to be displayed. If not specified, messages display starts, by default, when the SERVERLOG command is executed. The date format is yyyy/mm/dd. Time is indicated using a 24-hour clock. The start date and time are entered inside quotation marks, in the following format: "yyyy/mm/dd hh:mm"

endtime

Optional. Latest time at which messages are to be displayed. If not specified, the default is the time at which the SERVERLOG command is executed. The date format is yyyy/mm/dd. Time is indicated using a 24-hour clock. The end date and time are entered inside quotation marks, in the following format: "yyyy/mm/dd hh:mm"

Example

In the following example, a request is made for a running display of the log for the server listening on port 7001 on machine localhost.

java weblogic.Admin -url localhost:7001 
SERVERLOG "2001/12/01 14:00" "2001/12/01 16:00"

The request specifies that the running display should begin at 2:00 p.m. on December 1, 2001, and end at 4:00 p.m. on December 1, 2001.

SHUTDOWN

Shuts down the WebLogic Server that is specified in the URL.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] SHUTDOWN [seconds] ["lockMessage"]

Argument

Definition

seconds

Optional. Number of seconds allowed to elapse between the invoking of this command and the shutdown of the server.

"lockMessage"

Optional. Message, in double quotes, to be supplied in the message that is sent if a user tries to log in while the WebLogic Server is locked.

Example

In the following example, a user with the adminuser username and an administrative password of gumby1234 shuts down a WebLogic Server that is listening on port 7001 of machine localhost:

java weblogic.Admin -url localhost:7001 -username adminuser 
-password gumby1234 SHUTDOWN 300 "Server localhost is shutting down."

After the command is issued, an interval of five minutes (300 seconds) elapses. Then the command shuts down the specified server and sends the following message to stdout:

Server localhost is shutting down.

THREAD_DUMP

Provides a real-time snapshot of the WebLogic Server threads that are currently running.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] THREAD_DUMP

UNLOCK

Unlocks the specified WebLogic Server after a LOCK operation.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] UNLOCK

Argument

Definition

username

Required. A valid administrative username must be supplied to use this command.

password

Required. A valid administrative password must be supplied to use this command.

Example

In the following example, an administrator named adminuser with a password of gumby1234 requests the unlocking of the WebLogic Server listening on port 7001 on machine localhost:

java weblogic.Admin -url localhost:7001 -username adminuser 
-password gumby1234 UNLOCK

VERSION

Displays the version of the WebLogic Server software that is running on the machine specified by the value of URL.

Syntax

java weblogic.Admin -url URL -username username 
-password password VERSION

Example

In the following example, a user requests the version of the WebLogic Server running on port 7001 on machine localhost:

java weblogic.Admin -url localhost:7001 -username guest 
-password guest VERSION

Note: In this example, the default value of both the username and password arguments, guest, is used.

WebLogic Server Connection Pools Administration Command Reference

Table B-2 presents an overview of WebLogic Server administration commands for connection pools. The following sections describe command syntax and arguments, and provide an example for each command.

For additional information about connection pools see Programming WebLogic JDBC and Managing JDBC Connectivity in the Administration Guide.

Table B-2 WebLogic Server Administration Commands Overview-Connection Pools

Task

Command

Description

Create a Dynamic Connection Pool

CREATE_POOL

Allows creation of connection pool while WebLogic Server is running. Note that dynamically created connection pools cannot be used with DataSources or TxDataSources.

Destroy a Connection Pool

DESTROY_POOL

Connections are closed and removed from the pool and the pool dies when it has no remaining connections. Only the "system" user or users granted "admin" permission by an ACL associated with a connection pool can destroy the pool.

Disable a Connection Pool

DISABLE_POOL

You can temporarily disable a connection pool, preventing any clients from obtaining a connection from the pool. Only the "system" user or users granted "admin" permission by an ACL associated with a connection pool can disable or enable the pool.

Enable a Connection Pool

ENABLE_POOL

When a pool is enabled after it has been disabled, the JDBC connection states for each in-use connection are exactly as they were when the connection pool was disabled; clients can continue JDBC operations exactly where they left off.

Determine if a Connection Pool Exists

EXISTS_POOL

Tests whether a connection pool with a specified name exists in the WebLogic Server. You can use this command to determine whether a dynamic connection pool has already been created or to ensure that you select a unique name for a dynamic connection pool you want to create.

Resets a Connection Pool

RESET_POOL

Closes and reopens all allocated connections in a connection pool. This may be necessary after the DBMS has been restarted, for example. Often when one connection in a connection pool has failed, all of the connections in the pool are bad.

CREATE_POOL

Allows creation of connection pool while WebLogic Server is running. For more information, see "Creating a Connection Pool Dynamically" in Programming WebLogic JDBCdynamic_conn_pool.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] CREATE_POOL poolName aclName=aclX,
props=myProps,initialCapacity=1,maxCapacity=1,
capacityIncrement=1,allowShrinking=true,shrinkPeriodMins=15,
driver=myDriver,url=myURL

Argument

Definition

poolName

Required. Unique name of pool.

aclName

Required. Identifies the different access lists within fileRealm.properties in the server config directory. Paired name must be dynaPool.

props

Database connection properties; typically in the format "database login name; database password; server network id".

initialCapacity

Initial number of connections in a pool. If this property is defined and a positive number > 0, WebLogic Server creates these connections at boot time. Default is 1; cannot exceed maxCapacity.

maxCapacity

Maximum number of connections allowed in the pool. Default is 1; if defined, maxCapacity should be =>1.

capacityIncrement

Number of connections that can be added at one time. Default = 1.

allowShrinking

Indicates whether or not the pool can shrink when connections are detected to not be in use.
Default = true.

shrinkPeriodMins

Required. Interval between shrinking. Units in minutes. Minimum = 1.If allowShrinking = True, then default = 15 minutes.

driver

Required. Name of JDBC driver. Only local (non-XA) drivers can participate.

url

Required. URL of the JDBC driver.

testConnsOnReserve

Indicates reserved test connections. Default = False.

testConnsOnRelease

Indicates test connections when they are released. Default = False.

testTableName

Database table used when testing connections; must be present for tests to succeed. Required if either testConnOnReserve or testConOnRelease are defined.

refreshPeriod

Sets the connection refresh interval. Every unused connection will be tested using TestTableName. Connections that do not pass the test will be closed and reopened in an attempt to reestablish a valid physical database connection. If TestTableName is not set then the test will not be performed.

loginDelaySecs

The number of seconds to delay before creating each physical database connection. This delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created. Some database servers cannot handle multiple requests for connections in rapid succession. This property allows you to build in a small delay to let the database server catch up. This delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created.

Example

In the following example, a user with the name adminuser and the password gumby1234 runs the CREATE_POOL command to create a dynamic connection pool:

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234 CREATE_POOL myPool

java weblogic.Admin -url t3://forest:7901 -username system
-password gumby1234 CREATE_POOL dynapool6 "aclName=someAcl,
allowShrinking=true,shrinkPeriodMins=10,
url=jdbc:weblogic:oracle,driver=weblogic.jdbc.oci.Driver,
initialCapacity=2,maxCapacity=8,
props=user=SCOTT;password=tiger;server=bay816"

DESTROY_POOL

Connections are closed and removed from the pool and the pool dies when it has no remaining connections. Only the "system" user or users granted "admin" permission by an ACL associated with a connection pool can destroy the pool.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] DESTROY_POOL poolName [true|false]

Argument

Definition

poolName

Required. Unique name of pool.

false

(soft shutdown)

Soft shutdown waits for connections to be returned to the pool before closing them.

true

(default-hard shutdown)

Hard shutdown kills all connections immediately. Clients using connections from the pool get exceptions if they attempt to use a connection after a hard shutdown.

Example

In the following example, a user with the name adminuser and the password gumby1234 runs the DESTROY_POOL command temporarily freeze the active pool connections:

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234 DESTROY_POOL myPool false

DISABLE_POOL

You can temporarily disable a connection pool, preventing any clients from obtaining a connection from the pool. Only the "system" user or users granted "admin" permission by an ACL associated with a connection pool can disable or enable the pool.

You have to options for disabling a pool. 1) Freezing the connections in a pool that you later plan to enable, and 2) destroy the connections.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] DISABLE_POOL poolName [true|false]

Argument

Definition

poolName

Name of the connection pool

false

(disables and suspends)

Disables the connection pool, and suspends clients that currently have a connection. Attempts to communicate with the database server throw an exception. Clients can, however, close their connections while the connection pool is disabled; the connections are then returned to the pool and cannot be reserved by another client until the pool is enabled.

true

(default-disables and destroys)

Disables the connection pool, and destroys the client's JDBC connection to the pool. Any transaction on the connection is rolled back and the connection is returned to the connection pool.

Example

In the following example, a user with the name adminuser and the password gumby1234 runs the DISABLE_POOL command to freeze a connection that is to be enabled later:

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234 DISABLE_POOL myPool false

ENABLE_POOL

When a pool is enabled, the JDBC connection states for each in-use connection are exactly as they were when the connection pool was disabled; clients can continue JDBC operations exactly where they left off.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] ENABLE_POOL poolName

Argument

Definition

poolName

Name of the connection pool.

Example

In the following example, a user with the name adminuser and the password gumby1234 runs the ENABLE_POOL command to reestablish connections that have been disabled (frozen):

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234 ENABLE_POOL myPool

EXISTS_POOL

Tests whether a connection pool with a specified name exists in the WebLogic Server. You can use this method to determine whether a dynamic connection pool has already been created or to ensure that you select a unique name for a dynamic connection pool you want to create.

Syntax

java weblogic.Admin [-url URL] [-username username]
[-password password] EXISTS_POOL poolName

Argument

Definition

poolName

Name of connection pool.

Example

In the following example, a user with the name adminuser and the password gumby1234 runs the EXISTS_POOL command to determine wether or not a pool with a specific name exists:

java weblogic.Admin -url localhost:7001 -username adminuser
-password gumby1234 EXISTS_POOL myPool

RESET_POOL

This command resets the connections in a registered connection pool.

This is a privileged command. You must supply the password for the WebLogic Server administrative user to use this command. You must know the name of the connection pool, which is an entry in the config.xml file.

Syntax

  java weblogic.Admin URL RESET_POOL poolName system password

Argument

Definition

URL

The URL of the WebLogic Server host and port number of the TCP port at which WebLogic is listening for client requests; use "t3://host:port."

poolName

Name of a connection pool as it is registered in the WebLogic Server's config.xml file.

password

Administrative password for the user "system". You must supply the username "system" and the administrative password to use this Admin command.

Example

This command refreshes the connection pool registered as "eng" for the WebLogic Server listening on port 7001 of the host xyz.com.

  java weblogic.Admin t3://xyz.com:7001 RESET_POOL eng system gumby

Mbean Management Command Reference

Table B-3 presents an overview of the Mbean management commands. The following sections describe command syntax and arguments, and provide an example for each command.

Table B-3 Mbean Management Command Overview 

Task

Command(s)

Description

Create configuration Mbeans

CREATE

Creates an instance of a configuration Mbean. Returns OK to stdout when successful. This command cannot be used for run-time Mbeans.

Delete configuration Mbeans

DELETE

Deletes a configuration Mbean. Returns OK in stdout when successful. This command cannot be used for run-time Mbeans.

View run-time Mbean attributes

GET

Displays run-time Mbean attributes.

Invoke run-time Mbeans

INVOKE

Invokes methods that are not designed to get or set attributes. This command can call only run-time Mbeans.

View run-time metrics and statistics

INVOKE

GET

Run the INVOKE and GET commands to view run-time metrics and statistics. These commands can call only run-time Mbeans.

Set configuration Mbean attributes

SET

Sets the specified attribute values for the named configuration Mbean. Returns OK on stdout when successful. This command cannot be used for run-time Mbeans.

CREATE

Creates an instance of a configuration Mbean. Returns OK to stdout when successful. This command cannot be used for run-time Mbeans. The Mbean instance is saved in the config.xml file or the security realm, depending on where the changes have been made.

Note: When you create Mbeans, configuration objects are also created.

For more information about creating Mbeans, see Developing WebLogic Server Applications.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] CREATE -name name -type mbean_type
[-domain domain_name]

java weblogic.Admin [-url URL] [-username username] 
[-password password] CREATE -mbean mbean_name

Argument

Definition

name

Required. The name you choose for the Mbean that you are creating.

mbean_type

Required. When creating attributes for multiple objects of the same type.

mbean_name

Required. Fully qualified name of an Mbean, in the following format:
"domain:Type=type,Name=name"

Type specifies a type of object grouping and Name specifies the Mbean name.

domain_name

Optional. Name of the domain; for example, mydomain. If domain_name is not specified, the default domain name is used.

Example

java weblogic.Admin -url localhost:7001 -username adminuser 
-password gumby1234 CREATE -mbean
"mydomain:Type=Server,Name=acctServer"

DELETE

Deletes a configuration Mbean. Returns OK in stdout when successful. This command cannot be used for run-time Mbeans.

Note: When you delete Mbeans, configuration objects are also deleted.

For more information about deleting Mbeans, see Developing WebLogic Server Applications.

Syntax

java weblogic.Admin [-url URL] [-username username] [-password 
password] DELETE {-type mbean_type|-mbean mbean_name}

Arguments

Definition

mbean_type

Required. When deleting attributes for multiple objects of the same type.

mbean_name

Required. Fully qualified name of an Mbean, in the following format:
"domain:Type=type,Name=name"

Type specifies a type of object grouping, and Name specifies the Mbean name.

Example

java weblogic.Admin -url localhost:7001 -username adminuser 
-password gumby1234 DELETE -mbean
"mydomain:Type:Server,Name=AcctServer"

GET

Displays run-time Mbean attributes. You can request a list of attributes for multiple objects of the same type by requesting attributes for the following:

The name of each of the specified Mbeans is included in the output. If -pretty is specified, each attribute name-value pair is displayed on a new line.

The GET command can only call run-time Mbeans.

The name-value pair for each attribute is specified within curly brackets. This format facilitates scripting by simplifying the parsing of the output.

The name of the Mbean is included in the output as follows:

{mbeanname mbean_name {property1 value} {property2 value}. . .} {mbeanname mbean_name {property1 value} {property2 value} . . .}
. . .

If -pretty is specified, each attribute name-value pair is displayed on a new line. The name of each of the specified Mbeans is also included in the output, which is displayed as follows:

mbeanname: mbean_name
property1
: value
property2
: value
.
.
.
mbeanname: mbean_name
property1
: value
property2
: value

Syntax

java weblogic.Admin [-url URL] [-username username] [-password 
password] GET {-pretty} {-type mbean_type|-mbean mbean_name}
[-property property1] [-property property2]...

Argument

Definition

mbean_type

Required. When getting attributes for multiple objects of the same type, output includes the name of the Mbean.

mbean_name

Fully qualified name of an Mbean, in the following format:
"domain:Type=type,Location:location,Name=name"

Type specifies a type of object grouping, Location specifies the location of the Mbean, and Name supplies the Mbean name.

pretty

Optional. Produces well-formatted output.

property

Optional. The name of the Mbean attribute or attributes to be listed.

Note: If an attribute is not specified using this argument, all attributes are displayed.

Example

In the following example, a user requests a display of the Mbean attributes for a server named localhost, which is listening on port 7001:

java weblogic.Admin -url localhost:7001 GET -pretty -type Server

INVOKE

Invokes the specified method (including arguments) on the specified Mbean. This command can call only run-time Mbeans. Use this command to invoke methods that do not get or set Mbean attributes.

Syntax

java weblogic.Admin [-url URL] [-username username] [-password 
password] INVOKE {-type mbean_type|-mbean mbean_name} -method
methodname [argument . . .]

Arguments

Definition

mbean_type

Required when invoking attributes for multiple objects of the same type, and must include the fully qualified name of the Mbean, as follows:

"domain:Name:name,Type=type,Application=application"

mbean_name

Required. Fully qualified name of an Mbean, as follows:
"domain:Type=type,Location=location,Name=name"

where:

  • Type specifies the type of object grouping

  • Location specifies the location of the Mbean

  • Name is the Mbean name

    When the argument is a String array, the arguments must be passed in the following format:

    "String1;String2;. . . "

methodname

Required. Name of the method to be invoked. Following the method name, the user can specify arguments to be passed to the method call, as follows:

"domain:Name=name,Type=type"

Example

The following example invokes an administration Mbean named admin_one using the method getAttributeStringValue:

java weblogic.Admin -username system -password gumby1234 INVOKE
-mbean mydomain:Name=admin_one,Type=Administrator
-method getAttributeStringValue PhoneNumber

SET

Sets the specified attribute values for the named configuration Mbean. Returns OK on stdout when successful. This command cannot be used for run-time Mbeans.

New values are saved to the config.xml file or the security realm, depending on where the new values have been defined.

Syntax

java weblogic.Admin [-url URL] [-username username] 
[-password password] SET {-type mbean_type|-mbean mbean_name}
-property property1 property1_value
[-property property2 property2_value] . . .

Argument

Definition

mbean_type

Required when invoking properties for multiple objects of the same type, and must include the fully qualified name of the Mbean, as follows:

"domain:Name:name,Type=type,Application=application"

mbean_name

Required. Must include the fully qualified name of an Mbean, in the following format:

"domain:Name=name,Location:location,Type=type"

where:

  • Name is the Mbean name

  • Location specifies the location of the Mbean

  • Type specifies the type of object grouping

property

Required. The name of the attribute property to be set.

property _value

Required. The value to be set with the attribute property.

  • When the argument is an Mbean array, the arguments must be passed in the following format:

    "domain:Name=name,Type=type;domain:Name=name,Type=type"

  • When the argument is a String array, the arguments must be passed in the following format:

    "String1;String2;. . . "

  • When setting the attribute properties for a JDBC Connection Pool, you must pass the arguments in the following format:

    "user:username;password:password;server:servername"

 

Back to Top