johnament 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_r162790633
##########
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:
@reta thought about this a bit. I want to leave the method that discovers
and executes the extensions here, but invoke it from the CDI extension. The
reason being, if others want to leverage the `ServiceLoader` pattern, they can
without having to rewrite it.
@rmannibucau I'm pretty sure the whole reason this feature exists in the
first place is because that CDI event pattern doesn't work properly (in this
use case). BTW, does meecrowave use the CDI extension for CXF?
----------------------------------------------------------------
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