Closed paterczm closed 9 years ago
@paterczm Could you explain why ApplicationContext was added? I don't see it used.
@jewzaam ApplicationContext is a CDI producer used to produce dependencies for the metadata servlet. See https://github.com/lightblue-platform/lightblue-client/blob/master/http/src/main/java/com/redhat/lightblue/client/http/servlet/LightblueMetadataProxyServlet.java.
@paterczm I don't see any reference to the application context. In this PR I see a new class created but no use of that class. Given the link you provided, would this be used by the client in a future PR?
The CDI container is using ApplicationContext class. Annotations tie it all together. If I take this class away, the LightblueMetadataProxyServlet's constructor will not receive the arguments it needs.
@paterczm It certainly doesn't hurt (and you could argue it's better to be explicit), but producing a lightblue client configuration is optional. By default it will do what you put in ApplicationContext. See:
The only difference is that by default, servlet init parameters will be looked at which can override configuration. But it falls back to PropertiesLightblueClientConfiguration.fromDefault() for any that are not overridden in the web.xml.
Nevermind, you're using it for the http client which makes sense... sorry, nothing to see here :)
@alechenninger, I'm not sure what you're proposing here - did you cancel only your 2nd post, or both?
@paterczm Sorry for confusion, ignore both. I was proposing removing the getLightblueClientConfiguration
method but you're using that to make the http client, so it makes sense to keep it.
@paterczm if ApplicationContext is consumed by lightblue-client, then does that class belong in that library instead lightblue-application?
ApplicationContext is application specific configuration of the LightblueMetadataProxyServlet. Perhaps this is more flexibility than we really need, but his is how it was designed.
https://github.com/lightblue-platform/lightblue-applications/issues/99
Related puppet changes: https://github.com/lightblue-platform/lightblue-puppet/pull/133