Class ReadReplicaTransactionManagerBeanDefinitionRegistryPostProcessor

java.lang.Object
ch.admin.bit.jeap.db.tx.config.ReadReplicaTransactionManagerBeanDefinitionRegistryPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.context.EnvironmentAware

public class ReadReplicaTransactionManagerBeanDefinitionRegistryPostProcessor extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware
This class is responsible for registering the read replica transaction manager bean definition if the read replica feature is enabled. If the feature is disabled, the transaction manager bean definition is aliased to the read replica transaction manager bean definition to make sure that a transaction manager with the name "readReplicaTransactionManager" is always available (referenced in @TransactionalReadReplica).
  • Constructor Details

    • ReadReplicaTransactionManagerBeanDefinitionRegistryPostProcessor

      public ReadReplicaTransactionManagerBeanDefinitionRegistryPostProcessor()
  • Method Details

    • postProcessBeanDefinitionRegistry

      public void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanDefinitionRegistry in interface org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware