org.alfresco.repo.workflow.jbpm
Class JBPMTransactionTemplate

java.lang.Object
  extended by org.springmodules.workflow.jbpm31.JbpmAccessor
      extended by org.springmodules.workflow.jbpm31.JbpmTemplate
          extended by org.alfresco.repo.workflow.jbpm.JBPMTransactionTemplate
All Implemented Interfaces:
TransactionListener, org.springframework.beans.factory.InitializingBean, org.springmodules.workflow.jbpm31.JbpmOperations

public class JBPMTransactionTemplate
extends org.springmodules.workflow.jbpm31.JbpmTemplate
implements TransactionListener

JBPM Template that manages JBPM Context at the Alfresco Transaction level


Field Summary
 
Fields inherited from class org.springmodules.workflow.jbpm31.JbpmAccessor
jbpmConfiguration
 
Constructor Summary
JBPMTransactionTemplate()
           
JBPMTransactionTemplate(org.jbpm.JbpmConfiguration jbpmConfiguration)
           
JBPMTransactionTemplate(org.jbpm.JbpmConfiguration jbpmConfiguration, org.jbpm.graph.def.ProcessDefinition processDefinition)
           
 
Method Summary
 void afterCommit()
          Invoked after transaction commit.
 void afterPropertiesSet()
          
 void afterRollback()
          Invoked after transaction rollback.
 void beforeCommit(boolean readOnly)
          Called before a transaction is committed.
 void beforeCompletion()
          Invoked before transaction commit/rollback.
 boolean equals(java.lang.Object obj)
          
 void flush()
          
protected  org.jbpm.JbpmContext getContext()
          
 int hashCode()
          
protected  void releaseContext(org.jbpm.JbpmContext jbpmContext)
          
 
Methods inherited from class org.springmodules.workflow.jbpm31.JbpmTemplate
execute, findPooledTaskInstances, findPooledTaskInstances, findProcessInstance, findProcessInstances, findTaskInstances, findTaskInstances, findTaskInstances, findTaskInstancesByToken, findTaskInstancesByToken, getContextName, getHibernateTemplate, getProcessDefinition, saveProcessInstance, setContextName, setHibernateTemplate, setProcessDefinition, signal, signal, signal
 
Methods inherited from class org.springmodules.workflow.jbpm31.JbpmAccessor
convertJbpmException, getJbpmConfiguration, setJbpmConfiguration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBPMTransactionTemplate

public JBPMTransactionTemplate()

JBPMTransactionTemplate

public JBPMTransactionTemplate(org.jbpm.JbpmConfiguration jbpmConfiguration,
                               org.jbpm.graph.def.ProcessDefinition processDefinition)

JBPMTransactionTemplate

public JBPMTransactionTemplate(org.jbpm.JbpmConfiguration jbpmConfiguration)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class org.springmodules.workflow.jbpm31.JbpmTemplate
Throws:
java.lang.Exception

getContext

protected org.jbpm.JbpmContext getContext()

Overrides:
getContext in class org.springmodules.workflow.jbpm31.JbpmTemplate

releaseContext

protected void releaseContext(org.jbpm.JbpmContext jbpmContext)

Overrides:
releaseContext in class org.springmodules.workflow.jbpm31.JbpmTemplate

flush

public void flush()

Specified by:
flush in interface TransactionListener

beforeCommit

public void beforeCommit(boolean readOnly)
Called before a transaction is committed.

All transaction resources are still available.

Specified by:
beforeCommit in interface TransactionListener
Parameters:
readOnly - true if the transaction is read-only

beforeCompletion

public void beforeCompletion()
Invoked before transaction commit/rollback. Will be called after TransactionListener.beforeCommit(boolean) even if TransactionListener.beforeCommit(boolean) failed.

Any exceptions generated here will only be logged and will have no effect on the state of the transaction.

All transaction resources are still available.

Specified by:
beforeCompletion in interface TransactionListener

afterCommit

public void afterCommit()
Invoked after transaction commit.

Any exceptions generated here will cause the transaction to rollback.

Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.

Specified by:
afterCommit in interface TransactionListener

afterRollback

public void afterRollback()
Invoked after transaction rollback.

Although all transaction resources are still available, this method should be used only for cleaning up resources after a rollback has occured.

Specified by:
afterRollback in interface TransactionListener

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.