当前位置: 首页>>代码示例>>Java>>正文


Java AbstractPlatformTransactionManager类代码示例

本文整理汇总了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");
	}

}
 
开发者ID:jeffreyning,项目名称:nh-micro,代码行数:9,代码来源:MicroServiceTemplateSupport.java

示例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);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:8,代码来源:AbstractStatsService.java

示例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);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:8,代码来源:DbRepoImportHandler.java

示例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);

}
 
开发者ID:frincon,项目名称:openeos,代码行数:32,代码来源:KnowledgeManager.java

示例5: SearchPlatformTransactionManager

import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
public SearchPlatformTransactionManager(AbstractPlatformTransactionManager platformTransactionManager, EventSupport eventSupport) {
    this.platformTransactionManager = platformTransactionManager;
    this.eventSupport = eventSupport;
}
 
开发者ID:chaokunyang,项目名称:jkes,代码行数:5,代码来源:SearchPlatformTransactionManager.java

示例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");
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:4,代码来源:AbstractStatsService.java

示例8: getTransactionManager

import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
private AbstractPlatformTransactionManager getTransactionManager() {
    return (AbstractPlatformTransactionManager) ContextHelper.get().getBean("artifactoryTransactionManager");
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:4,代码来源:DbRepoImportHandler.java

示例9: UnoTransactionManager

import org.springframework.transaction.support.AbstractPlatformTransactionManager; //导入依赖的package包/类
public UnoTransactionManager(AbstractPlatformTransactionManager ptm, UnoProcessPersistenceContext unoProcessPersistenceContext) {
	super(ptm);
	this.unoProcessPersistenceContext = unoProcessPersistenceContext;
}
 
开发者ID:frincon,项目名称:openeos,代码行数:5,代码来源:UnoTransactionManager.java


注:本文中的org.springframework.transaction.support.AbstractPlatformTransactionManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。