Tapestry 5
  1. Tapestry 5
  2. TAP5-230

Defining a service that implements the HibernateConfigurer service causes injection exceptions (due to the ambiguity)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.0.16
    • Component/s: tapestry-hibernate
    • Labels:
      None

      Description

      the injection of the HibernateConfigurer to the HibernateSessionSource service needs to be qualified. the ioc container creates an exception if another service with the same interface is defined (even when fully qualified)

      public static void contributeHibernateSessionSource(
      OrderedConfiguration<HibernateConfigurer> config,
      HibernateConfigurer defaultHibernateConfigurer,
      ObjectLocator locator)

      should be:

      public static void contributeHibernateSessionSource(
      OrderedConfiguration<HibernateConfigurer> config,
      @Service("DefaultHibernateConfigurer") HibernateConfigurer defaultHibernateConfigurer,
      ObjectLocator locator)

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Solved with the handy @Local annotation.

        Show
        Howard M. Lewis Ship added a comment - Solved with the handy @Local annotation.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development