I have created a remote client with JMX to connect to my Weblogic 12c admin server. I use it to do admin stuff. It has been fine. However, there is a requirement to add the functionality to test a list of user and their passwords in authenticating to the admin server. This is done periodically. Since user passwords are a one way hash; and I cannot just retrieve them, decrypt them, and compare them, I had to come up with another solution.My solution was to pull in the user IDs and password from a file, cycle through them, and just create a connection to the admin server and then close it. The problem is the previous connection gets stored somewhere. So my results are not accurate. For example, if a user logged in successfully as I had their user ID and password correctly and then I went to th e next user ID/password it would be success regardless of whether I had the wrong password. Again, it is picking up the previous connection. So even closing the connection doesn't stop this. So I don't know what to do other than flush the cache.
How do you do this? I have looked around saw where you can delete the tmp/cache directories but you have to stop the server first, which is not an option for me. I cannot seem to access the cache as noted here->http://docs.oracle.com/cd/B15904_01/web.1012/b14012/objcache.htm#i1085434.
So I don't know how to do this. Any suggestions?
Here is my code to do a basic connection:
$serviceURL = new java("javax.management.remote.JMXServiceURL","rmi",$this->IP,$this->PORT,"/jndi/iiop://".$this->IP.":".$this->PORT."/weblogic.management.mbeanservers.runtime");
$env = new java("java.util.Hashtable");