Thursday, February 21, 2013

Oracle SOA 11.1.1.6/ Weblogic 10.3.6: WLST Scripts to List Composites by Partions

Oracle SOA 11.1.1.6/ Weblogic 10.3.6: WLST Scripts to List Composites by Partions


sca_listCompositesInPartition is an online script taht can be used to display the composites in a partition. This script needs to be run from  $FW_Middleware\Oracle_SOA1\common\bin\wlst.cmd.

The script is supported by a properties file and the .py file (The script file).

The properties file looks has the following properties.


userName=weblogic
passWord=password
wlsHost=localhost
adminServerListenPort=7001
partitionsToBeChecked=default,partion1,partition2,partition3

The script itself is:

from java.io import FileInputStream
import re
import tempfile
propInputStream = FileInputStream("MonitorCompositesState.properties")
configProps = Properties()
configProps.load(propInputStream)

print '=============================================='
print '  COMPOSITE STATES WITH RESPECT TO PARTITIONS '
print '=============================================='
connect(configProps.get("userName"),configProps.get("passWord"),'t3://'+configProps.get("wlsHost")+':'+configProps.get("adminServerListenPort"))
splits=String(configProps.get("partitionsToBeChecked")).split(",")
for splitPartitionName in splits:
    print 'All the composites in partition:',splitPartitionName
    listcompos=sca_listCompositesInPartition(configProps.get("wlsHost"), configProps.get("adminServerListenPort"), configProps.get("userName"),configProps.get("passWord"),splitPartitionName) 
print '=============================================='
print''


OCI Knowledge Series: OCI Infrastructure components

  Oracle Cloud Infrastructure (OCI) provides a comprehensive set of infrastructure services that enable you to build and run a wide range of...