Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Added some more log messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
myrle-krantz committed Dec 20, 2017
1 parent 68b736f commit 75e3dcc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 75e3dcc

Please sign in to comment.