WLST change script to SOA Common, BPEL and BPMN PropertiesGepubliceerd: Auteur: Michel Schildmeijer Categorie: Oracle
To all you WebLogic / SOA Suite Admins: getting tired and bored to postconfiguration actions of SOA Suite specific settings after the 5th SOA /BPM Somain you’ve created? I did :). Doing manual repetitive tasks can be boring, but also time consuming and sensible for error.
I had to tune some performance related items in the SOA /BPM stack, called Dispatcher Thread Settings. These threads are used for process flows, and the more threads you define the more threads can be handled simultaneously. An example of which properties I mean can be seen in the picture below, set in the Fusion Middleware Control, under soa-infra–> SOA Administration. There you can find the common, BPEL and BPMN properties to set, all representing an accessible mbean.
The set of scripts contain 3 components. The scripts are based on the ones I found at Tootutor Blog
- substitute.py -> Used for parsing and substitute the current vallues with the one of the property file
- soaCommProp.py –> The actual executable python script
- properties –> the property file loaded with the substitute.py
To run the script and change the settings, first run the setDomainEnv.sh to set some parameters, or use a wlst shell script from the oracle_common/common/bin directory.
- java weblogic.WLST soaCommProp.py
I’ve added a python color class to highlight the changes that have been made.
Here a snippet of the code:
- def __changeBPELProperties(properties):
- soaconfigmbean=getKeyValue('SOA_CONFIG', properties)
- locationinfo=getKeyValue('MANAGED_SERVER_INFO', properties)
- appname=getKeyValue('APP_NAME', properties)
- bpelname=getKeyValue('bpname', properties)
- DEPT=getKeyValue('BPDEP', properties)
- DISTS=getKeyValue('BPDIST', properties)
- DEPTV=getKeyValue('BPDEP_VALUE', properties)
- DIVTSV=getKeyValue('BPDIVTS_VALUE', properties)
- DISTSV=getKeyValue('BPDIST_VALUE', properties)
- BPELMBeanobj = ObjectName(soaconfigmbean+':Location='+locationinfo+',name='+bpelname+',type=BPELConfig,Application='+appname)
- mbs.setAttribute(BPELMBeanobj, Attribute(DEPT,int(DEPTV)))
- mbs.setAttribute(BPELMBeanobj, Attribute(DIVTS,int(DIVTSV)))
- mbs.setAttribute(BPELMBeanobj, Attribute(DISTS,int(DISTSV)))
- print bcolors.OKGREEN + 'New' + ' ' + bpelname + ' ' + 'settings:' + bcolors.ENDC
- print 'Current' + DEPT +' ' +'Value is set to ----> ', mbs.getAttribute(BPELMBeanobj,DEPT)
- print 'Current' + DIVTS +' ' +'Value is set to ----> ', mbs.getAttribute(BPELMBeanobj,DIVTS)
- print 'Current' + DISTS +' ' +'Value is set to ----> ', mbs.getAttribute(BPELMBeanobj,DISTS)
Hope this will help you forward in your work. It sure helped me!
Special thanks to Togotutor Blog
All the best for 2013!
Publicatiedatum: 28 december 2012