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()

Continue reading

All Server States using WLST

This is an extension to my earlier post which gives the runtime attributes about the alive servers. https://weblogic-wonders.com/weblogic/2011/03/16/weblogic-server-runtime-using-wlst/ However there could be scenarios where you might want to keep a track of all the server states like RUNNING, SHUTDOWN  etc

Continue reading

Automating application deployment on Weblogic Server.

In this article we will demonstrate three ways of deployment and undeployment on Weblogic Server 1. Using WLST 2. Using JMX 3. Using build script. Application Deployment using WLST connect(‘weblogic’,’weblogic’,’t3://localhost:7001′) edit() startEdit() deploy(‘CookieApp’,’D:/Replications/CookieApp’,targets=’AdminServer’) save() activate() exit() Application Undeployment using WLST

Continue reading