-
1. Re: After the database password changing, how not to restart jboss to reconnect database
nickarls Apr 18, 2013 2:10 AM (in response to gaoyonglu)It doesn't sound very practical if we're talking about a production environment.
Perhaps if you use the "use-strict-min", it will enforce the default min-pool-size=0 and not open any connections until required.
-
2. Re: After the database password changing, how not to restart jboss to reconnect database
wdfink Apr 18, 2013 2:31 AM (in response to gaoyonglu)As a password change is a manual process you have to change the configuration for JBoss manually also, or you might create a scipt to chance the configuration.
If you use JBoss < AS7 you might change the password with the JMX console or twiddle script (you have to change the XML as well ! ).
After that you can invoke the flush method for the DS pool, but this will restart the pool and all running transactions will be aborted.
-
3. Re: After the database password changing, how not to restart jboss to reconnect database
gaoyonglu Apr 18, 2013 2:45 AM (in response to wdfink)we use jboss as 7 , we want to extension jboss datasource which can get new password from password server when connection fail.
I need some hlep how extended a datasource in the existing basis,which to get password from password server when connection error and with new password return a new connection:
like:
when (sql exception code =xxx){
newPassword = getPasswordServer(username);
newConnection = getConnection(username,newPassword);
return newConnection.
}
so if password change,the server need't restart
-
4. Re: After the database password changing, how not to restart jboss to reconnect database
nickarls Apr 18, 2013 4:43 AM (in response to gaoyonglu)1 of 1 people found this helpfulHmm. In theory you might be able to write and ExceptionSorter that would connect your password server and then use a AS management client for changing the DS password and flush the pool.
-
5. Re: After the database password changing, how not to restart jboss to reconnect database
zhouyaguo Apr 19, 2013 3:07 AM (in response to nickarls)Nicklas Karlsson wrote:
Hmm. In theory you might be able to write and ExceptionSorter that would connect your password server and then use a AS management client for changing the DS password and flush the pool.
I think this approach will abort the current end-user request, better if it's transparent for end-user. how about enrich org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory#getLocalManagedConnection? ref: https://community.jboss.org/message/789554#789554