|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbpm.persistence.db.DbPersistenceService
public class DbPersistenceService
| Field Summary | |
|---|---|
protected Connection |
connection
|
protected ContextSession |
contextSession
|
protected GraphSession |
graphSession
|
protected boolean |
isCurrentSessionEnabled
|
protected boolean |
isTransactionEnabled
|
protected JobSession |
jobSession
|
protected LoggingSession |
loggingSession
|
protected boolean |
mustConnectionBeClosed
|
protected boolean |
mustSessionBeClosed
|
protected boolean |
mustSessionBeFlushed
|
protected DbPersistenceServiceFactory |
persistenceServiceFactory
|
protected Services |
services
Deprecated. for access to other services, invoke JbpmContext.getServices() |
protected org.hibernate.Session |
session
|
protected TaskMgmtSession |
taskMgmtSession
|
protected org.hibernate.Transaction |
transaction
|
| Constructor Summary | |
|---|---|
DbPersistenceService(DbPersistenceServiceFactory persistenceServiceFactory)
|
|
| Method Summary | |
|---|---|
void |
assignId(Object object)
|
void |
beginTransaction()
|
void |
close()
|
protected Exception |
commit()
|
void |
endTransaction()
|
Connection |
getConnection()
|
Connection |
getConnection(boolean resolveSession)
|
ContextSession |
getContextSession()
|
Object |
getCustomSession(Class sessionClass)
|
DataSource |
getDataSource()
|
GraphSession |
getGraphSession()
|
JobSession |
getJobSession()
|
LoggingSession |
getLoggingSession()
|
org.hibernate.Session |
getSession()
|
org.hibernate.SessionFactory |
getSessionFactory()
|
TaskMgmtSession |
getTaskMgmtSession()
|
org.hibernate.Transaction |
getTransaction()
|
static boolean |
isLockingException(Exception exception)
Tells whether the given exception or any of its causes is a locking exception. |
static boolean |
isPersistenceException(Exception exception)
Tells whether the given exception or any of its causes is a persistence exception. |
boolean |
isRollbackOnly()
Deprecated. use TxService.isRollbackOnly() instead |
boolean |
isTransactionActive()
|
boolean |
isTransactionEnabled()
|
protected boolean |
isTransactionManagedExternally()
|
protected boolean |
isTransactionRollbackOnly()
|
protected Exception |
rollback()
|
void |
setConnection(Connection connection)
|
void |
setContextSession(ContextSession contextSession)
|
void |
setDataSource(DataSource dataSource)
|
void |
setGraphSession(GraphSession graphSession)
|
void |
setJobSession(JobSession jobSession)
|
void |
setLoggingSession(LoggingSession loggingSession)
|
void |
setRollbackOnly()
Deprecated. use TxService.setRollbackOnly() instead |
void |
setRollbackOnly(boolean rollbackOnly)
Deprecated. use TxService.setRollbackOnly() instead |
void |
setSession(org.hibernate.Session session)
Injects an external Hibernate session, disabling transaction management. |
void |
setSession(org.hibernate.Session session,
boolean keepTransactionEnabled)
Injects an external Hibernate session. |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
|
void |
setSessionWithoutDisablingTx(org.hibernate.Session session)
Deprecated. call setSession(session, true) instead |
void |
setTaskMgmtSession(TaskMgmtSession taskMgmtSession)
|
void |
setTransaction(org.hibernate.Transaction transaction)
|
void |
setTransactionEnabled(boolean isTransactionEnabled)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DbPersistenceServiceFactory persistenceServiceFactory
protected Connection connection
protected boolean mustConnectionBeClosed
protected org.hibernate.Transaction transaction
protected boolean isTransactionEnabled
protected boolean isCurrentSessionEnabled
protected org.hibernate.Session session
protected boolean mustSessionBeFlushed
protected boolean mustSessionBeClosed
protected GraphSession graphSession
protected TaskMgmtSession taskMgmtSession
protected JobSession jobSession
protected ContextSession contextSession
protected LoggingSession loggingSession
protected Services services
JbpmContext.getServices()| Constructor Detail |
|---|
public DbPersistenceService(DbPersistenceServiceFactory persistenceServiceFactory)
| Method Detail |
|---|
public org.hibernate.SessionFactory getSessionFactory()
public org.hibernate.Session getSession()
public void beginTransaction()
public void endTransaction()
public Connection getConnection()
public Connection getConnection(boolean resolveSession)
public boolean isTransactionActive()
protected boolean isTransactionManagedExternally()
protected boolean isTransactionRollbackOnly()
public void close()
close in interface Serviceprotected Exception commit()
protected Exception rollback()
public void assignId(Object object)
assignId in interface PersistenceServicepublic GraphSession getGraphSession()
getGraphSession in interface PersistenceServicepublic LoggingSession getLoggingSession()
getLoggingSession in interface PersistenceServicepublic JobSession getJobSession()
getJobSession in interface PersistenceServicepublic ContextSession getContextSession()
getContextSession in interface PersistenceServicepublic TaskMgmtSession getTaskMgmtSession()
getTaskMgmtSession in interface PersistenceServicepublic Object getCustomSession(Class sessionClass)
getCustomSession in interface PersistenceServicepublic DataSource getDataSource()
public boolean isRollbackOnly()
TxService.isRollbackOnly() instead
isRollbackOnly in interface PersistenceServicepublic void setRollbackOnly()
TxService.setRollbackOnly() instead
setRollbackOnly in interface PersistenceServicepublic void setRollbackOnly(boolean rollbackOnly)
TxService.setRollbackOnly() instead
setRollbackOnly in interface PersistenceServiceIllegalArgumentException - if rollbackOnly is falsepublic void setSession(org.hibernate.Session session)
public void setSessionWithoutDisablingTx(org.hibernate.Session session)
setSession(session, true) instead
public void setSession(org.hibernate.Session session,
boolean keepTransactionEnabled)
keepTransactionEnabled parameter can be used to prevent
transaction management from being disabled, according to the following table.
| is currently enabled? | keep enabled? | enabled onward |
|---|---|---|
| true | true | true (no change) |
| true | false | false |
| false | any | false (no change) |
public void setConnection(Connection connection)
public void setContextSession(ContextSession contextSession)
public void setDataSource(DataSource dataSource)
public void setGraphSession(GraphSession graphSession)
setGraphSession in interface PersistenceServicepublic void setLoggingSession(LoggingSession loggingSession)
setLoggingSession in interface PersistenceServicepublic void setJobSession(JobSession jobSession)
setJobSession in interface PersistenceServicepublic void setTaskMgmtSession(TaskMgmtSession taskMgmtSession)
setTaskMgmtSession in interface PersistenceServicepublic void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
public org.hibernate.Transaction getTransaction()
public void setTransaction(org.hibernate.Transaction transaction)
public boolean isTransactionEnabled()
public void setTransactionEnabled(boolean isTransactionEnabled)
public static boolean isPersistenceException(Exception exception)
HibernateException.
public static boolean isLockingException(Exception exception)
StaleStateException or
LockAcquisitionException. Note that Hibernate dialects have limited ability to map
native locking error codes to LockAcquisitionExceptions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||