Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOTECH-3118: Deleted unnecessary Transactional annotations. #523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -111,13 +111,11 @@ public void markConfigAsDefault(String name) {
}

@Override
@Transactional
public Configs getConfigs() {
return configs;
}

@Override
@Transactional
public Config getConfigByName(String name) {
Config config = StringUtils.isEmpty(name) ?
configs.getByName(configs.getDefaultConfigName()) : configs.getByName(name);
Expand All @@ -130,7 +128,6 @@ public Config getConfigByName(String name) {
}

@Override
@Transactional
public Config getDefaultConfig() {
return configs.getByName(configs.getDefaultConfigName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public Patient createPatient(String configName, Patient patient) {
personResource.checkPersonAttributeTypes(config, patient.getPerson());
patient.setPerson(personResource.createPerson(config, patient.getPerson()));
} catch (HttpClientErrorException e) {
if(StringUtils.equals("401 Unauthorized", e.getMessage())) {
LOGGER.info(String.format("%s: User: %s Password: %s.\n", e.getMessage(), config.getUsername(), config.getPassword()));
}

throw new OpenMRSException(String.format("Could not create Person. %s %s", e.getMessage(), e.getResponseBodyAsString()), e);
}
}
Expand Down