[
https://issues.apache.org/jira/browse/CAUSEWAY-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Keir Haywood updated CAUSEWAY-2886:
------------------------------------------
Fix Version/s: 2.0.0-RC1
(was: 2.0.0)
> [NOT A PROBLEM] @Lazy may be required for AuthenticationManager
> ---------------------------------------------------------------
>
> Key: CAUSEWAY-2886
> URL: https://issues.apache.org/jira/browse/CAUSEWAY-2886
> Project: Causeway
> Issue Type: Improvement
> Reporter: Daniel Keir Haywood
> Priority: Minor
> Fix For: 2.0.0-RC1
>
>
> 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.10#820010)