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