org.jboss.seam.persistence
@Scope(value=CONVERSATION) @BypassInterceptors @Install(value=false) public class ManagedPersistenceContext extends Object implements Serializable, javax.servlet.http.HttpSessionActivationListener, Mutable, PersistenceContextManager, Synchronization
Constructor and Description |
---|
ManagedPersistenceContext() |
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(int status) |
void |
beforeCompletion() |
void |
changeFlushMode(FlushModeType flushMode) |
boolean |
clearDirty()
Get and clear the dirty flag.
|
void |
create(Component component) |
void |
destroy() |
String |
getComponentName() |
javax.persistence.EntityManager |
getEntityManager() |
Expressions.ValueExpression<javax.persistence.EntityManagerFactory> |
getEntityManagerFactory()
A value binding expression that returns an EntityManagerFactory,
for use of JPA outside of Java EE 5 / Embeddable EJB3.
|
javax.persistence.EntityManagerFactory |
getEntityManagerFactoryFromJndiOrValueBinding() |
List<Filter> |
getFilters()
Hibernate filters to enable automatically
|
String |
getPersistenceUnitJndiName()
The JNDI name of the EntityManagerFactory, for
use of JPA in Java EE 5 / Embeddable EJB3.
|
void |
sessionDidActivate(javax.servlet.http.HttpSessionEvent event)
Note that we must use the method on the
HttpSessionActivationListener
interface rather than @PostActivate since interceptors are disabled
on this component. |
void |
sessionWillPassivate(javax.servlet.http.HttpSessionEvent event)
If a transaction is active, fail the passivation.
|
void |
setEntityManagerFactory(Expressions.ValueExpression<javax.persistence.EntityManagerFactory> entityManagerFactory) |
protected void |
setEntityManagerFlushMode(FlushModeType flushMode) |
void |
setFilters(List<Filter> filters) |
void |
setPersistenceUnitJndiName(String persistenceUnitName) |
String |
toString() |
public boolean clearDirty()
Mutable
clearDirty
in interface Mutable
@Unwrap public javax.persistence.EntityManager getEntityManager() throws NamingException, SystemException
NamingException
SystemException
public void sessionWillPassivate(javax.servlet.http.HttpSessionEvent event)
HttpSessionActivationListener
interface rather than
@PrePassivate
since interceptors are disabled on this component.sessionWillPassivate
in interface javax.servlet.http.HttpSessionActivationListener
public void sessionDidActivate(javax.servlet.http.HttpSessionEvent event)
HttpSessionActivationListener
interface rather than @PostActivate since interceptors are disabled
on this component.sessionDidActivate
in interface javax.servlet.http.HttpSessionActivationListener
@Destroy public void destroy()
public void afterCompletion(int status)
afterCompletion
in interface Synchronization
public void beforeCompletion()
beforeCompletion
in interface Synchronization
public javax.persistence.EntityManagerFactory getEntityManagerFactoryFromJndiOrValueBinding()
public Expressions.ValueExpression<javax.persistence.EntityManagerFactory> getEntityManagerFactory()
public void setEntityManagerFactory(Expressions.ValueExpression<javax.persistence.EntityManagerFactory> entityManagerFactory)
public String getPersistenceUnitJndiName()
public void setPersistenceUnitJndiName(String persistenceUnitName)
public String getComponentName()
public void changeFlushMode(FlushModeType flushMode)
changeFlushMode
in interface PersistenceContextManager
protected void setEntityManagerFlushMode(FlushModeType flushMode)
Copyright © 2015 Seam Framework. All Rights Reserved.