HHH-12133 - Create ManagedBeanRegistry and ManagedBean

- mostly just backporting this work from 6.0
This commit is contained in:
Steve Ebersole 2017-12-18 09:45:21 -06:00
parent b711e14a6c
commit 86cde1296b
2 changed files with 8 additions and 0 deletions

View File

@ -86,6 +86,10 @@ public class CompositeManagedBeanRegistry
return fallback.getBean( beanName, beanContract,shouldRegistryManageLifecycle ); return fallback.getBean( beanName, beanContract,shouldRegistryManageLifecycle );
} }
@Override
public ManagedBeanRegistry getPrimaryBeanRegistry() {
return primaryRegistry;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Optional delegation // Optional delegation

View File

@ -46,4 +46,8 @@ public interface ManagedBeanRegistry extends Service {
* the release calls itself. * the release calls itself.
*/ */
<T> ManagedBean<T> getBean(String beanName, Class<T> beanContract, boolean shouldRegistryManageLifecycle); <T> ManagedBean<T> getBean(String beanName, Class<T> beanContract, boolean shouldRegistryManageLifecycle);
default ManagedBeanRegistry getPrimaryBeanRegistry() {
return this;
}
} }