Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18039

Support DeltaSpike's PartialBean dynamically implemented interfaces and Data repositories

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • 4.2.0.CR1
    • None
    • cdi-extensions
    • None

    Description

      JBDS currently shows No bean is eligible for injection to the injection point for injection points which are implemented using DeltaSpike's PartialBean extension. This also affects DeltaSpike's Data module, which is based on PartialBean.

      The injection point:

      QueryServiceTest.java
      @Inject
      private PersonQueryService personQueryService;
      

      The injected interface:

      PersonQueryService.java
      @RequestScoped
      @QueryServiceBinding
      public interface PersonQueryService {
      ...
      

      A partial bean binding annotation:

      QueryServiceBinding.java
      @PartialBeanBinding
      @Target(TYPE)
      @Retention(RUNTIME)
      public @interface QueryServiceBinding {
      }
      

      The handler:

      QueryServicePartialBean.java
      @RequestScoped
      @QueryServiceBinding
      public class QueryServicePartialBean implements InvocationHandler {
          public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      ...
      

      There's no implementing class directly in the project, and that's what JBDS is complaining about. The interface is implemented dynamically, using an extension which looks for:

      • interfaces and abstract classes annotated with a partial bean binding
      • invocation handlers which handle calls to methods of those interfaces

      and then adds beans for those interfaces in the ABD phase.

      The same goes for DS Data module's @Repository ( = a partial bean binding) beans.

      JBDS should not show the no-bean-eligible warning for dynamically implemented interfaces or for DS Data repositories and should instead point to the invocation handler associated with those interfaces through the partial bean binding.

      Attachments

        Issue Links

          Activity

            People

              scabanovich Viacheslav Kabanovich (Inactive)
              rsmeral Ron Šmeral (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: