WLST Script to start and stop Datasource

 

Script to start Datasource

connect('weblogic','weblogic123','t3://localhost:7001')
domainRuntime()
cd('ServerRuntimes/AdminServer/JDBCServiceRuntime/AdminServer/JDBCDataSourceRuntimeMBeans/PegaRULES')
objArray = jarray.array([], java.lang.Object)
strArray = jarray.array([], java.lang.String)
invoke('start', objArray, strArray)
exit()

Script to stop Datasource

connect('weblogic','weblogic123','t3://localhost:7001')
domainRuntime()
cd('ServerRuntimes/AdminServer/JDBCServiceRuntime/AdminServer/JDBCDataSourceRuntimeMBeans/PegaRULES')
objArray = jarray.array([], java.lang.Object)
strArray = jarray.array([], java.lang.String)
invoke('shutdown', objArray, strArray)
exit()

2 comments

    1. you will have to go to the serverruntime of each server.. this script will need some modification.

Comments are closed.