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


Java CoordinatorEnvironmentBean类代码示例

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


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

示例1: setCommitOnePhase

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

示例2: setDefaultTimeout

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

示例3: shouldSetDefaultProperties

import com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean; //导入依赖的package包/类
@Test
public void shouldSetDefaultProperties() throws Exception {
	NarayanaProperties narayanaProperties = new NarayanaProperties();
	NarayanaConfigurationBean narayanaConfigurationBean = new NarayanaConfigurationBean(
			narayanaProperties);
	narayanaConfigurationBean.afterPropertiesSet();

	assertThat(BeanPopulator.getDefaultInstance(CoreEnvironmentBean.class)
			.getNodeIdentifier()).isEqualTo("1");
	assertThat(BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class)
			.getObjectStoreDir()).endsWith("ObjectStore");
	assertThat(BeanPopulator
			.getNamedInstance(ObjectStoreEnvironmentBean.class, "communicationStore")
			.getObjectStoreDir()).endsWith("ObjectStore");
	assertThat(BeanPopulator
			.getNamedInstance(ObjectStoreEnvironmentBean.class, "stateStore")
			.getObjectStoreDir()).endsWith("ObjectStore");
	assertThat(BeanPopulator.getDefaultInstance(CoordinatorEnvironmentBean.class)
			.isCommitOnePhase()).isTrue();
	assertThat(BeanPopulator.getDefaultInstance(CoordinatorEnvironmentBean.class)
			.getDefaultTimeout()).isEqualTo(60);
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getPeriodicRecoveryPeriod()).isEqualTo(120);
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getRecoveryBackoffPeriod()).isEqualTo(10);

	List<String> xaResourceOrphanFilters = Arrays.asList(
			"com.arjuna.ats.internal.jta.recovery.arjunacore.JTATransactionLogXAResourceOrphanFilter",
			"com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter");
	assertThat(BeanPopulator.getDefaultInstance(JTAEnvironmentBean.class)
			.getXaResourceOrphanFilterClassNames())
					.isEqualTo(xaResourceOrphanFilters);

	List<String> recoveryModules = Arrays.asList(
			"com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule",
			"com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule");
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getRecoveryModuleClassNames()).isEqualTo(recoveryModules);

	List<String> expiryScanners = Arrays.asList(
			"com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner");
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getExpiryScannerClassNames()).isEqualTo(expiryScanners);

	assertThat(BeanPopulator.getDefaultInstance(JTAEnvironmentBean.class)
			.getXaResourceRecoveryClassNames()).isEmpty();
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:48,代码来源:NarayanaConfigurationBeanTests.java

示例4: shouldSetModifiedProperties

import com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean; //导入依赖的package包/类
@Test
public void shouldSetModifiedProperties() throws Exception {
	NarayanaProperties narayanaProperties = new NarayanaProperties();
	narayanaProperties.setTransactionManagerId("test-id");
	narayanaProperties.setLogDir("test-dir");
	narayanaProperties.setDefaultTimeout(1);
	narayanaProperties.setPeriodicRecoveryPeriod(2);
	narayanaProperties.setRecoveryBackoffPeriod(3);
	narayanaProperties.setOnePhaseCommit(false);
	narayanaProperties.setXaResourceOrphanFilters(
			Arrays.asList("test-filter-1", "test-filter-2"));
	narayanaProperties
			.setRecoveryModules(Arrays.asList("test-module-1", "test-module-2"));
	narayanaProperties
			.setExpiryScanners(Arrays.asList("test-scanner-1", "test-scanner-2"));

	NarayanaConfigurationBean narayanaConfigurationBean = new NarayanaConfigurationBean(
			narayanaProperties);
	narayanaConfigurationBean.afterPropertiesSet();

	assertThat(BeanPopulator.getDefaultInstance(CoreEnvironmentBean.class)
			.getNodeIdentifier()).isEqualTo("test-id");
	assertThat(BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class)
			.getObjectStoreDir()).isEqualTo("test-dir");
	assertThat(BeanPopulator
			.getNamedInstance(ObjectStoreEnvironmentBean.class, "communicationStore")
			.getObjectStoreDir()).isEqualTo("test-dir");
	assertThat(BeanPopulator
			.getNamedInstance(ObjectStoreEnvironmentBean.class, "stateStore")
			.getObjectStoreDir()).isEqualTo("test-dir");
	assertThat(BeanPopulator.getDefaultInstance(CoordinatorEnvironmentBean.class)
			.isCommitOnePhase()).isFalse();
	assertThat(BeanPopulator.getDefaultInstance(CoordinatorEnvironmentBean.class)
			.getDefaultTimeout()).isEqualTo(1);
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getPeriodicRecoveryPeriod()).isEqualTo(2);
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getRecoveryBackoffPeriod()).isEqualTo(3);
	assertThat(BeanPopulator.getDefaultInstance(JTAEnvironmentBean.class)
			.getXaResourceOrphanFilterClassNames())
					.isEqualTo(Arrays.asList("test-filter-1", "test-filter-2"));
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getRecoveryModuleClassNames())
					.isEqualTo(Arrays.asList("test-module-1", "test-module-2"));
	assertThat(BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class)
			.getExpiryScannerClassNames())
					.isEqualTo(Arrays.asList("test-scanner-1", "test-scanner-2"));
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:49,代码来源:NarayanaConfigurationBeanTests.java

示例5: coordinatorEnvironmentBean

import com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean; //导入依赖的package包/类
public Configuration coordinatorEnvironmentBean(Consumer<CoordinatorEnvironmentBean> consumer) {
    Objects.requireNonNull(consumer);
    this.coordinatorEnvironmentBean = arjPropertyManager.getCoordinatorEnvironmentBean();
    consumer.accept(coordinatorEnvironmentBean);
    return this;
}
 
开发者ID:teiid,项目名称:teiid-embedded,代码行数:7,代码来源:Configuration.java


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