Wlst - Current Management Object (Cmo) variable

Card Puncher Data Processing

Wlst - Current Management Object (Cmo) variable

About

WLST online provides a variable, cmo, that represents the current management object.

You can use this variable to perform any get, set, or invoke method on the management object. For example, the cmo variable enables the following command:

domainConfig()
cmo.getAdministrationPort()
cmo.setAdministrationPort(9092)

The cmo variable is initialized to the root of all domain configuration beans when you first connect WLST to a server instance. It reflects the parent configuration bean type until you navigate to an instance. For more information about the cmo variable, see Changing the Current Management Object.

When browsing the custom MBeans, the cmo variable is not available. custom MBeans cannot use the cmo variable because a stub is not available

Scope

The variable is available only ONLINE in all WLST hierarchies except custom and jndi.

Initialization

  • Offline, the cmo value is null
wls:/offline> dumpVariables()
cmo: null
exitonerror: true
recording: false
  • Online: WLST sets the value of cmo to the current WLST path.
wls:/offline> connect('biadmin', 'welcome1', 't3://exalytics-01:7001')
wls:/bifoundation_domain/serverConfig> cmo
[MBeanServerInvocationHandler]com.bea:Name=bifoundation_domain,Type=Domain
  • Each time you change directories, WLST resets the value of cmo to the current WLST path.
wls:/bifoundation_domain/serverConfig> cd('Servers')
wls:/bifoundation_domain/serverConfig/Servers> cmo
[MBeanServerInvocationHandler]com.bea:Name=bifoundation_domain,Type=Domain

For example, when you change to the serverRuntime hierarchy, cmo is set to ServerRuntime. When you change to the serverConfig hierarchy, cmo is set to DomainMBean. If you change to the Servers directory under DomainMBean, cmo is set to an instance of ServerMBean.







Share this page:
Follow us:
Task Runner