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

Andriy Redko commented on CXF-6132:
-----------------------------------

Hi Sergey,

I have started to think about the implementation and here are some very rough 
thoughts from my side:
 - I agree with you, we probably should have a separate module for 
ServletContextInitializer implementation, do you have any suggestion where to 
put it and how to call it?
 - the ServletContextInitializer implementation will declare itself as 
@HandlesTypes( Application.class ), the container should discover those classes 
automatically (it is more reliable way to determine the JAX-RS application, I 
think @ApplicationPath is not a mandatory annotation) 
 - having the application class instance, we could check the getSingletons() / 
getResources() to check if application sets up everything (as you described in 
previous comment)
 - if not, we probably could go with auto-discovery or ask developers to 
subclass the ServletContextInitializer and specify providers / features / 
resource classes.

What do you think? Does it make sense to you?
Thanks!

> 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