Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-654

Revisit BeanConfigurator create/destroy methods

    XMLWordPrintable

Details

    • Clarification
    • Resolution: Done
    • Major
    • 2.0 .Final
    • None
    • None
    • None

    Description

      Right now, there are four methods to create/producer bean instance and two methods to destroy/dispose bean instance:

      • createWith(Function<CreationalContext<U>, U> callback)
      • <U extends T> BeanConfigurator<U> produceWith(Supplier<U> callback)
      • <U extends T> BeanConfigurator<U> produceWith(Function<Instance<Object>, U> callback)
      • <U extends T> BeanConfigurator<U> producing(U instance)
      • destroyWith(BiConsumer<T, CreationalContext<T>> callback)
      • disposeWith(Consumer<T> callback)

      I think we should:

      • remove producing() and produceWith(Supplier<U> callback) methods
      • clarify that Instance<Object> is used to "simulate" producer method injection points and behaves in the same way
      • modify disposeWith(Consumer<T> callback) to disposeWith(BiConsumer<T, Instance<Object>> callback) so that it's possible to "simulate" disposer method injection points

      Attachments

        Activity

          People

            mkouba@redhat.com Martin Kouba
            mkouba@redhat.com Martin Kouba
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: