I was asked to make something with WLST to reset connection pools. Unfortunately, there does not seem to be anything easily findable on the web on how to do it. I see things on how to create JDBC resources. There is one thing from somebody doing this:
cd('Admin1') # there is no Admin1 on my box, just Admin
He lists doing cd into the datasource in the JDBCDataSourceRuntimeMBeans directory, but there are none in that directory on my box. I think it is because
I connected to localhost:7001 (Admin console), but I am not sure that is the issue. I tried connecting to one of the other servers for example localhost:7013, which is
for one of the apps on the box that has connection pools, but it says no server is listening on that port, although looking in the console I do see it running on that port.
Is all resets of pools done from the admin console on 7001 (why do I not see anything in JDBCDataSourceRuntimeMBeans?), or was I right that you needed to connect to the apps port (if so, why does connecting fail?)
Of course, it would be a lot easier if somebody could provide source or a link to some that does resets, but I would like to understand what is going on as well if anybody is willing to share.
The "directories" available through WLST are going to vary between Weblogic releases, so it's not surprising that the example you found doesn't work (note "Admin1" in the example is the domain name). The example you give appears to work in WLS 10.3.
The version I am testing on is vesrion 10.0 MP1. If I type serverRuntime() it drops me in wls:/wlINF/ServerRuntime>. wlINF is our domain. If I do an ls(), it shows me a lot of things, one of which is JDBCServiceRuntime. If I cd('JDBCServiceRuntime') and do an ls(), all I see is Admin. Where are the other instances? Do you have any ideas on how to get a reset done with this version? Sigh, and yes, we do have most of the other versions as well, so I will need to know those methods as well.
I don't have WLS 10. Is wls:/wlINF/ServerRuntime/JDBCServiceRuntime/Admin a directory? What does it contain?
The MBean structure is very much like a file system so you can search. Try "find ('JDBCDataSourceRuntimeMBeans')"
Joined: Apr 18, 2005
The wlINF is my domain name, so you will not have that. But if you do serverRuntime() and then do cd('JDBCServiceRuntime'), what do you have in there? Is it Admin? If I cd('Admin')--in that, wls:/wlINF/serverRuntime/JDBCServiceRuntime/Admin>, I have three directories in there: JDBCDataSourceRuntimeMBeans, JDBCDriverRuntimeMBeans, and JDBCMultiDataSourceRuntimeMBeans. Inside of those directories are nothing. I think that is because there are no JDBC Datasources set up in Admin. I just don't know how to get over to my other instances within wlst in serverRuntime(), but I am not even sure that is the issue either.