Tapestry
  1. Tapestry
  2. TAPESTRY-1425

Eager Loaded service (builder) cannot use object injection

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.4
    • Fix Version/s: 5.0.5
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      A service which is EagerLoaded cannot use object injection, it must use InjectService.

      If the eager loaded service uses object injection then it will cause an error because the alias service has not had its mode set when eager loaded services are created.

      e..g This builder method results in an error
      @EagerLoad
      public RegistryShutdownListener buildFileCleanerCleanup( RegistryShutdownHub hub)

      When service injection is used it is ok.
      @EagerLoad
      public RegistryShutdownListener buildFileCleanerCleanup(@InjectService("RegistryShutdownHub") RegistryShutdownHub hub)

      Not sure if this can actually be fixed, or if it just needs to be documented.

        Issue Links

          Activity

          Ben Sommerville created issue -
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Link This issue is part of TAPESTRY-1497 [ TAPESTRY-1497 ]
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 5.0.5 [ 12312477 ]
          Mark Thomas made changes -
          Workflow jira [ 12402402 ] Default workflow, editable Closed status [ 12567792 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12567792 ] jira [ 12590920 ]

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Ben Sommerville
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development