{"id":3442,"date":"2012-06-22T08:41:49","date_gmt":"2012-06-22T13:41:49","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=3442"},"modified":"2012-08-25T21:08:17","modified_gmt":"2012-08-26T02:08:17","slug":"1z1-102-using-administration-console-and-wlst","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=3442","title":{"rendered":"Using Administration Console and WLST"},"content":{"rendered":"<p><< <a href=\"?p=3434\">Previous<\/a><\/p>\n<span id=\"Use_the_Administration_Console_to:\"><h2>Use the Administration Console to:<\/h2><\/span>\n<p>* Configure, start, and stop WebLogic Server instances<br \/>\n* Configure WebLogic Server clusters<br \/>\n* Configure WebLogic Server services, such as database connectivity (JDBC) and messaging (JMS)<br \/>\n* Configure security parameters, including managing users, groups, and roles<br \/>\n* Configure and deploy your applications<br \/>\n* Monitor server and application performance<br \/>\n* View server and domain log files<br \/>\n* View application deployment descriptors<br \/>\n* Edit selected run-time application deployment descriptor elements<\/p>\n<span id=\"Access_the_WebLogic_Server_administration_console\"><h2>Access the WebLogic Server administration console<\/h2><\/span>\n<p>* http:\/\/hostname:port\/console, e.g <a href=\"http:\/\/localhost:7001\/console\">http:\/\/localhost:7001\/console<\/a><br \/>\n* https:\/\/hostname:port\/console, e.g <a href=\"https:\/\/localhost:7002\/console\">https:\/\/localhost:7002\/console<\/a><\/p>\n<span id=\"Describe_the_parts_of_the_administration_console\"><h2>Describe the parts of the administration console<\/h2><\/span>\n<p>* Change Center<br \/>\n* Domain Structure: contains a tree structure you can use to navigate to pages in the Administration Console.<br \/>\n* How do I&#8230;: links to online help tasks that are relevant to the current Console page.<br \/>\n* Tool Bar:<br \/>\n&#8211; Welcome message: Indicates user name with which you have logged into the Console.<br \/>\n&#8211; Connected to:     The IP address and port you used to connect to the Console.<br \/>\n&#8211; Home: A link to the top page of the Console.<br \/>\n&#8211; Log Out: Click to log out of the Console.<br \/>\n&#8211; Preferences: A link to a page where you can change some Console behavior.<br \/>\n&#8211; Record: Starts recording your configuration actions as a series of WebLogic Scripting Tool (WLST) commands. Writes the commands to a separate file that you can replay in WLST.<br \/>\n&#8211; Help: A link to the Administration Console Online Help.<br \/>\n&#8211; Search: A text field in which you can enter a string to find any WebLogic Server Configuration MBeans that contain the string you specified in their name.<br \/>\n* Breadcrumb Navigation: A series of links that show the path you have taken through the Administration Console&#8217;s pages. You can click on any of the links to return to a previously-visited page.<br \/>\n* System Status: The System Status panel reports on the number of information, error, and warning messages that have been logged. You can view these messages in the server log files, which you can access from the Administration Console at Diagnostics > Log Files.<\/p>\n<span id=\"Describe_the_parts_of_the_help_system\"><h2>Describe the parts of the help system<\/h2><\/span>\n<p>* Two parts:<br \/>\n&#8211; How do I&#8230;: documents procedures for tasks you can perform through using the Console.<br \/>\n&#8211; Administration Console Reference: provides reference information for each page in the Console, including descriptions of the attributes you can set using the Console.<\/p>\n<span id=\"Access_admin_console_preferences\"><h2>Access admin console preferences<\/h2><\/span>\n<p>* Tool Bar > Preferences<\/p>\n<span id=\"Make_a_change_to_the_configuration_lock_038_edit_make_change_view_changes_and_restarts_optional_activate_changes\"><h2>Make a change to the configuration (lock &#038; edit, make change, view changes and restarts (optional), activate changes)<\/h2><\/span>\n<p>* Locate the Change Center in the upper left of the Administration Console screen.<br \/>\n* Click the <strong>Lock &#038; Edit<\/strong> button to lock the configuration edit hierarchy for the domain.<br \/>\n* Make the changes you desire on the relevant page of the Console. Click <strong>Save <\/strong>on each page where you make a change.<br \/>\n* Changes are saved in <em>DOMAIN_HOME\/pending\/config.xml<\/em> file<br \/>\n* When you have finished making all the desired changes,<br \/>\n&#8211; click <strong>Activate Changes<\/strong> in the Change Center for changes to take effect.<br \/>\n&#8211; click <strong>Undo All Changes<\/strong> to revert any pending changes.<\/p>\n<span id=\"Dynamic_and_Non-Dynamic_Changes\"><h3>Dynamic and Non-Dynamic Changes<\/h3><\/span>\n<p>* Non-dynamic changes require that the affected servers or system resources be restarted before they become effective.<br \/>\n* Non-dynamic properties are marked with an exclamation mark:<\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_admconsole_nondynamicsymbol.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_admconsole_nondynamicsymbol.jpg\" alt=\"\" title=\"wlsadm11g_admconsole_nondynamicsymbol\" width=\"224\" height=\"168\" class=\"aligncenter size-full wp-image-5440\" \/><\/a><\/h6><\/span>\n<p>* Dynamic changes do <strong>not<\/strong> require server restart<br \/>\n* All changes are applied as a unit. So a single non-dynamic change requires restart in order for other dynamic changes to take effect.<\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_arch.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_arch-300x185.jpg\" alt=\"\" title=\"wlsadm11g_configMngmt_arch\" width=\"300\" height=\"185\" class=\"aligncenter size-medium wp-image-5131\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_arch-300x185.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_arch.jpg 715w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Viewing_Changes\"><h3>Viewing Changes<\/h3><\/span>\n<p>You can view any changes that you have saved, but not yet activated, by clicking the View Changes and Restarts link in the Change Center. The View Changes and Restarts link presents two tabs, Change List and Restart Checklist:<br \/>\n* The Change List page presents all changes that have been saved, but not yet activated.<br \/>\n* The Restart Checklist lists all servers for which non-dynamic changes have been activated, but which require restarts before the changes become effective.<\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_admconsole_restartlist.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_admconsole_restartlist-300x202.jpg\" alt=\"\" title=\"wlsadm11g_admconsole_restartlist\" width=\"300\" height=\"202\" class=\"aligncenter size-medium wp-image-5441\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_admconsole_restartlist-300x202.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_admconsole_restartlist.jpg 494w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Run_a_WSLT_script\"><h2>Run a WSLT script<\/h2><\/span>\n<span id=\"Jython\"><h3>Jython<\/h3><\/span>\n<p>* Java implementation of Python scripting language<br \/>\n* Can use both Java and Python standard libraries.<br \/>\n* Jython codes can be compiled to Java byte code (.class) and distributed in .jar files.<br \/>\n* Jython can be used<br \/>\n&#8211; interactively<br \/>\n&#8211; in batch<br \/>\n&#8211; embedded within Java class<\/p>\n<span id=\"WLST\"><h3>WLST<\/h3><\/span>\n<p>* Used for:<br \/>\n&#8211; automating common admin activities<br \/>\n&#8211; an alternative to admin console<br \/>\n&#8211; when graphical tools are not supported<br \/>\n* Usage example:<br \/>\n&#8211; creating new WLS domains<br \/>\n&#8211; retrieving and updating WLS domain configurations<br \/>\n&#8211; deploying applications<br \/>\n&#8211; get run time server stats<\/p>\n<span id=\"WLST_Modes\"><h3>WLST Modes<\/h3><\/span>\n<p>* Online mode<br \/>\n&#8211; connected to a running server<br \/>\n&#8211; access to all WLS config and run time attributes<br \/>\n&#8211; create and activate change sessions similar to WLS console<br \/>\n* Offline mode<br \/>\n&#8211; domain not running<br \/>\n&#8211; access only to persisted domain config data, i.e. config.xml<br \/>\n&#8211; create or update domains similar to using Configuration Wizard<\/p>\n<span id=\"Interactive_Mode\"><h3>Interactive Mode<\/h3><\/span>\n<p>* Invoke WLST method 1:<\/p>\n<pre lang=\"bash\">\r\ncd $WL_HOME\/common\/bin\r\n.\/wlst.sh\r\n<\/pre>\n<p>* Invoke WLST method 2:<\/p>\n<pre lang=\"bash\">\r\ncd $WL_HOME\/server\/bin\r\n. .\/setWLSEnv.sh\r\njava weblogic.WLST\r\n\r\n# Use SSL connection\r\njava -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust weblogic.WLST\r\n<\/pre>\n<p>* Example<\/p>\n<pre lang=\"bash\">\r\nwls:\/offline> connect('weblogic','welcome1','t3:\/\/wlbox:7001')\r\nConnecting to t3:\/\/wlbox:7001 with userid weblogic ...\r\nSuccessfully connected to Admin Server 'examplesServer' that belongs to domain 'wl_server'.\r\n\r\nWarning: An insecure protocol was used to connect to the \r\nserver. To ensure on-the-wire security, the SSL port or \r\nAdmin port should be used instead.\r\n\r\nwls:\/wl_server\/serverConfig> cd('Servers')\r\nwls:\/wl_server\/serverConfig\/Servers> ls()\r\ndr--   examplesServer\r\n\r\nwls:\/wl_server\/serverConfig\/Servers> cd('examplesServer')\r\nwls:\/wl_server\/serverConfig\/Servers\/examplesServer> get('StartupMode')\r\n'RUNNING'\r\nwls:\/wl_server\/serverConfig\/Servers\/examplesServer> exit()\r\n\r\nExiting WebLogic Scripting Tool.\r\n<\/pre>\n<span id=\"Run_Script\"><h3>Run Script<\/h3><\/span>\n<pre lang=\"bash\">\r\ncd $WL_HOME\/server\/bin\r\n. .\/setWLSEnv.sh\r\n\r\njava weblogic.WLST -i my_wlst_script.py # -i prevent WLST from exiting\r\n\r\n# or\r\ncd $WL_HOME\/common\/bin\r\n.\/wlst.sh\r\n\r\nwls:\/(offline)>execFile('my_wlst_script.py')\r\n<\/pre>\n<span id=\"Describe_common_WLST_commands\"><h2>Describe common WLST commands<\/h2><\/span>\n<span id=\"General_WLST_Commands\"><h3>General WLST Commands<\/h3><\/span>\n<p>* See <a href=\"?p=3456\">WLST information commands<\/a><\/p>\n<pre lang=\"jython\">\r\nhelp()\r\nhelp('connect')\r\nexit()\r\ndumpVariables()\r\ndumpStack()\r\nredirect('.\/logs\/wlst.log')\r\nstopRedirect()\r\n<\/pre>\n<span id=\"Offline_WLST_Commands\"><h3>Offline WLST Commands<\/h3><\/span>\n<pre lang=\"jython\">\r\ncreateDomain\r\nreadDomain\r\nupdateDomain\r\nwriteDomain\r\n\r\nreadTemplate\r\naddTemplate\r\nwriteTemplate\r\n\r\nassign\/unassign\r\nsetOption\r\n\r\nconfigToScript\r\n<\/pre>\n<span id=\"Online_WLST_Commands\"><h3>Online WLST Commands<\/h3><\/span>\n<pre lang=\"jython\">\r\nconnect\r\ndisconnect\r\n\r\nstart\r\nshutdown\r\n\r\nstartEdit\r\nstopEdit\r\nactivate\r\nshowChanges\r\nisRestartRequired\r\n\r\ndeploy\r\nredeploy\r\nundeploy\r\n<\/pre>\n<span id=\"WebLogic_JMX_MBeans\"><h3>WebLogic JMX MBeans<\/h3><\/span>\n<p>* Hierarchical Java objects found on the server<br \/>\n* Have attributes and operations<br \/>\n* Supports configuration, management, and monitoring of all types of server resources<br \/>\n* Like Unix file system, use <em>cd, ls, pwd<\/em> to navigate the server config or run time MBeans<br \/>\n* Use <em>get\/set<\/em> to read\/update MBean attributes<br \/>\n* <em>cmo<\/em> variable refers to current MBean (cmo: current mbean object)<br \/>\n* See <a href=\"?p=3468\">here<\/a> for more variables<\/p>\n<span id=\"_3\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_mbeans.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_mbeans-300x116.jpg\" alt=\"\" title=\"wlsadm11g_configMngmt_mbeans\" width=\"300\" height=\"116\" class=\"aligncenter size-medium wp-image-5153\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_mbeans-300x116.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_mbeans.jpg 636w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Record\"><h3>Record<\/h3><\/span>\n<span id=\"_4\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_wlst_record.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_wlst_record-300x73.jpg\" alt=\"\" title=\"wlsadm11g_configMngmt_wlst_record\" width=\"300\" height=\"73\" class=\"aligncenter size-medium wp-image-5154\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_wlst_record-300x73.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/wlsadm11g_configMngmt_wlst_record.jpg 941w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Example: create data source named <strong>test<\/strong><\/p>\n<pre lang=\"python\">\r\ncd('\/')\r\ncmo.createJDBCSystemResource('test')\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test')\r\ncmo.setName('test')\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test\/JDBCDataSourceParams\/test')\r\nset('JNDINames',jarray.array([String('test')], String))\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test\/JDBCDriverParams\/test')\r\ncmo.setUrl('jdbc:oracle:thin:@wlbox:1521:xe')\r\ncmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')\r\nsetEncrypted('Password', 'Password_1342368349274', '\/labs\/wls1035\/wlserver_10.3\/samples\/domains\/wl_server\/Script1342368096529Config', '\/labs\/wls1035\/wlserver_10.3\/samples\/domains\/wl_server\/Script1342368096529Secret')\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test\/JDBCConnectionPoolParams\/test')\r\ncmo.setTestTableName('SQL SELECT 1 FROM DUAL\\r\\n\\r\\n')\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test\/JDBCDriverParams\/test\/Properties\/test')\r\ncmo.createProperty('user')\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test\/JDBCDriverParams\/test\/Properties\/test\/Properties\/user')\r\ncmo.setValue('dbuser')\r\n\r\ncd('\/JDBCSystemResources\/test\/JDBCResource\/test\/JDBCDataSourceParams\/test')\r\ncmo.setGlobalTransactionsProtocol('TwoPhaseCommit')\r\n\r\ncd('\/SystemResources\/test')\r\nset('Targets',jarray.array([ObjectName('com.bea:Name=examplesServer,Type=Server')], ObjectName))\r\n\r\nactivate()\r\n\r\n<\/pre>\n<p>>> <a href=\"?p=5159\">Next<\/a><\/p>\n<p>[mv_include id=&#8217;3268&#8242;]<\/p>\n<p>* <a href=\"http:\/\/download.oracle.com\/docs\/cd\/E17904_01\/web.1111\/e13752\/toc.htm#insertedID3\">Overview of the Administration Console<\/a><br \/>\n* <a href=\"http:\/\/middlewaremagic.com\/weblogic\/?page_id=1492\">Middleware Magic WLST post<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Log Files. Describe the parts of the help system * Two parts: &#8211; How do I&#8230;: documents procedures for tasks you can perform through using the Console. &#8211; Administration Console Reference: provides reference information for each page in the Console, &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=3442\">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":[107,104],"tags":[168,178,167,164],"class_list":["post-3442","post","type-post","status-publish","format-standard","hentry","category-certification","category-weblogic11g","tag-admin","tag-console","tag-wls","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\/3442","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=3442"}],"version-history":[{"count":18,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3442\/revisions"}],"predecessor-version":[{"id":5130,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3442\/revisions\/5130"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}