Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-26 Thread Romain Manni-Bucau
What about the system property container orders (.priority or so)? Le lun. 26 avr. 2021 à 20:31, Mark Thomas a écrit : > Ah. That is a general problem with the ServiceLoader mechanism. It is > good for situations where you have one, unknown implementation. If there > are multiple implementations

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-26 Thread Mark Thomas
Ah. That is a general problem with the ServiceLoader mechanism. It is good for situations where you have one, unknown implementation. If there are multiple implementations there is no mechanism for the user to express a preference - short of hacking the class loader to ensure the "right" one is

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Romain Manni-Bucau
It is not wrong per se but it is not usable to plug a custom impl which is my issue. @Mark: what about ignoring the default if there is another impl in serviceloader iteration? Would fix it even if it would create some useless stuff but recent serviceloader api solves it if we want to avoid it (w

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Raymond Augé
Romain are you saying that having a service descriptor in this case is wrong? On Thu., Apr. 22, 2021, 11:47 a.m. Mark Thomas, wrote: > On 22/04/2021 16:18, Romain Manni-Bucau wrote: > > I am not in JPMS Ray. > > > > About I think the issue is a "double bug" (well one bug, two step > > resolution

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Mark Thomas
On 22/04/2021 16:18, Romain Manni-Bucau wrote: I am not in JPMS Ray. About I think the issue is a "double bug" (well one bug, two step resolutions) since I can drop the SPI registration but then @ServiceProvider will recreate it so I propose: 1. to drop the explicit SPI registration and keep th

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Romain Manni-Bucau
I am not in JPMS Ray. About I think the issue is a "double bug" (well one bug, two step resolutions) since I can drop the SPI registration but then @ServiceProvider will recreate it so I propose: 1. to drop the explicit SPI registration and keep the default which is 1-1 (even faster but that's mo

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Romain Manni-Bucau
Le jeu. 22 avr. 2021 à 16:06, Raymond Augé a écrit : > @ServiceProvider is just a hint no? > Hmm, didn't check the tomcat specific setup but thought it was adding META-INF/services/ entry too which is current issue. Seems you are right and https://github.com/apache/tomcat/blob/master/res/MET

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Raymond Augé
On Thu., Apr. 22, 2021, 9:46 a.m. Raymond Augé, wrote: > @ServiceProvider is just a hint no? > > It does not change the implementation behavior... Unless you've found > otherwise, which would be surprising. > To be clear, there is no runtime behavior associated with @ServiceProvider _unless_ you

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Raymond Augé
Are you maybe in JPMS mode? On Thu., Apr. 22, 2021, 9:51 a.m. Raymond Augé, wrote: > > > On Thu., Apr. 22, 2021, 9:46 a.m. Raymond Augé, > wrote: > >> @ServiceProvider is just a hint no? >> >> It does not change the implementation behavior... Unless you've found >> otherwise, which would be sur

Re: Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Raymond Augé
@ServiceProvider is just a hint no? It does not change the implementation behavior... Unless you've found otherwise, which would be surprising. Ray On Thu., Apr. 22, 2021, 9:29 a.m. Romain Manni-Bucau, wrote: > Hi all, > > Websocket server configurator uses the SPI to load the impl and if not

Websocket server configurator as @ServiceProvider: a bug?

2021-04-22 Thread Romain Manni-Bucau
Hi all, Websocket server configurator uses the SPI to load the impl and if not found fallbacks on the hardcoded tomcat default. Isn't the SPI intended to override the default and therefore @ServiceProvider breaks this feature? If not, how to override it globally without doing it on a per endpoint