wildfly/wildfly — pull request #6926 by emmartins (2014-11-08 00:04:52+00:00)
Title: WFLY-3865: remove shared bindings references management from jndi depend...

...encies service

If a deployment's JNDI dependency is removed, for instance due to a EE component restarting on a configuration change, then the "2 in 1" RuntimeBindReleaseService service, which depends on all JNDI bindings the deployment requires, goes down too, and so releases "its" shared bindings. If these shared bindings (i.e. remote views) have no additional references, as usual, the shared binding release results in the binding removal, and never re-added. It doesn't matter if the component and related RuntimeBindReleaseService go up again, shared bindings are not created by component level services.

This PR splits the RuntimeBindReleaseService functionality, the JNDI deps are added to a Service.NULL, and RuntimeBindReleaseService (now renamed to SharedBindingReferencesService, since it doesn't manage only the bindings made on runtime) takes care only of acquiring and releasing shared bindings, and has no dependency to any binding.