{"id":4658,"date":"2015-04-26T20:23:35","date_gmt":"2015-04-26T12:23:35","guid":{"rendered":"http:\/\/rmohan.com\/?p=4658"},"modified":"2015-04-26T20:23:35","modified_gmt":"2015-04-26T12:23:35","slug":"configuring-the-defaultfilestore-for-tlogs-through-wlst-script","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4658","title":{"rendered":"Configuring the DefaultFileStore for TLOGS through WLST script"},"content":{"rendered":"<p>The below script will help us to set the shared location to the tlogs for the weblogic servers in a domain.<\/p>\n<p>import sys<\/p>\n<p>print &#8220;@@@ Starting the script &#8230;&#8221;<\/p>\n<p>from java.util import *<br \/>\nfrom javax.management import *<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nfrom java.io import FileInputStream<\/p>\n<p>print &#8220;@@@ Starting the script &#8230;&#8221;<br \/>\nglobal props<br \/>\n<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n#The directory of the domain configuration<br \/>\n#\/app\/oracle\/products\/11g\/admin\/domains<br \/>\nwlsDomain=os.environ[&#8220;WLSDOMAIN&#8221;]<br \/>\nprint &#8220;WLSDOMAIN=&#8221;+wlsDomain<\/p>\n<p>adminURL=&#8217;t3:\/\/&#8217;+domainProps.get(&#8216;domain1.AdminIP&#8217;)+&#8217;:&#8217;+domainProps.get(&#8216;domain1.AdminPort&#8217;)<br \/>\nadminUserName=&#8217;weblogic&#8217;<br \/>\nadminPassword=domainProps.get(&#8220;domain1.AdminPasswd&#8221;)<br \/>\nconnect(adminUserName, adminPassword, adminURL)<\/p>\n<p>edit()<br \/>\nstartEdit()<\/p>\n<p>adminserverDir = File(wlsDomain+&#8217;\/SOACoreDomain\/soa_cluster\/tlogs&#8217;)<br \/>\nbool = adminserverDir.mkdirs()<\/p>\n<p>cd(&#8216;\/Servers\/SOA1\/DefaultFileStore\/SOA1&#8242;)<br \/>\ncmo.setDirectory(wlsDomain+&#8217;\/SOACoreDomain\/soa_cluster\/tlogs&#8217;)<\/p>\n<p>cd(&#8216;\/Servers\/SOA2\/DefaultFileStore\/SOA2&#8242;)<br \/>\ncmo.setDirectory(wlsDomain+&#8217;\/SOACoreDomain\/soa_cluster\/tlogs&#8217;)<\/p>\n<p>cd(&#8216;\/Servers\/SOA3\/DefaultFileStore\/SOA3&#8242;)<br \/>\ncmo.setDirectory(wlsDomain+&#8217;\/SOACoreDomain\/soa_cluster\/tlogs&#8217;)<\/p>\n<p>save()<br \/>\nactivate()<\/p>\n<p>Execute the script:<br \/>\ncd %WLS_HOME%\\common\\bin<br \/>\nwlst.sh DomainLogConfigurtionChange.py<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4659\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16.jpg\" alt=\"weblogicssrrerew-16\" width=\"966\" height=\"460\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16.jpg 966w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16-300x143.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16-150x71.jpg 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16-400x190.jpg 400w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-16-900x429.jpg 900w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The below script will help us to set the shared location to the tlogs for the weblogic servers in a domain.<\/p>\n<p>import sys<\/p>\n<p>print &#8220;@@@ Starting the script &#8230;&#8221;<\/p>\n<p>from java.util import * from javax.management import * from java.io import FileInputStream<\/p>\n<p>print &#8220;@@@ Starting the script &#8230;&#8221; global props #The directory of the domain configuration [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4658"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4658"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4658\/revisions"}],"predecessor-version":[{"id":4660,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4658\/revisions\/4660"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}