Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## INVOKE

Invokes a management operation for one or more MBeans. For WebLogic Server MBeans, you usually use this command to invoke operations other than the `get` `Attribute` and `set` `Attribute` that most WebLogic Server MBeans provide.

### Syntax

>     java [ SSL Arguments ] weblogic.Admin
>          [ {-url URL} |
>            {-adminurl[protocol://]Admin-Server-listen-address:listen-port}
>          ]
>          [ User Credentials Arguments ]
>        INVOKE {-type mbeanType|-mbean objectName} -method
>        methodname [argument . . .]

Arguments | Definition
--- | ---
{-url [`protocol``://`]`listen-address:listen-port``}` or `{-adminurl` [`protocol``://`]`Admin-Server-listen-address:listen-port``}` | To invoke operations for Administration MBeans, use `-url` to specify the Administration Server's listen address and listen port. To invoke operations for 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 invoke Runtime MBean operations. `-adminurl` to invoke operations for all instances of a Runtime MBean on all server instances in the domain. We recommend that you do not invoke operations for Local Configuration MBeans. Instead, invoke the operation on the corresponding Administration MBean.
`-type` `mbeanType` | Invokes the operation on 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: `"``domain``:Type=``type``,Location=``location``,Name=``name``"` For more information refer to the Javadoc for `WebLogicObjectName`.
`-method` `methodname` | Name of the method to be invoked.
argument | Arguments to be passed to the method call. When the argument is a String array, the arguments must be passed in the following format: `"``String1`;`String2``;. . . "`

### Example

The following example enables a JDBC connection pool by invoking the `enable` method of the `JDBCConnectionPoolRuntime` MBean:

>     java weblogic.Admin -url AdminHost:7001 -username weblogic
>      -password weblogic INVOKE
>      -mbean MedRec:Location=MedRecServer,Name=myPool,
>       ServerRuntime=MedRec,Type=JDBCConnectionPoolRuntime
>      -method enable

If the command succeeds, it returns the following:

>     {MBeanName="MedRec:Location=MedRecServer,Name=MedRecPool,ServerRuntime=Med
>     RecServer,Type=JDBCConnectionPoolRuntime"}

>     Ok

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

The following example enables all JDBC connection pools in the domain by invoking the `enable` method of all the `JDBCConnectionPoolRuntime` MBeans:

>     java weblogic.Admin -adminurl AdminHost:7001 -username weblogic
>      -password weblogic INVOKE
>      -type JDBCConnectionPoolRuntime -method enable