Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1646

Binding services by interface and name

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 5.0.5
    • None
    • tapestry-ioc
    • None

    Description

      I have a utility I want to implement for our CMS which will create and bind default DAO service implements for various entity types. These services typically don't have their own interface and are referenced by the base interface and the service name. For instance, for a Widget entity it would look like this:

      @Inject
      private Dao<Widget> widgetService;

      so when create the services you have to do something like this for all entities:

      public static Dao<Widget> buildWidgetService()

      { ... }

      but I'd like to do something like this:

      public static void bind(ServiceBinder binder) {
      binder.bind(Dao.class, "widgetService", new DaoImpl(Widget.class));
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            hagios17 Dan Adams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: