[ 
https://issues.apache.org/jira/browse/CXF-6132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14283717#comment-14283717
 ] 

Sergey Beryozkin commented on CXF-6132:
---------------------------------------

Hi Andriy

We need Application, Provider and Path holders because the spec requires that 
if Application is discovered then use it, otherwise a new Application is to be 
created from Path and Provider holders. Thus if we have a case when Application 
is available we can still have Provider and Path holders reported (because even 
though Application provides all the info the providers would still be 
annotatetd) but we can ignore them in this case and if Application is null then 
it is obvious we need to syntesize it.

I think the whole feature depends on the actual container-based auto-discovery, 
nothing that we can do at the CXF level...May be in the OSGI case yes where an 
Activator would auto-discover, but not if it deploeyd to say JBoss or Glassfish.

I'm not 100% sure yet if shipping an implementation as part of the frontend 
itself has side-effects or not...May be some guards with 
http://docs.oracle.com/javaee/7/api/javax/servlet/ServletContext.html#getServletRegistrations()
 can be employed, say If servlets with CXF packages are already in then may be 
it means no work has be done...We can experiment :-)

Cheers, Sergey

> Provide JAX-RS ServletContextInitializer 
> -----------------------------------------
>
>                 Key: CXF-6132
>                 URL: https://issues.apache.org/jira/browse/CXF-6132
>             Project: CXF
>          Issue Type: New Feature
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>            Assignee: Andriy Redko
>             Fix For: 3.0.4, 3.1.0
>
>
> This will offer an advanced support for the auto-discovery of JAX-RS 
> Application, root resources and providers in OSGI in combination with 
> pax-web-jetty.
> Options:
> - dynamically register the implementation as OSGI service
> - ship a static implementation
> [1] 
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/JettyServerWrapper.java#L303
> [2] 
> http://docs.oracle.com/javaee/7/api/javax/servlet/ServletContainerInitializer.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to