I have a requirement like where I have a password to connect to database which will be sent by different team through rest api. So in persistence context I connect to the service and get the password and create datasource object with the credentials, now since connection is made using persistence context it will create some active threads. But if suppose I am using the application and suddenly password changed and I have to get the updated password, since there is no functionality to check when the password is changed, I have to call the webservice before each database call in my application. If password is changed then I am using USerCredentialsDataSource Adaptor and setting the changed password, but issue here is even though password is changed the connections are still made with old password. So I am missing something in the code, please help.