|
||||||||||
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 java.sql.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(java.lang.Object object)
|
void |
beginTransaction()
|
void |
close()
|
protected java.lang.Exception |
commit()
|
void |
endTransaction()
|
java.sql.Connection |
getConnection()
|
java.sql.Connection |
getConnection(boolean resolveSession)
|
ContextSession |
getContextSession()
|
javax.sql.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(java.lang.Exception exception)
|
static boolean |
isPersistenceException(java.lang.Exception exception)
|
boolean |
isRollbackOnly()
Deprecated. use TxService.isRollbackOnly() instead |
boolean |
isTransactionActive()
|
boolean |
isTransactionEnabled()
|
protected boolean |
isTransactionManagedExternally()
|
protected boolean |
isTransactionRollbackOnly()
|
protected java.lang.Exception |
rollback()
|
void |
setConnection(java.sql.Connection connection)
|
void |
setContextSession(ContextSession contextSession)
|
void |
setDataSource(javax.sql.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. use 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 java.sql.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 java.sql.Connection getConnection()
public java.sql.Connection getConnection(boolean resolveSession)
public boolean isTransactionActive()
protected boolean isTransactionManagedExternally()
protected boolean isTransactionRollbackOnly()
public void close()
close
in interface Service
protected java.lang.Exception commit()
protected java.lang.Exception rollback()
public void assignId(java.lang.Object object)
assignId
in interface PersistenceService
public GraphSession getGraphSession()
getGraphSession
in interface PersistenceService
public LoggingSession getLoggingSession()
getLoggingSession
in interface PersistenceService
public JobSession getJobSession()
getJobSession
in interface PersistenceService
public ContextSession getContextSession()
getContextSession
in interface PersistenceService
public TaskMgmtSession getTaskMgmtSession()
getTaskMgmtSession
in interface PersistenceService
public javax.sql.DataSource getDataSource()
public boolean isRollbackOnly()
TxService.isRollbackOnly()
instead
isRollbackOnly
in interface PersistenceService
public void setRollbackOnly()
TxService.setRollbackOnly()
instead
setRollbackOnly
in interface PersistenceService
public void setRollbackOnly(boolean rollbackOnly)
TxService.setRollbackOnly()
instead
setRollbackOnly
in interface PersistenceService
java.lang.UnsupportedOperationException
- if rollbackOnly
is false
public 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 | n/a | false (no change) |
public void setConnection(java.sql.Connection connection)
public void setContextSession(ContextSession contextSession)
public void setDataSource(javax.sql.DataSource dataSource)
public void setGraphSession(GraphSession graphSession)
setGraphSession
in interface PersistenceService
public void setLoggingSession(LoggingSession loggingSession)
setLoggingSession
in interface PersistenceService
public void setJobSession(JobSession jobSession)
setJobSession
in interface PersistenceService
public void setTaskMgmtSession(TaskMgmtSession taskMgmtSession)
setTaskMgmtSession
in interface PersistenceService
public 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(java.lang.Exception exception)
public static boolean isLockingException(java.lang.Exception exception)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |