[ https://issues.apache.org/jira/browse/CXF-6132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294496#comment-14294496 ]
Andriy Redko commented on CXF-6132: ----------------------------------- Hi Sergey, More implementation details I am filling in, more tight relations between this JIRA and CXF-5702 are poping up, it is good. So here is a simplified scenario: if SCI detects any kind of JAX-RS application instance, it passes it directly as "javax.ws.rs.Application" init parameter to CXFNonSpringJaxrsServlet. However, the application may not define any singletons or classes so the initialization will fail anyway. SCI may do more work (create respective Application instance, check classes and singletons, ...). But, thanks to CXF-5702, SCI could make it really simple and *always* include the discovered services and providers along with application class. Now, CXFNonSpringJaxrsServlet can make a valid decision if those should be ignored or not, once the instance of the JAX-RS application is created. It is also very well aligned with the specification. What do you think? Does it make sense to you? Best Regards, Andriy Redko > 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)