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


Java CoreEnvironmentBeanException类代码示例

本文整理汇总了Java中com.arjuna.ats.arjuna.common.CoreEnvironmentBeanException的典型用法代码示例。如果您正苦于以下问题:Java CoreEnvironmentBeanException类的具体用法?Java CoreEnvironmentBeanException怎么用?Java CoreEnvironmentBeanException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CoreEnvironmentBeanException类属于com.arjuna.ats.arjuna.common包,在下文中一共展示了CoreEnvironmentBeanException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: transactionManager

import com.arjuna.ats.arjuna.common.CoreEnvironmentBeanException; //导入依赖的package包/类
@Override
public TransactionManager transactionManager() {
    return transactionManager(c -> c.coreEnvironmentBean(core -> {
        try {
            core.setNodeIdentifier(UUID.randomUUID().toString());
        } catch (CoreEnvironmentBeanException e) {
            throw new IllegalBeanPropertiesException(e);
        }
        core.setSocketProcessIdPort(0);
        core.setSocketProcessIdMaxPorts(10);
    }).coordinatorEnvironmentBean(coordinator -> {
        coordinator.setEnableStatistics(false);
        coordinator.setDefaultTimeout(300);
        coordinator.setTransactionStatusManagerEnable(false);
        coordinator.setTxReaperCancelFailWaitPeriod(120000);
    }).objectStoreEnvironmentBean(objectStore -> {
        objectStore.setObjectStoreDir(System.getProperty("java.io.tmpdir")  + File.separator + "narayana");
    }));
}
 
开发者ID:teiid,项目名称:teiid-embedded,代码行数:20,代码来源:NarayanaHelperImpl.java

示例2: testProperties

import com.arjuna.ats.arjuna.common.CoreEnvironmentBeanException; //导入依赖的package包/类
@Test
public void testProperties() {
    
    EmbeddedHelper.Factory.transactionManager(c -> c.coreEnvironmentBean(core -> {
        try {
            core.setNodeIdentifier("100");
            core.setSocketProcessIdPort(0);
            core.setSocketProcessIdMaxPorts(10);
        } catch (CoreEnvironmentBeanException e) {
            e.printStackTrace();
        }
    }).coordinatorEnvironmentBean(coordinator -> {
        coordinator.setEnableStatistics(false);
        coordinator.setDefaultTimeout(300);
        coordinator.setTransactionStatusManagerEnable(false);
        coordinator.setTxReaperCancelFailWaitPeriod(120000);
    }).objectStoreEnvironmentBean(objectStore -> {
        objectStore.setObjectStoreDir("target/narayana/data");
    }));
    
    assertEquals("100", arjPropertyManager.getCoreEnvironmentBean().getNodeIdentifier());
    assertEquals(0, arjPropertyManager.getCoreEnvironmentBean().getSocketProcessIdPort());
    assertEquals(10, arjPropertyManager.getCoreEnvironmentBean().getSocketProcessIdMaxPorts());
    
    assertFalse(arjPropertyManager.getCoordinatorEnvironmentBean().isEnableStatistics());
    assertEquals(300, arjPropertyManager.getCoordinatorEnvironmentBean().getDefaultTimeout());
    assertFalse(arjPropertyManager.getCoordinatorEnvironmentBean().isTransactionStatusManagerEnable());
    assertEquals(120000, arjPropertyManager.getCoordinatorEnvironmentBean().getTxReaperTimeout());

    assertEquals("target/narayana/data", arjPropertyManager.getObjectStoreEnvironmentBean().getObjectStoreDir());
}
 
开发者ID:teiid,项目名称:teiid-embedded,代码行数:32,代码来源:TestNarayanaHelper.java

示例3: setNodeIdentifier

import com.arjuna.ats.arjuna.common.CoreEnvironmentBeanException; //导入依赖的package包/类
private void setNodeIdentifier(String nodeIdentifier)
		throws CoreEnvironmentBeanException {
	getPopulator(CoreEnvironmentBean.class).setNodeIdentifier(nodeIdentifier);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:NarayanaConfigurationBean.java


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