You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any ResourceConfigCustomizer bean is applied within the JerseyAutoConfiguration but also in the JerseyManagementContextConfiguration. It is not currently possible to exclude the bean's application in the management context. This can be a relevant problem if the management server runs on a different port.
If a singleton resource is registered in both contexts, this breaks the singleton contract as the API is now reachable via two ResourceConfigs on two different ports.
Therefore, it should be possible to restrict the application of ResourceConfigCustomizer to the main server. Currently, it is only possible to register an API exclusively in the management server via @ManagementContextConfiguration.
The text was updated successfully, but these errors were encountered:
raphw
changed the title
Jersey ResourceConfigContributor is always applied to
Jersey ResourceConfigContributor is always applied to the management server
Aug 7, 2019
IIRC, the only ResourceConfigCustomizer that's required to be applied by the management context is the one that registers the endpoint resources. Instead of marking the customizers as main server only, we should look at applying that configuration without needing to apply all the other customizers.
mbhave
changed the title
Jersey ResourceConfigContributor is always applied to the management server
Main server ResourceConfigCustomizers should not apply to management context
Aug 9, 2019
Any
ResourceConfigCustomizer
bean is applied within theJerseyAutoConfiguration
but also in theJerseyManagementContextConfiguration
. It is not currently possible to exclude the bean's application in the management context. This can be a relevant problem if the management server runs on a different port.If a singleton resource is registered in both contexts, this breaks the singleton contract as the API is now reachable via two
ResourceConfig
s on two different ports.Therefore, it should be possible to restrict the application of
ResourceConfigCustomizer
to the main server. Currently, it is only possible to register an API exclusively in the management server via@ManagementContextConfiguration
.The text was updated successfully, but these errors were encountered: