Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
adding another @Lazy was needed to fix integ tests, hitting a circular dependency issue.
The file in question is AuthenticationManager.
@Service
@Named("isis.security.AuthenticationManager")
@Priority(PriorityPrecedence.FIRST)
public class AuthenticationManager {
@Getter private final @NonNull Can<Authenticator> authenticators;
private final Map<String, String> userByValidationCode = _Maps.newConcurrentHashMap();
private final @NonNull InteractionService interactionService;
private final @NonNull RandomCodeGenerator randomCodeGenerator;
private final @NonNull Can<Registrar> registrars;
private final @NonNull List<UserMementoRefiner> userMementoRefiners;
@Inject
public AuthenticationManager(
final List<Authenticator> authenticators,
// needs @Lazy due to circular provisioning dependency
final @Lazy InteractionService anonymousInteractionFactory,
final RandomCodeGenerator randomCodeGenerator,
final @Lazy List<UserMementoRefiner> userMementoRefiners) {
I made a local copy of the service and set the priority. It was adding @Lazy to userMementoRefiners that did the trick.