The below script will help us to set the shared location to the tlogs for the weblogic servers in a domain.
import sys
print “@@@ Starting the script …”
from java.util import *
from javax.management import *
from java.io import FileInputStream
print “@@@ Starting the script …”
global props
#The directory of the domain configuration
#/app/oracle/products/11g/admin/domains
wlsDomain=os.environ[“WLSDOMAIN”]
print “WLSDOMAIN=”+wlsDomain
adminURL=’t3://’+domainProps.get(‘domain1.AdminIP’)+’:’+domainProps.get(‘domain1.AdminPort’)
adminUserName=’weblogic’
adminPassword=domainProps.get(“domain1.AdminPasswd”)
connect(adminUserName, adminPassword, adminURL)
edit()
startEdit()
adminserverDir = File(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)
bool = adminserverDir.mkdirs()
cd(‘/Servers/SOA1/DefaultFileStore/SOA1′)
cmo.setDirectory(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)
cd(‘/Servers/SOA2/DefaultFileStore/SOA2′)
cmo.setDirectory(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)
cd(‘/Servers/SOA3/DefaultFileStore/SOA3′)
cmo.setDirectory(wlsDomain+’/SOACoreDomain/soa_cluster/tlogs’)
save()
activate()
Execute the script:
cd %WLS_HOME%\common\bin
wlst.sh DomainLogConfigurtionChange.py
Recent Comments