本文整理汇总了Java中org.springframework.transaction.support.AbstractPlatformTransactionManager类的典型用法代码示例。如果您正苦于以下问题:Java AbstractPlatformTransactionManager类的具体用法?Java AbstractPlatformTransactionManager怎么用?Java AbstractPlatformTransactionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractPlatformTransactionManager类属于org.springframework.transaction.support包,在下文中一共展示了AbstractPlatformTransactionManager类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkRollbackAndThrow
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
public void checkRollbackAndThrow() throws Exception{
PlatformTransactionManager transactionManager=MicroTranManagerHolder.getTransactionManager(dbName);
boolean flag=((AbstractPlatformTransactionManager) transactionManager).isFailEarlyOnGlobalRollbackOnly();
if(flag){
throw new RuntimeException("dbTranNestRollbackAndThrow");
}
}
示例2: startTransaction
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
protected TransactionStatus startTransaction() {
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setName("StatsTransaction");
def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
AbstractPlatformTransactionManager txManager = getTransactionManager();
return txManager.getTransaction(def);
}
示例3: startTransaction
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
private void startTransaction() {
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
AbstractPlatformTransactionManager txManager = getTransactionManager();
transactionStartTime = DateTime.now();
this.transactionStatus = txManager.getTransaction(def);
}
示例4: createSession
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
public StatefulKnowledgeSession createSession() {
System.setProperty("jbpm.enable.multi.con", Boolean.toString(true));
Properties props = new Properties();
props.put("drools.processInstanceManagerFactory", JPAProcessInstanceManagerFactory.class.getName());
props.put("drools.workItemManagerFactory", JPAWorkItemManagerFactory.class.getName());
props.put("drools.processSignalManagerFactory", JPASignalManagerFactory.class.getName());
KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(props);
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.PERSISTENCE_CONTEXT_MANAGER, processPersistenceContextManager);
AnnotationTransactionAspect txAspect = AnnotationTransactionAspect.aspectOf();
AbstractPlatformTransactionManager txManager = (AbstractPlatformTransactionManager) txAspect.getTransactionManager();
LOG.debug("Transaction manager: " + txManager.toString());
TransactionManager tm = new UnoTransactionManager(txManager,
(UnoProcessPersistenceContext) processPersistenceContextManager.getProcessPersistenceContext());
env.set(EnvironmentName.TRANSACTION_MANAGER, tm);
Integer sessionId = knowledgeIdResolver.getKnowledgeSessionId();
SingleSessionCommandService sscs;
KnowledgeBase kBase = knowledgeBaseProvider.getKnowledgeBase();
if (sessionId == null) {
sscs = new SingleSessionCommandService(kBase, ksconf, env);
knowledgeIdResolver.saveKnowledgeSessionId(sscs.getSessionId());
} else {
sscs = new SingleSessionCommandService(sessionId, kBase, ksconf, env);
}
return new CommandBasedStatefulKnowledgeSession(sscs);
}
示例5: SearchPlatformTransactionManager
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
public SearchPlatformTransactionManager(AbstractPlatformTransactionManager platformTransactionManager, EventSupport eventSupport) {
this.platformTransactionManager = platformTransactionManager;
this.eventSupport = eventSupport;
}
示例6: graviteeTransactionManager
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
@Bean
public AbstractPlatformTransactionManager graviteeTransactionManager() {
return new NoTransactionManager();
}
开发者ID:gravitee-io,项目名称:graviteeio-access-management,代码行数:5,代码来源:AbstractRepositoryConfiguration.java
示例7: getTransactionManager
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
protected AbstractPlatformTransactionManager getTransactionManager() {
return (AbstractPlatformTransactionManager) ContextHelper.get().getBean("artifactoryTransactionManager");
}
示例8: getTransactionManager
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
private AbstractPlatformTransactionManager getTransactionManager() {
return (AbstractPlatformTransactionManager) ContextHelper.get().getBean("artifactoryTransactionManager");
}
示例9: UnoTransactionManager
import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
public UnoTransactionManager(AbstractPlatformTransactionManager ptm, UnoProcessPersistenceContext unoProcessPersistenceContext) {
super(ptm);
this.unoProcessPersistenceContext = unoProcessPersistenceContext;
}