Skip to main content

[jsr356-experts] Re: Server deployment

  • From: Danny Coward < >
  • To:
  • Subject: [jsr356-experts] Re: Server deployment
  • Date: Thu, 29 Nov 2012 11:33:35 -0800

OK, so how about this, we say that:-

developers enable/disable endpoint scanning using the web.xml's metadata-complete= true | false (don't scan, scan)
developers can supply an application config class that lists on demand those endpoints that he wants deploying (exact API TBD)
the application config class overrides any endpoint scanning, if any.

That way we have a scheme that is:-

- consistent between POJOs and programmatic endpoints
- allows the simple cases to be simple (developers with smaller numbers of endpoints don't have to do any special configuration at all, just make sure metadata-complete=false)
- allows the developer to turn off scanning completely (just make sure metadata-complete=true)
- allows the developer to list out exactly the endpoint to be deployed. (just supply an application config class)

- Danny

" type="cite">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





--
Danny Coward
Java EE
Oracle Corporation


[jsr356-experts] Server deployment

Danny Coward 11/28/2012

[jsr356-experts] Re: Server deployment

Mark Thomas 11/28/2012

[jsr356-experts] Re: Server deployment

Greg Wilkins 11/29/2012

[jsr356-experts] Re: Server deployment

Scott Ferguson 11/29/2012

[jsr356-experts] Re: Server deployment

Danny Coward 11/29/2012

[jsr356-experts] Re: Server deployment

Mark Thomas 11/30/2012

[jsr356-experts] Re: Server deployment

Rémy Maucherat 11/30/2012

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

Jitendra Kotamraju 11/30/2012

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

Mark Thomas 11/30/2012
 
 
Close
loading
Please Confirm
Close