-
1. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 2, 2018 2:52 AM (in response to vagelis.savvas)Can someone comment on this please?
I guess currently adding/removing DataSource server objects isn't supported but is there a plan about it?
Cheers,
Vagelis
-
2. Re: DataSource addition and removal without server reload
sshriram09 Oct 4, 2018 4:01 AM (in response to vagelis.savvas)Hi,
Which version of Wildfly you are using ?
I could see that there is a fix for it in WildFly 11 see [WFLY-6773] Provide ability to start/stop Data Source creation without restart of server - JBoss Issue Tracker
-
3. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 4, 2018 4:28 AM (in response to sshriram09)I am using 14.0.0.Final and 14.0.1.Final
-
4. Re: DataSource addition and removal without server reload
simkam Oct 4, 2018 5:43 AM (in response to vagelis.savvas)Hi,
I believe it is currently possible. You must use operation header "allow-resource-service-restart=true".
/subsystem=datasources/data-source=ExampleDS:remove(){allow-resource-service-restart=true}
Some more details can be found in Design notes for supporting ability to add/remove Data Source without reload-required state
But please be aware that allow-resource-service-restart can have side effects. It is supposed to be helper for power users. ([wildfly-dev] allow-resource-service-restart=true )
-
5. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 4, 2018 7:03 AM (in response to simkam)Hi, thank you both for the input.
If I read the links correctly the "allow-resource-service-restart" => true means the server will restart only the relevant resource service
instead of the whole server. That means existing connections to the various DataSource(s)
will be dropped because the DataSource service will still need to be restarted.
So am I back to square one I guess but please correct me if I am wrong.
Cheers,
Vagelis
-
6. Re: DataSource addition and removal without server reload
simkam Oct 5, 2018 3:30 AM (in response to vagelis.savvas)Hi,
yes, you are correct. As far I know there are no plans to change current behavior, butmaeste might have more information.
-
7. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 4, 2018 1:47 PM (in response to simkam)Oh, can you please ask him to comment on this thread?
Cheers,
Vagelis
-
8. Re: DataSource addition and removal without server reload
maeste Oct 8, 2018 4:47 AM (in response to vagelis.savvas)Hi,
Martin is correct, no plan to change it, too much side effect would be possible removing Datasource online. What you can do is disable datasource, wait for all connection complete their work and then remove/add w/ "allow-resource-service-restart". It is the purpose of "disable", but it's up to you to implement the decuion when it's safe from application perspective
Best,
S.
-
9. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 9, 2018 5:10 AM (in response to maeste)Hi Stefano,
if I disable a DataSource w/ "allow-resource-service-restart" this affects connections from other DataSources as well, right?
If yes (and please correct me if I am wrong) this means I have to find a window when it is safe to actually
restart the DataSource service which in a multitenant app this probably means during some scheduled downtime or so.
Because how else can I restart the DS service on runtime, without impacting the application's availability?
On another front, I took some time and implemented adding/removing a DataSource on the fly
but this time using the pretty new Agroal DataSource subsystem (on WF 14) and the server didn't ask for a reload.
Do you know if it is safe to assume that Agroal will be more multitenant friendly in the longer run and allow this use case?
I'd hate to go on with that route and later on find out that Agroal as well needs to restart when removing a DS :-)
Cheers,
Vagelis
-
10. Re: DataSource addition and removal without server reload
maeste Oct 9, 2018 5:49 AM (in response to vagelis.savvas)Hi Vagelis,
No it would affect only disabled DS.
regarding Agroal, luis.barreiro could answer better than me.
Best,
S.
-
11. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 10, 2018 3:45 AM (in response to maeste)Thanx for the info Stefano!
Good to know that only the relevant DS is affected, this opens up several possibilities.
Luis Barreiro vcard doesn't have any contact info could you be so kind as to ping him
to comment on the Agroal part of the above question?
Cheers,
Vagelis
-
12. Re: DataSource addition and removal without server reload
vagelis.savvas Oct 16, 2018 5:06 AM (in response to vagelis.savvas)Hi again,
is Luis avail for his insights on Agroal and dynamic DataSource addition/removal without a server reload?
Cheers,
Vagelis