users@websocket-spec.java.net

[jsr356-users] [jsr356-experts] Re: Server deployment

From: Scott Ferguson <ferg_at_caucho.com>
Date: Thu, 29 Nov 2012 09:47:14 -0800

On 11/28/12 3:34 PM, Mark Thomas wrote:
>
> I dislike any approach which mandates some form of scanning. Scanning a
> WAR is a potentially expensive business and can cause significant (and
> unacceptable for some users) delay on application start. There needs to
> be some mechanism (programmatic, static, whatever) that enables a
> developer to tell the container "deploy this and this exactly and don't
> do anything else".
>
> I think the current solution isn't far off. A
> ServletContainerInitializer can be annotated with @HandlesTypes for
> Endpoint and @WebSocketEndpoint. Those that don't want scanning can
> disable the SCI and use a ServletContextListener and do things
> programmatically via ContainerProvider.getServerContainer().
>
> I have no objection to re-factoring the current solution or even a
> complete replacement but I do want to see the capabilities retained to:
> - disable class scanning
> - explicitly define what is to be deployed with requiring any form of
> class scanning

+1

The current basic system is fine. The API can be refactored, but we
already have scanning for those who want it, and those who want the
programmatic API can use the container initializer. I don't see the
value of two scanning methods.

-- Scott
>
> Mark
>
>