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.EntityManager
getEntityManagerByName
(String dataSourceName) jakarta.persistence.EntityManager
microTxEntityManager
(String dataSourceName) Get the Entity Manager to the database configured with MicroTxjakarta.persistence.EntityManager
NonActiveXAEntityManager
(String dataSourceName)
-
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
-