[cdi-dev] [JBoss JIRA] Commented: (CDI-113) Add some design time readable metadata for built-in beans of CDI-implementations.

Pete Muir (JIRA) jira-events at lists.jboss.org
Wed Apr 27 07:01:18 EDT 2011


    [ https://issues.jboss.org/browse/CDI-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598292#comment-12598292 ] 

Pete Muir commented on CDI-113:
-------------------------------

{quote}
{quote}Alexey, can you give example of why tools needs to know this - how would it represent this info to the user?{quote}

@Inject BeanManager manager;
JBoss Tools used to complain that no bean is eligible for "@Inject BeanManager manager;" until we hardcoded BeanManagerImpl (for Weld) as a special bean.
{quote}

I don't think you should be making BeanManagerImpl available for injection, just BeanManager (which all impls *must* provide). So hardcode BeanManager, not BeanManagerImpl.

{quote}{quote}I don't understand this problem, why do you need to do this?{quote}

How we can find actual bean classes without scanning the entire class path? So far we just hardcoded weld-*.jars name template and scan such jars along with jars which contain beans.xml.{quote}

Why do you need to find actual bean classes? All that you should be making available is the interfaces provided by the spec.

I think we need to talk about this offline as there is clearly a misunderstanding here, which I think may stem from the way we did things in Seam 2.

> Add some design time readable metadata for built-in beans of CDI-implementations.
> ---------------------------------------------------------------------------------
>
>                 Key: CDI-113
>                 URL: https://issues.jboss.org/browse/CDI-113
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Alexey Kazakov
>
> We need such metadata for tooling.
> It would be very helpful to have some metadata for beans which implement spec required services (BeanManager, ...)
> Or for any other beans which CDI implementations register programmatically and which should be available for users.
> For example Weld loads some beans from jars which don't have beans.xml but some of those beans are available for injections.
> So far we don't have any documented way to recognize such beans.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list