Modify Datasource password without reload the server

80 views
Skip to first unread message

Andrés González Carranza

unread,
Oct 17, 2023, 10:04:20 AM10/17/23
to WildFly
Hi all,

It is possible to change the password for a datasource without reload or restarting Wildfly?

Thanks!


Paul Ferraro

unread,
Oct 17, 2023, 12:59:29 PM10/17/23
to WildFly
Currently, no.  The password attribute of a DataSource is defined such that any modification requires restarting all services of the server [1].
Ideally, such modifications would only require restarting the services of its resource.  Feel free to file a jira issue to fix this.

vaggelis spathas

unread,
Oct 30, 2023, 5:24:10 AM10/30/23
to WildFly

i believe you can do it with 

ManagementFactory.getPlatformServer;


platformServer.setAttribute(... );

on "jboss.as:susbstem=datasources,data-source=your-datasource"

and new Attribute("password","you-actual-new-pass");

Darran Lofthouse

unread,
Oct 30, 2023, 6:24:59 AM10/30/23
to WildFly
We have some similar feature requests for when a password comes from a credential store but even that is very tied to how we process the model once - we would really need some kind of callback API so that the credential store could notify anything using a particular credential that it has been updated.
Reply all
Reply to author
Forward
0 new messages