jsr356-experts@websocket-spec.java.net

[jsr356-experts] Re: More more programmatic deployment

From: Danny Coward <danny.coward_at_oracle.com>
Date: Thu, 28 Feb 2013 16:00:43 -0800

On 2/26/13 1:52 PM, Danny Coward wrote:
> Hi Mark and Rossen,
>
> OK, let me change tack here, and make sure I understand what you are
> both proposing, and that in fact you agree with each other :)
>
> In addition to the existing scan + ServerApplicationConfiguration
> mechanism, you'd like (* denotes new API)
>
> ServerContainer* extends WebSocketContainer {
> public void deploy(Class<?> pojo) throws DeploymentException;
> public void deploy(Class<? extends Endpoint> programmaticEndpoint,
> ServerEndpointConfiguration sec) throws DeploymentException;
> }
>
> So from some some kind of deployment initialization code you would write
>
> ServerContainer* sc = ServerContainerProvider*.getServerContainer();
> sc.deploy(...); ///etc
>
> and your placing of such deployment initialization code would be:
> 1) no webcontainer: not defined
> 2) web container: using some existing servlet mechanism, e.g. inside a
> ServletContextListener configured in the web.xml.
Just an update on this: we will go with this version of programmatic
deployment, I'm updating the API and spec document for v014 to include this.

- Danny