[jbosstools-issues] [JBoss JIRA] (JBIDE-18039) Support DeltaSpike's PartialBean dynamically implemented interfaces and Data repositories

Ron Šmeral (JIRA) issues at jboss.org
Mon Aug 4 10:58:55 EDT 2014


Ron Šmeral created JBIDE-18039:
----------------------------------

             Summary: Support DeltaSpike's PartialBean dynamically implemented interfaces and Data repositories
                 Key: JBIDE-18039
                 URL: https://issues.jboss.org/browse/JBIDE-18039
             Project: Tools (JBoss Tools)
          Issue Type: Feature Request
          Components: cdi-extensions
         Environment: JBDS 8.0.0.Beta3
            Reporter: Ron Šmeral


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.

This can be seen e.g. in the deltaspike-partialbean-advanced quickstart: https://github.com/jboss-developer/jboss-wfk-quickstarts/tree/2.7.x-develop/deltaspike-partialbean-advanced

The injection point: 
{code:java|title=QueryServiceTest.java}
@Inject
private PersonQueryService personQueryService;
{code}

The injected interface:
{code:java|title=PersonQueryService.java}
@RequestScoped
@QueryServiceBinding
public interface PersonQueryService {
...
{code}

A partial bean binding annotation:
{code:java|title=QueryServiceBinding.java}
@PartialBeanBinding
@Target(TYPE)
@Retention(RUNTIME)
public @interface QueryServiceBinding {
}
{code}

The handler:
{code:java|title=QueryServicePartialBean.java}
@RequestScoped
@QueryServiceBinding
public class QueryServicePartialBean implements InvocationHandler {
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
...
{code}

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.



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)



More information about the jbosstools-issues mailing list