Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## SET

Sets the specified property (attribute) values for a configuration MBean. This command cannot be used for Runtime MBeans.

If the command is successful, it returns `OK`.

When you use this command for an Administration MBean, the new values are saved to the `config.xml` file.

We recommend that you do not use this command to set values on a Local Configuration MBean. If you use this command for a Local Configuration MBean, the new values are not saved to the `config.xml` file. Depending on the attribute that you set, the subsystem that uses the MBean might not be able to modify its operation per the new value. In addition, some subsystems require that their Local Configuration MBeans be replicated throughout a domain. If you modify the value for a Local Configuration MBean on one server, the new value will not be replicated throughout the domain and the subsystem might not operate correctly.

### Syntax

>     java [ SSL Arguments ] weblogic.Admin
>          [-url URL]
>          [ User Credentials Arguments ]
>        SET {-type mbeanType|-mbean objectName}
>        -property property1 property1_value
>        [-property property2 property2_value] . . .

Argument | Definition
--- | ---
-url [`protocol``://`]`listen-address:listen-port` | Specifies the listen address and listen port of the Administration Server. Only the Administration Server can access Administration MBeans. 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` entry in Table 1-3 on page 11 and Protocol Support. Although the `SET` command supports the `-adminurl`, we recommend that you do not use it to set values of Local Configuration MBeans.
`-type` `mbeanType` | Sets the properties for all MBeans of a specific type. For more information, refer to Specifying MBean Types.
`-mbean` `objectName` | Fully qualified object name of an MBean in the `WebLogicObjectName` format. For example: `"``domain``:Type=``type``,Name=``name``"` For more information, refer to the Javadoc for `WebLogicObjectName`.
`-property` `property` | The name of the property to be set.
`property _value` | The value to be set. Some properties require you to specify the name of a WebLogic Server MBean. In this case, specify the fully qualified object name of an MBean in the `WebLogicObjectName` format. For example: `"``domain``:Type=``type``,Name=``name``"` For more information, refer to the Javadoc for `WebLogicObjectName`. When the property value is an MBean array, separate each MBean object name by a semicolon and surround the entire property value list with quotes: `"``domain``:Name=``name``,Type=``type``;``domain``:Name=``name``,Type=``type``"` When the property value is a String array, separate each string by a semicolon and surround the entire property value list with quotes: `"``String1``;``String2``;. . . "` When the property value is a String or String array, you can set the value to null by using either of the following: `-property` `property-name` `""` `-property` `property-name` For example, both `-property ListenAddress ""` and `-property ListenAddress` set the listen address to null. If the property value contains spaces, surround the value with quotes: `"-Da=1 -Db=3"` For example: `SET -type ServerStart -property Arguments "-Da=1 -Db=3"` When setting the properties for a JDBC Connection Pool, you must pass the arguments in the following format: `"user:``username``;password:``password``;server:``servername``"`

### Example

The following example sets to `64` the StdoutSeverityLevel property of the local configuration instance of the `ServerMBean` for a server named `MedRecManagedServer`:

>     java weblogic.Admin -url http://ManagedHost:8001
>       -username weblogic -password weblogic
>       SET -mbean
>       MedRec:Location=MedRecManagedServer,Name=MedRecManagedServer,
>       Type=ServerConfig
>      -property StdoutSeverityLevel 64

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

If the command succeeds, the server instance writes a log message similar to the following:

`<Sep 16, 2002 12:11:27 PM EDT> <Info> <Logging> <000000> <Log messages of every severity will be displayed in the shell console.>`

The command prints `Ok` to standard out.

The following example sets to `64` the StdoutSeverityLevel property for all administration instances of `ServerMBean` in the current domain:

>     java weblogic.Admin -url http://AdminHost:7001
>       -username weblogic -password weblogic
>       SET -type Server -property StdoutSeverityLevel 64

# Running Commands in Batch Mode

By default, each `weblogic.Admin` command that you invoke starts a JVM, acts on a server instance, and then shuts down the JVM. To improve performance for issuing several `weblogic.Admin` commands in an uninterrupted sequence, you can use the `BATCHUPDATE` command to run multiple commands in batch mode. The `BATCHUPDATE` command starts a JVM, runs a list of commands, and then shuts down the JVM.

For example, if a domain contains multiple server instances, you can create a file that returns the listen ports of all Managed Servers in a domain. Then you specify this file as an argument in `weblogic.Admin` `BATCHUPDATE` command.