[cdi-dev] [JBoss JIRA] Updated: (CDI-137) Changing ProcessManagedBean getBean Method Signature

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu Jun 23 08:11:23 EDT 2011

     [ https://issues.jboss.org/browse/CDI-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir updated CDI-137:

    Fix Version/s: TBD
                       (was: 1.1 (Confirmed))

Just a gentle reminder, please do not set the Fix Version when filing an issue.

I am putting this in TBD for now. Gurkan, if you, or someone else wants to sponsor this issue (write the spec changes, API changes and TCK tests) then we can move it to 1.1.

> Changing ProcessManagedBean getBean Method Signature
> ----------------------------------------------------
>                 Key: CDI-137
>                 URL: https://issues.jboss.org/browse/CDI-137
>             Project: CDI Specification Issues
>          Issue Type: Bug
>          Components: Portable Extensions
>    Affects Versions: 1.0
>            Reporter: Gurkan Erdogdu
>             Fix For: TBD
> Currently ProcessSessionBean class signature is
> public class ProcessSessionBean<T> extends ProcessManagedBean<Object>{}
> Therefore, observers work as
> Example: 
> @Stateless
> public class Elephant{}
> public void observe(ProcessBean<Elephant>) --> Not allowed
> public void observe(ProcessSessionBean<Elephant>) --> Allowed
> Pete said that main reason of using ProcessManagedBean<Object> is that 
> "ProcessBean<X> offers a method getBean() which returns Bean<X>. Bean<X> has a method of type create() which returns an X. If we were to have ProcessSessionBean<X> extend ProcessManagedBean<X> then this would imply that you can create something of type, which in the case of a session bean is the bean class (which can't be created for EJBs with local or remote business interfaces). So ProcessSessionBean is correct as is."
> Main reason of using the ProcessSessionBean event is to observe "Session Bean Class" registration, not the observe for the session bean local interface/s.
> Moreover, other methods in the interface hierarchy of "ProcessSessionBean" gets <X> into the account, for example
> AnnotatedType<X> getAnnotatedBeanClass()
>           Returns the AnnotatedType representing the bean class.
> Therefore, it is more convenient to change "ProcessManagedBean getBean"  method  decleration as
> public <T> Bean<T> getBean(); where T is the local/local view interface of the session bean.
> And change the ProcessSessionBean signature as
> public class ProcessSessionBean<X> extends ProcessManagedBean<X>{}
> Also See https://issues.jboss.org/browse/CDITCK-215

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