Followers

Tuesday, June 24, 2014

Get Connection Pool Information through WLST

The below script will get information about JNDI,JDBC URL 

###################****##############****########################  
# Generic script applicable on any Operating Environments (Unix, Windows)  
# ScriptName    : togetConnectionpoolURL.py  
# Author        : Madhusudhana Chilipi  
###############     Connecting to Start     #################################  

connect('weblogic','welcome1','t3://192.168.1.2:7001')


###############     Changing the Datasources     #################################  

allJDBCResources = cmo.getJDBCSystemResources()
for jdbcResource in allJDBCResources:
   dsname = jdbcResource.getName()
   print dsname, jdbcResource.getJDBCResource().getJDBCDataSourceParams().getJNDINames()[0], jdbcResource.getJDBCResource().getJDBCDriverParams().getUrl() 

###############     End    #################################