Class MicroTxEntityManagerBeanFactory

java.lang.Object
com.oracle.microtx.springboot.bean.factory.MicroTxEntityManagerBeanFactory

@Configuration public class MicroTxEntityManagerBeanFactory extends Object
Entity Manager factory Class to create a Entity Manager to the database configured with MicroTx
  • Constructor Details

    • MicroTxEntityManagerBeanFactory

      public MicroTxEntityManagerBeanFactory()
  • Method Details

    • microTxEntityManager

      @Bean(name="microTxEntityManager") @Scope("prototype") public jakarta.persistence.EntityManager microTxEntityManager(@Autowired(required=false) String dataSourceName) throws SQLException
      Get the Entity Manager to the database configured with MicroTx
      Parameters:
      dataSourceName - is the name of the XA resource provided during Configuration . It is optional parameter for single Resource Manager , if not provided the function will use default value.
      Returns:
      Entity Manager to the database
      Throws:
      SQLException
    • NonActiveXAEntityManager

      public jakarta.persistence.EntityManager NonActiveXAEntityManager(String dataSourceName) throws TrmConnectionException
      Throws:
      TrmConnectionException
    • getEntityManagerByName

      public jakarta.persistence.EntityManager getEntityManagerByName(String dataSourceName) throws SQLException
      Throws:
      SQLException