Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public XADataSourceWrapper xaDataSourceWrapper(NarayanaProperties narayanaProper
XARecoveryModule xaRecoveryModule) {
return new GenericXADataSourceWrapper(xaRecoveryModule,
narayanaProperties.getTransactionalDriver(),
narayanaProperties.getRecoveryDbCredentials());
narayanaProperties.getDbRecoveryProperties());
}

}
Expand All @@ -176,7 +176,7 @@ static class GenericJmsConfiguration {
public XAConnectionFactoryWrapper xaConnectionFactoryWrapper(TransactionManager transactionManager,
XARecoveryModule xaRecoveryModule, NarayanaProperties narayanaProperties) {
return new GenericXAConnectionFactoryWrapper(transactionManager, xaRecoveryModule,
narayanaProperties.getRecoveryJmsCredentials());
narayanaProperties.getJmsRecoveryProperties());
}

}
Expand All @@ -191,7 +191,7 @@ public XAConnectionFactoryWrapper xaConnectionFactoryWrapper(TransactionManager
XARecoveryModule xaRecoveryModule, NarayanaProperties narayanaProperties) {
return new PooledXAConnectionFactoryWrapper(transactionManager, xaRecoveryModule,
narayanaProperties.getMessaginghub(),
narayanaProperties.getRecoveryJmsCredentials());
narayanaProperties.getJmsRecoveryProperties());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ void allDefaultBeansShouldBeLoaded() {
}

@Test
void recoveryDbCredentialsShouldBeLoaded() {
void recoveryDbRecoveryPropertiesShouldBeLoaded() {
Properties properties = new Properties();
properties.put("narayana.recoveryDbCredentials.user", "userName");
properties.put("narayana.recoveryDbCredentials.password", "password");
properties.put("narayana.dbRecoveryProperties.user", "userName");
properties.put("narayana.dbRecoveryProperties.password", "password");
PropertiesPropertySource propertySource = new PropertiesPropertySource("test", properties);

this.context = new AnnotationConfigApplicationContext();
Expand All @@ -84,15 +84,15 @@ void recoveryDbCredentialsShouldBeLoaded() {
this.context.refresh();

NarayanaProperties narayanaProperties = this.context.getBean(NarayanaProperties.class);
assertThat(narayanaProperties.getRecoveryDbCredentials().getUser()).isEqualTo("userName");
assertThat(narayanaProperties.getRecoveryDbCredentials().getPassword()).isEqualTo("password");
assertThat(narayanaProperties.getDbRecoveryProperties().getUser()).isEqualTo("userName");
assertThat(narayanaProperties.getDbRecoveryProperties().getPassword()).isEqualTo("password");
}

@Test
void recoveryJmsCredentialsShouldBeLoaded() {
void recoveryJmsRecoveryPropertiesShouldBeLoaded() {
Properties properties = new Properties();
properties.put("narayana.recoveryJmsCredentials.user", "userName");
properties.put("narayana.recoveryJmsCredentials.password", "password");
properties.put("narayana.jmsRecoveryProperties.user", "userName");
properties.put("narayana.jmsRecoveryProperties.password", "password");
PropertiesPropertySource propertySource = new PropertiesPropertySource("test", properties);

this.context = new AnnotationConfigApplicationContext();
Expand All @@ -101,8 +101,8 @@ void recoveryJmsCredentialsShouldBeLoaded() {
this.context.refresh();

NarayanaProperties narayanaProperties = this.context.getBean(NarayanaProperties.class);
assertThat(narayanaProperties.getRecoveryJmsCredentials().getUser()).isEqualTo("userName");
assertThat(narayanaProperties.getRecoveryJmsCredentials().getPassword()).isEqualTo("password");
assertThat(narayanaProperties.getJmsRecoveryProperties().getUser()).isEqualTo("userName");
assertThat(narayanaProperties.getJmsRecoveryProperties().getPassword()).isEqualTo("password");
}

@Test
Expand Down