Class SharedBeansRegistrar

java.lang.Object
energy.eddie.spring.SharedBeansRegistrar
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor

public class SharedBeansRegistrar extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
BeanPostProcessor that checks for all beans whether it (or any ancestor interfaces of the Bean) is annotated with Shared. It will re-register any annotated Bean in the parent context.

To add support for any region connector to share their Beans with the parent context, annotate this class with RegionConnectorExtension and move it into the same package as the other extensions.
  • Constructor Details

    • SharedBeansRegistrar

      public SharedBeansRegistrar(org.springframework.beans.factory.config.ConfigurableListableBeanFactory localBeanFactory)
      See Also:
  • Method Details

    • postProcessAfterInitialization

      public Object postProcessAfterInitialization(@NonNull Object bean, @NonNull String beanName) throws org.springframework.beans.BeansException
      Specified by:
      postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
      Throws:
      org.springframework.beans.BeansException