Tuesday, February 5, 2013

Oracle SOA 11.1.1.6: WLST Scripts to Monitor Data Sources


This BLOG thread details the steps involved in creating WLST scripts to help to monitor the Data Sources on Weblogic Server with Admin Server or SOA  Server targets.

The scripts take advantage of a properties file which includes the server information. A file  CheckDataSourcesState.properties


userName=weblogic
passWord=password
wlsHost=localhost
adminServerListenPort=8001
dataSourcesToBeChecked=DataSourceDS1,DataSourceDS2



The WLST script can be created in an another file CheckDataSourcesState.py


import os
propInputStream = FileInputStream("CheckDataSourcesState.properties")
configProps = Properties()
configProps.load(propInputStream)
connect(configProps.get("userName"),configProps.get("passWord"),'t3://'+configProps.get("wlsHost")+':'+configProps.get("adminServerListenPort"))
serverRuntime()
dsMBeans = cmo.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans()
splits=String(configProps.get("dataSourcesToBeChecked")).split(",")
for ds in dsMBeans:
    for splitDSName in splits:
        if (splitDSName == ds.getName()):
              print 'DS name is: '+ds.getName()
              print 'State is ' +ds.getState()
              print ds.testPool()

Oracle SOA 12c: How To Create READ-ONLY Access To The JMS Messages For Monitor User

Create a user who only can view the JMS Messages and can not create,  delete,  move or import JMS Messages, and can not monitor other resour...