{"id":3468,"date":"2012-07-14T21:06:23","date_gmt":"2012-07-15T02:06:23","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=3468"},"modified":"2012-07-24T15:11:46","modified_gmt":"2012-07-24T20:11:46","slug":"wlst-wlst-variable-reference","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=3468","title":{"rendered":"WLST: WLST Variable Reference"},"content":{"rendered":"<span id=\"cmgr\"><h3>cmgr<\/h3><\/span>\n<p>* The cmgr variable is set to the ConfigurationManagerMBean.<br \/>\n&#8211; You can use this variable to get the current value of any ConfigurationManagerMBean attribute.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverRuntime> cmgr.getCurrentEditor()\r\n'weblogic'\r\n<\/pre>\n<span id=\"cmo\"><h3>cmo<\/h3><\/span>\n<p>* 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.<\/p>\n<p>&#8211; 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.<\/p>\n<p>&#8211; The variable is available in all WLST hierarchies except custom and jndi.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverRuntime> cmo.getAdministrationPort()\r\n9002\r\nwls:\/basicWLSDomain\/serverRuntime>\r\n<\/pre>\n<span id=\"connected\"><h3>connected<\/h3><\/span>\n<p>* Boolean value specifying whether WLST is connected to a running server.<br \/>\n&#8211; WLST sets this variable to true when connected to a running server; otherwise, WLST sets it to false.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverRuntime> print connected\r\ntrue\r\n<\/pre>\n<span id=\"domainName\"><h3>domainName<\/h3><\/span>\n<p>* Name of the WebLogic domain to which WLST is connected.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverRuntime> print domainName\r\nbasicWLSDomain\r\n<\/pre>\n<span id=\"domainRuntimeService\"><h3>domainRuntimeService<\/h3><\/span>\n<p>* DomainRuntimeServiceMBean MBean.<br \/>\n&#8211; This variable is available only when WLST is connected to the Administration Server.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> domainRuntimeService.getServerName()\r\n'AdminServer'\r\n<\/pre>\n<span id=\"editService\"><h3>editService<\/h3><\/span>\n<p>* EditServiceMBean MBean.<br \/>\n&#8211; This variable is available only when WLST is connected to the Administration Server.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> dc = editService.getDomainConfiguration()\r\n<\/pre>\n<span id=\"exitonerror\"><h3>exitonerror<\/h3><\/span>\n<p>* Boolean value specifying whether WLST terminates script execution when it encounters an exception.<br \/>\n&#8211; This variable defaults to true, indicating that script execution is terminated when WLST encounters an error.<br \/>\n&#8211; This variable is not applicable when running WLST in interactive mode.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> print exitonerror\r\ntrue\r\n<\/pre>\n<span id=\"home\"><h3>home<\/h3><\/span>\n<p>* Represents the local MBeanHome.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> print home\r\nweblogic.rmi.internal.BasicRemoteRef - hostID: '-8186553942997234848S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:basicWLSDomain:AdminServer', oid: '260', channel: 'null'\r\n<\/pre>\n<span id=\"isAdminServer\"><h3>isAdminServer<\/h3><\/span>\n<p>* Boolean value specifying whether WLST is connected to a WebLogic Administration Server instance.<br \/>\n&#8211; WLST sets this variable to true if WLST is connected to a WebLogic Administration Server; otherwise, WLST sets it to false.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">wls:\/basicWLSDomain\/serverConfig> print isAdminServer\r\ntrue\r\nwls:\/basicWLSDomain\/serverConfig>\r\n<\/pre>\n<span id=\"mbs\"><h3>mbs<\/h3><\/span>\n<p>* MBeanServerConnection object that corresponds to the current location in the hierarchy.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> mbs.isRegistered(ObjectName('mydomain:Name=mydomain,Type=Domain'))\r\n0\r\n<\/pre>\n<span id=\"recording\"><h3>recording<\/h3><\/span>\n<p>* Boolean value specifying whether WLST is recording commands.<br \/>\n&#8211; WLST sets this variable to true when the startRecording command is entered; otherwise, WLST sets this variable to false.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> print recording\r\nfalse\r\n<\/pre>\n<span id=\"runtimeService\"><h3>runtimeService<\/h3><\/span>\n<p>* RuntimeServiceMBean MBean.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> sr=runtimeService.getServerRuntime()\r\n<\/pre>\n<span id=\"serverName\"><h3>serverName<\/h3><\/span>\n<p>* Name of the server to which WLST is connected.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> print serverName\r\nAdminServer\r\n<\/pre>\n<span id=\"typeService\"><h3>typeService<\/h3><\/span>\n<p>* TypeServiceMBean MBean.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> mi=typeService.getMBeanInfo('weblogic.manageme\r\nnt.configuration.ServerMBean')\r\nwls:\/basicWLSDomain\/serverConfig>\r\n<\/pre>\n<span id=\"username\"><h3>username<\/h3><\/span>\n<p>* Name of user currently connected to WLST.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> print username\r\nweblogic\r\nwls:\/basicWLSDomain\/serverConfig>\r\n<\/pre>\n<span id=\"version\"><h3>version<\/h3><\/span>\n<p>* Current version of the running server to which WLST is connected.<br \/>\n* Example:<\/p>\n<pre lang=\"bash\">\r\nwls:\/basicWLSDomain\/serverConfig> print version\r\nWebLogic Server 10.3.4.0  Fri Dec 17 20:47:33 PST 2010 1384255\r\nwls:\/basicWLSDomain\/serverConfig>\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"http:\/\/download.oracle.com\/docs\/cd\/E17904_01\/web.1111\/e13813\/reference.htm#insertedID12\">WLST Variable Reference<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>cmgr * The cmgr variable is set to the ConfigurationManagerMBean. &#8211; You can use this variable to get the current value of any ConfigurationManagerMBean attribute. * Example: wls:\/basicWLSDomain\/serverRuntime> cmgr.getCurrentEditor() &#8216;weblogic&#8217; cmo * Current Management Object. The cmo variable is set &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=3468\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[104],"tags":[588,590,164],"class_list":["post-3468","post","type-post","status-publish","format-standard","hentry","category-weblogic11g","tag-11g","tag-weblogic","tag-wlst"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-TW","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3468"}],"version-history":[{"count":3,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3468\/revisions"}],"predecessor-version":[{"id":5469,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3468\/revisions\/5469"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}