WLST: WLST Variable Reference

cmgr

* The cmgr variable is set to the ConfigurationManagerMBean.
– You can use this variable to get the current value of any ConfigurationManagerMBean attribute.
* Example:

wls:/basicWLSDomain/serverRuntime> cmgr.getCurrentEditor()
'weblogic'

cmo

* Current Management Object. The cmo variable is set to the bean instance to which you navigate using WLST. You can use this variable to perform any get, set, or invoke method on the current bean instance.

– WLST sets the variable to the current WLST path. For example, when you change to the serverConfig hierarchy, cmo is set to DomainMBean. When you change to the serverRuntime hierarchy, cmo is set to ServerRuntimeMBean.

– The variable is available in all WLST hierarchies except custom and jndi.
* Example:

wls:/basicWLSDomain/serverRuntime> cmo.getAdministrationPort()
9002
wls:/basicWLSDomain/serverRuntime>

connected

* Boolean value specifying whether WLST is connected to a running server.
– WLST sets this variable to true when connected to a running server; otherwise, WLST sets it to false.
* Example:

wls:/basicWLSDomain/serverRuntime> print connected
true

domainName

* Name of the WebLogic domain to which WLST is connected.
* Example:

wls:/basicWLSDomain/serverRuntime> print domainName
basicWLSDomain

domainRuntimeService

* DomainRuntimeServiceMBean MBean.
– This variable is available only when WLST is connected to the Administration Server.
* Example:

wls:/basicWLSDomain/serverConfig> domainRuntimeService.getServerName()
'AdminServer'

editService

* EditServiceMBean MBean.
– This variable is available only when WLST is connected to the Administration Server.
* Example:

wls:/basicWLSDomain/serverConfig> dc = editService.getDomainConfiguration()

exitonerror

* Boolean value specifying whether WLST terminates script execution when it encounters an exception.
– This variable defaults to true, indicating that script execution is terminated when WLST encounters an error.
– This variable is not applicable when running WLST in interactive mode.
* Example:

wls:/basicWLSDomain/serverConfig> print exitonerror
true

home

* Represents the local MBeanHome.
* Example:

wls:/basicWLSDomain/serverConfig> print home
weblogic.rmi.internal.BasicRemoteRef - hostID: '-8186553942997234848S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:basicWLSDomain:AdminServer', oid: '260', channel: 'null'

isAdminServer

* Boolean value specifying whether WLST is connected to a WebLogic Administration Server instance.
– WLST sets this variable to true if WLST is connected to a WebLogic Administration Server; otherwise, WLST sets it to false.
* Example:

wls:/basicWLSDomain/serverConfig> print isAdminServer
true
wls:/basicWLSDomain/serverConfig>

mbs

* MBeanServerConnection object that corresponds to the current location in the hierarchy.
* Example:

wls:/basicWLSDomain/serverConfig> mbs.isRegistered(ObjectName('mydomain:Name=mydomain,Type=Domain'))
0

recording

* Boolean value specifying whether WLST is recording commands.
– WLST sets this variable to true when the startRecording command is entered; otherwise, WLST sets this variable to false.
* Example:

wls:/basicWLSDomain/serverConfig> print recording
false

runtimeService

* RuntimeServiceMBean MBean.
* Example:

wls:/basicWLSDomain/serverConfig> sr=runtimeService.getServerRuntime()

serverName

* Name of the server to which WLST is connected.
* Example:

wls:/basicWLSDomain/serverConfig> print serverName
AdminServer

typeService

* TypeServiceMBean MBean.
* Example:

wls:/basicWLSDomain/serverConfig> mi=typeService.getMBeanInfo('weblogic.manageme
nt.configuration.ServerMBean')
wls:/basicWLSDomain/serverConfig>

username

* Name of user currently connected to WLST.
* Example:

wls:/basicWLSDomain/serverConfig> print username
weblogic
wls:/basicWLSDomain/serverConfig>

version

* Current version of the running server to which WLST is connected.
* Example:

wls:/basicWLSDomain/serverConfig> print version
WebLogic Server 10.3.4.0  Fri Dec 17 20:47:33 PST 2010 1384255
wls:/basicWLSDomain/serverConfig>

References

* WLST Variable Reference

This entry was posted in weblogic11g and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.