本文整理汇总了Java中com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean类的典型用法代码示例。如果您正苦于以下问题:Java RecoveryEnvironmentBean类的具体用法?Java RecoveryEnvironmentBean怎么用?Java RecoveryEnvironmentBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecoveryEnvironmentBean类属于com.arjuna.ats.arjuna.common包,在下文中一共展示了RecoveryEnvironmentBean类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPeriodicRecoveryPeriod
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的package包/类
private void setPeriodicRecoveryPeriod(int periodicRecoveryPeriod) {
getPopulator(RecoveryEnvironmentBean.class)
.setPeriodicRecoveryPeriod(periodicRecoveryPeriod);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:NarayanaConfigurationBean.java
示例2: setRecoveryBackoffPeriod
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的package包/类
private void setRecoveryBackoffPeriod(int recoveryBackoffPeriod) {
getPopulator(RecoveryEnvironmentBean.class)
.setRecoveryBackoffPeriod(recoveryBackoffPeriod);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:NarayanaConfigurationBean.java
示例3: setRecoveryModules
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的package包/类
private void setRecoveryModules(List<String> recoveryModules) {
getPopulator(RecoveryEnvironmentBean.class)
.setRecoveryModuleClassNames(recoveryModules);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:NarayanaConfigurationBean.java
示例4: setExpiryScanners
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的package包/类
private void setExpiryScanners(List<String> expiryScanners) {
getPopulator(RecoveryEnvironmentBean.class)
.setExpiryScannerClassNames(expiryScanners);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:NarayanaConfigurationBean.java
示例5: shouldSetDefaultProperties
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的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
示例6: shouldSetModifiedProperties
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的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
示例7: setUp
import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
Hashtable props = JndiProvider.start();
initialContext = new InitialContext(props);
initEnv();
BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class).setRecoveryBackoffPeriod(1);
}