📄 reentrantpersistencesessiontx.java
字号:
package org.jbpm.service;
import java.util.*;
import org.jbpm.model.definition.impl.*;
import org.jbpm.persistence.*;
/**
* a reentrant scenario is a situation where the execution service is called
* from within a call to the execution service. An example is starting a subprocess.
* These reentrant calls to the execution service must occur in the same transaction
* as the surrounding call.
*/
public class ReentrantPersistenceSessionTx implements PersistenceSessionTx {
private PersistenceSessionTx sessionTx = null;
public ReentrantPersistenceSessionTx( PersistenceSessionTx sessionTx ) {
this.sessionTx = sessionTx;
}
// In a reentrant scenario, the following three methods should have no effect.
// The success or failure is signalled by an exception. If an exception is
// thrown, it will be caught by the surrounding jBpm-API method implementation
// and that transaction will be rolled back or committed.
public void commitAndClose() {}
public void rollbackAndClose() {}
public void close() {}
public void lock(Object o) {
sessionTx.lock( o );
}
public void save(Object o) {
sessionTx.save( o );
}
public void delete(Object o) {
sessionTx.delete( o );
}
public Object load(Class clazz, Long id) {
return sessionTx.load( clazz, id );
}
public DefinitionImpl findLatestDefinition(String name) {
return sessionTx.findLatestDefinition( name );
}
public List findAllDefinitions() {
return sessionTx.findAllDefinitions();
}
public Collection findTokensByActor(String actorId) {
return sessionTx.findTokensByActor( actorId );
}
public List findUndoableInvocationLogs(Long processInstanceId, Date date) {
return sessionTx.findUndoableInvocationLogs( processInstanceId, date );
}
public Iterator findJobsToDo() {
return sessionTx.findJobsToDo();
}
public List findJobsByReference(String reference) {
return sessionTx.findJobsByReference( reference );
}
public FileImpl findFile(Long definitionId, String fileName) {
return sessionTx.findFile( definitionId, fileName );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -