Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2886

[NOT A PROBLEM] @Lazy may be required for AuthenticationManager

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-RC1
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: