Skip navigation.

WebLogic Server Command Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

 


BATCHUPDATE

Runs a sequence of weblogic.Admin commands. All output from commands that BATCHUPDATE runs is printed to standard out.

Using this command provides better performance than issuing a series of individual weblogic.Admin commands. For more information, refer to the previous section, Running Commands in Batch Mode.

Syntax

java [ SSL Arguments ] weblogic.Admin 
[ {-url URL} |
{-adminurl
[protocol://]Admin-Server-listen-address:listen-port}
]
[ User Credentials Arguments ]
BATCHUPDATE -batchFile fileLocation
[-continueOnError] [-batchCmdVerbose]

Argument

Definition

{-url [protocol://]listen-address:listen-port}

or

{-adminurl [protocol://]Admin-Server-listen-address:listen-port}

If the batch file contains commands that access Administration MBeans, use -url to specify the Administration Server's listen address and listen port.

If the batch file contains commands that access Local Configuration or Runtime MBeans, use one of the following:

  • -url to specify the listen address and listen port of the server instance on which you want to access MBeans.

  • -adminurl to access all Local Configuration or Runtime MBeans in the domain.

If you specify a secure listen port, you must also specify a secure protocol.

If you do not specify a value, the command assumes t3://localhost:7001.

For more information, refer to the -url and -adminurl entries in Table 1-3 on page 11 and Protocol Support.

-batchfile fileLocation

The name of a text file that contains a list of weblogic.Admin commands. If you use a relative pathname, the root context is the directory from which you issue the weblogic.Admin BATCHUPDATE command.

The file must contain one or more commands, formatted as follows:

COMMAND-NAME arguments

Place each command on a separate line.

Within the batch file, the BATCHUPDATE command ignores any line that begins with a # character.

Note: Quoted MBean names are allowed in the batch file.

-continueOnError

If one of the commands fails or emits errors, weblogic.Admin ignores the error and continues to the next command.

By default, weblogic.Admin stops processing commands as soon as it encounters an error.

-batchCmdVerbose

Causes BATCHUPDATE to indicate which command it is currently invoking. As it invokes a command, BATCHUPDATE prints the following to standard out:

Executing command: command-from-batchfile


 

Example

This example uses the BATCHUPDATE command to return the listen ports for a collection of server instances in a domain. A file named commands.txt contains the following lines:

get -mbean MedRec:Name=MedRecServer,Type=Server -property ListenPort
get -mbean MedRec:Name=MedRecManagedServer,Type=Server -property ListenPort

The following command invokes the commands in commands.txt:

java weblogic.Admin -url AdminHost:7001 -username weblogic -password weblogic BATCHUPDATE -batchFile c:\commands.txt -continueOnError -batchCmdVerbose

If the command succeeds it outputs the following to standard out:

Executing command: get -mbean MedRec:Name=MedRecServer,Type=Server -property ListenPort
{MBeanName="MedRec:Name=MedRecServer,Type=Server"{ListenPort=7001}}
Executing command: get -mbean MedRec:Name=MedRecManagedServer,Type=Server -property ListenPort
{MBeanName="MedRec:Name=MedRecManagedServer,Type=Server"{ListenPort=7021}}

For information about the environment in which this example runs, refer to Example Environment.

 


Commands for Working with Clusters

Table 1-8 is an overview of the commands for working with clusters. Subsequent sections describe command syntax and arguments, and provide an example for each command.

Table 1-8 MBean Management Command Overview 

Command

Description

CLUSTERSTATE

Returns the number and state of servers in a cluster.

See CLUSTERSTATE.

MIGRATE

Migrates a JMS service or a JTA service from one server instance to another within a cluster.

See MIGRATE.

STARTCLUSTER

Starts all servers in a cluster

See STARTCLUSTER.

STOPCLUSTER

Forces all servers in a cluster to shut down.

See STOPCLUSTER.

VALIDATECLUSTERCONFIG

Parses the domain's configuration file and reports any discrepancies in all cluster-related elements.

See VALIDATECLUSTERCONFIG.


 

 

Skip navigation bar  Back to Top Previous Next