Class MicroTxEntityManagerBeanFactory
java.lang.Object
com.oracle.microtx.springboot.bean.factory.MicroTxEntityManagerBeanFactory
Entity Manager factory Class to create a Entity Manager to the database configured with MicroTx
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManagergetEntityManagerByName<wbr>(String dataSourceName)jakarta.persistence.EntityManagermicroTxEntityManager<wbr>(String dataSourceName)Get the Entity Manager to the database configured with MicroTxjakarta.persistence.EntityManagerNonActiveXAEntityManager<wbr>(String dataSourceName)
-
Constructor Details
-
MicroTxEntityManagerBeanFactory
public MicroTxEntityManagerBeanFactory()
-
-
Method Details
-
microTxEntityManager
@Bean(name="microTxEntityManager") @Scope("prototype") public jakarta.persistence.EntityManager microTxEntityManager<wbr>(@Autowired(required=false) String dataSourceName) throws SQLExceptionGet 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<wbr>(String dataSourceName) throws TrmConnectionException- Throws:
TrmConnectionException
-
getEntityManagerByName
public jakarta.persistence.EntityManager getEntityManagerByName<wbr>(String dataSourceName) throws SQLException- Throws:
SQLException
-