Java 类org.springframework.transaction.support.AbstractPlatformTransactionManager 实例源码

项目:nh-micro    文件:MicroServiceTemplateSupport.java   
public void checkRollbackAndThrow() throws Exception{
    PlatformTransactionManager  transactionManager=MicroTranManagerHolder.getTransactionManager(dbName);
    boolean flag=((AbstractPlatformTransactionManager) transactionManager).isFailEarlyOnGlobalRollbackOnly();
    if(flag){
        throw new RuntimeException("dbTranNestRollbackAndThrow");
    }

}
项目:nh-micro    文件:MicroServiceTemplateSupport.java   
public void checkRollbackAndThrow() throws Exception{
    PlatformTransactionManager  transactionManager=MicroTranManagerHolder.getTransactionManager(dbName);
    boolean flag=((AbstractPlatformTransactionManager) transactionManager).isFailEarlyOnGlobalRollbackOnly();
    if(flag){
        throw new RuntimeException("dbTranNestRollbackAndThrow");
    }

}
项目:artifactory    文件:AbstractStatsService.java   
protected TransactionStatus startTransaction() {
    DefaultTransactionDefinition def = new DefaultTransactionDefinition();
    def.setName("StatsTransaction");
    def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
    AbstractPlatformTransactionManager txManager = getTransactionManager();
    return txManager.getTransaction(def);
}
项目:artifactory    文件:DbRepoImportHandler.java   
private void startTransaction() {
    DefaultTransactionDefinition def = new DefaultTransactionDefinition();
    def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
    AbstractPlatformTransactionManager txManager = getTransactionManager();
    transactionStartTime = DateTime.now();
    this.transactionStatus = txManager.getTransaction(def);
}
项目:openeos    文件:KnowledgeManager.java   
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);

}
项目:jkes    文件:SearchPlatformTransactionManager.java   
public SearchPlatformTransactionManager(AbstractPlatformTransactionManager platformTransactionManager, EventSupport eventSupport) {
    this.platformTransactionManager = platformTransactionManager;
    this.eventSupport = eventSupport;
}
项目:graviteeio-access-management    文件:AbstractRepositoryConfiguration.java   
@Bean
public AbstractPlatformTransactionManager graviteeTransactionManager() {
    return new NoTransactionManager();
}
项目:artifactory    文件:AbstractStatsService.java   
protected AbstractPlatformTransactionManager getTransactionManager() {
    return (AbstractPlatformTransactionManager) ContextHelper.get().getBean("artifactoryTransactionManager");
}
项目:artifactory    文件:DbRepoImportHandler.java   
private AbstractPlatformTransactionManager getTransactionManager() {
    return (AbstractPlatformTransactionManager) ContextHelper.get().getBean("artifactoryTransactionManager");
}
项目:openeos    文件:UnoTransactionManager.java   
public UnoTransactionManager(AbstractPlatformTransactionManager ptm, UnoProcessPersistenceContext unoProcessPersistenceContext) {
    super(ptm);
    this.unoProcessPersistenceContext = unoProcessPersistenceContext;
}