rmannibucau commented on a change in pull request #369: [CXF-7610] - Adding SPI 
to handle customizations to the server bean.
URL: https://github.com/apache/cxf/pull/369#discussion_r162785355
 
 

 ##########
 File path: 
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
 ##########
 @@ -902,9 +904,18 @@ public static JAXRSServerFactoryBean 
createApplication(Application app,
             bean.getProperties(true).putAll(appProps);
         }
         bean.setApplication(app);
-
+        customize(bean);
         return bean;
     }
+
+    private static void customize(JAXRSServerFactoryBean bean) {
+        ServiceLoader<JAXRSServerFactoryCustomizationExtension> extensions
 
 Review comment:
   was more thinking about adding a sendEvent passing the bean as parameter, 
this way you implement a standard listener and can customize the bean and 
register the listener or not as you need. The big advantage is to not have to 
add a SPI which will not work in some environments and will require a 
deactivation mecanism since jar can always end up in the classpath in an 
undesired fashion even in a modular project (you dont always have the choice of 
the deployment).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to