Skip to content
Permalink
Browse files
Added some more log messages.
  • Loading branch information
myrle-krantz committed Dec 20, 2017
1 parent 68b736f commit 75e3dcca82d6cdd4f5edccfd8f3421cc657c1166
Showing 2 changed files with 11 additions and 2 deletions.
@@ -62,6 +62,7 @@ public Drummer(
@Scheduled(initialDelayString = "${rhythm.beatCheckRate}", fixedRateString = "${rhythm.beatCheckRate}")
@Transactional
public synchronized void checkForBeatsNeeded() {
logger.info("checkForBeatsNeeded begin.");
//In it's current form this function cannot be run in multiple instances of the same service. We need to get
//locking on selected entries corrected here, before this will work.
try {
@@ -97,6 +98,7 @@ public synchronized void checkForBeatsNeeded() {
logger.info("InvalidDataAccessResourceUsageException in check for scheduled beats, probably " +
"because initialize hasn't been called yet. {}", e);
}
logger.info("checkForBeatsNeeded end.");
}

@Transactional
@@ -15,9 +15,12 @@
*/
package io.mifos.rhythm.service.internal.service;

import io.mifos.rhythm.service.ServiceConstants;
import io.mifos.rhythm.service.internal.repository.ApplicationEntity;
import io.mifos.rhythm.service.internal.repository.ApplicationRepository;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@@ -32,19 +35,23 @@
public class IdentityPermittableGroupService {
private final ApplicationRepository applicationRepository;
private final BeatPublisherService beatPublisherService;
private final Logger logger;

@Autowired
public IdentityPermittableGroupService(
final ApplicationRepository applicationRepository,
final BeatPublisherService beatPublisherService) {
final ApplicationRepository applicationRepository,
final BeatPublisherService beatPublisherService,
@Qualifier(ServiceConstants.LOGGER_NAME) final Logger logger) {
this.applicationRepository = applicationRepository;
this.beatPublisherService = beatPublisherService;
this.logger = logger;
}

public synchronized boolean checkThatApplicationHasRequestForAccessPermission(
final String tenantIdentifier,
final String applicationIdentifier) {
try {
logger.info("checkThatApplicationHasRequestForAccessPermission begin");
return checkThatApplicationHasRequestForAccessPermissionHelper(tenantIdentifier, applicationIdentifier);
}
catch (final DataIntegrityViolationException e) {

0 comments on commit 75e3dcc

Please sign in to comment.