public abstract class JpaItemReaderWriterBase extends Object
JpaItemWriter
and JpaItemReader
.JpaItemReader
,
JpaItemWriter
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
em |
protected javax.persistence.EntityManagerFactory |
emf |
protected javax.enterprise.inject.Instance<javax.persistence.EntityManager> |
entityManagerInstance
javax.enterprise.inject.Instance that holds optional injection
of EntityManager . |
protected String |
entityManagerLookupName
JNDI lookup name of
EntityManager . |
protected String |
persistenceUnitName
Persistence unit name.
|
protected Map |
persistenceUnitProperties
Persistence unit properties, as a list of key-value pairs separated by comma (,).
|
Constructor and Description |
---|
JpaItemReaderWriterBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeEntityManager() |
protected void |
initEntityManager() |
protected void |
postConstruct() |
protected void |
preDestroy() |
@Inject protected javax.enterprise.inject.Instance<javax.persistence.EntityManager> entityManagerInstance
javax.enterprise.inject.Instance
that holds optional injection
of EntityManager
. If entityManagerLookupName
is not
specified, this field will be checked to obtain EntityManager
.@Inject protected String entityManagerLookupName
EntityManager
. Optional property, and defaults
to null. If specified, it will be used to perform a JNDI lookup of the
EntityManager
.@Inject protected String persistenceUnitName
entityManagerLookupName
nor entityManagerInstance
is initialized with injected value, this persistence unit name will be used
to create and EntityManager
.@Inject protected Map persistenceUnitProperties
protected javax.persistence.EntityManagerFactory emf
protected javax.persistence.EntityManager em
@PostConstruct protected void postConstruct()
@PreDestroy protected void preDestroy()
protected void initEntityManager()
protected void closeEntityManager()
Copyright © 2018 JBoss by Red Hat. All rights reserved.