@ApplicationScoped public class TestPersistenceFactory extends PersistenceFactory
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
notFoundPersistenceUnits |
| Constructor and Description |
|---|
TestPersistenceFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.persistence.EntityManagerFactory |
createEntityManagerFactory()
should work without needing a persistence.xml create it using
|
EjbExtensionExtended |
getEjbExtensionExtended() |
protected String |
getPersistenceUnitName() |
DataSource |
produceDataSource()
create a jdbc-Datasource using the same driver url user and password as the entityManager
|
javax.persistence.EntityManager |
produceEntityManager()
returns EntityManager, to be injected and used so that the current threadSpecific context is correctly handled
|
protected javax.persistence.spi.PersistenceUnitInfo |
testPersistenceUnitInfo() |
clearPersistenceUnitNames, construct, createDataSource, destroy, equals, hashCode, transaction, transactionprotected String getPersistenceUnitName()
getPersistenceUnitName in class PersistenceFactory@Produces @Default public javax.persistence.EntityManager produceEntityManager()
produceEntityManager in class PersistenceFactory@Produces @Default public DataSource produceDataSource()
produceDataSource in class PersistenceFactorypublic EjbExtensionExtended getEjbExtensionExtended()
protected javax.persistence.spi.PersistenceUnitInfo testPersistenceUnitInfo()
protected javax.persistence.EntityManagerFactory createEntityManagerFactory()
createEntityManagerFactory in class PersistenceFactoryCopyright © 2017–2018. All rights reserved.