Change default SCL instance, and allow selecting from service loader#10103
Change default SCL instance, and allow selecting from service loader#10103niloc132 merged 9 commits intogwtproject:mainfrom
Conversation
The default is now to ask a service loader for a ServletContainerLauncher if there is a single entry available, and failing that to use the static server - no servlets will be available. ServletContainerLaunchers registered as a provider for the service loader must provide a name that matches a specific regex. Those names may now also be used when specifying a particular server name rather than the fully qualified class name. The JettyLauncher will be kept for at least another version to ensure that projects can easily migrate to newer versions. This patch also moves `setBaseRequestLogLevel` to ServletContainerLauncher so other implementations can use it to log appropriately based on how they were started. Fixes gwtproject#10057
|
I am aligned with this approach, particularly in relation to the custom launchers project at https://bitbucket.org/upperlimit-public/gwt-devmode-server of which I am the owner and I will make the relevant adjustments. |
|
Should we allow hyphens as well as underscores in the launcher name ? or perhaps only hyphens ? |
Sure - I kept the regex simple, just what things are allowed for 99% of class names. I mostly don't want to encourage named types, which could be referenced from command line, to include characters that need to be escaped when used from the command lie ( |
|
Thanks @niloc132 , this makes sense, I will name my launchers accordingly. |
|
|
||
| @Override | ||
| public String[] getTags() { | ||
| return new String[] {getTag(), "-launcherDir"}; |
There was a problem hiding this comment.
I can revert this if we don't think it makes sense, but it makes CodeServer and DevMode just a little more alike.
zbynek
left a comment
There was a problem hiding this comment.
Approving code changes, didn't test.
|
Test sample: https://github.com/niloc132/gwt-devmode-server-sample |
|
Added a change to restore samples that require a working server by explicitly setting |
The default is now to ask a service loader for a ServletContainerLauncher if there is a single entry available, and failing that to use the static server - no servlets will be available.
ServletContainerLaunchers registered as a provider for the service loader must provide a name that matches a specific regex. Those names may now also be used when specifying a particular server name rather than the fully qualified class name.
The JettyLauncher will be kept for at least another version to ensure that projects can easily migrate to newer versions.
Fixes #10057
Fixes #10058