Daniel Keir Haywood created ISIS-2886:
-----------------------------------------
Summary: @Lazy may be required for AuthenticationManager
Key: ISIS-2886
URL: https://issues.apache.org/jira/browse/ISIS-2886
Project: Isis
Issue Type: Improvement
Reporter: Daniel Keir Haywood
Fix For: 2.0.0
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.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)