[JBoss JIRA] (CDI-271) Provide a way to inject Event metadata into an observer method
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-271?page=com.atlassian.jira.plugin.sy... ]
Pete Muir resolved CDI-271.
---------------------------
Resolution: Done
I've merged Arne's changes, and updated the javadoc as well
> Provide a way to inject Event metadata into an observer method
> --------------------------------------------------------------
>
> Key: CDI-271
> URL: https://issues.jboss.org/browse/CDI-271
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Events
> Reporter: Arne Limburg
> Assignee: Arne Limburg
> Fix For: 1.1.PFD
>
>
> Currently there is no way for observer methods to access the qualifiers of the fired event (i.e. to access @Nonbinding members).
> Consider the following example:
> {code}
> @Inject @MyQualifier
> Event<MyObject> event;
> public void fireEvent(MyObject object, MyTypeValue type) {
> event.select(new MyTypeAnnotationLiteral(type)).fire(object);
> }
> {code}
> Currently no observer can receive the value of MyTypeValue. I suggest to introduce an interface AnnotatedEvent that extends Annotated and contains this information. It then could be injected via the InjectionPoint like this:
> {code}
> public void observeEvent(@Observes @MyType MyObject object, InjectionPoint ip) {
> MyType annotation = ip.getAnnotated().getAnnotation(MyType.class);
> MyTypeValue value = annotation.value();
> ...
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (CDI-147) Are EJB's not deployed in a bean archive eligible for CDI injection
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-147?page=com.atlassian.jira.plugin.sy... ]
Pete Muir updated CDI-147:
--------------------------
Fix Version/s: TBD
(was: 1.1.PFD)
> Are EJB's not deployed in a bean archive eligible for CDI injection
> -------------------------------------------------------------------
>
> Key: CDI-147
> URL: https://issues.jboss.org/browse/CDI-147
> Project: CDI Specification Issues
> Issue Type: Tracker
> Affects Versions: 1.0
> Reporter: Stuart Douglas
> Fix For: TBD
>
>
> If an EJB is deployed in an ejb-jar without a beans.xml, is this EJB eligible for CDI injection of beans deployed in other modules?
> The spec says:
> "The container performs dependency injection on all session and message-driven bean instances, even those which are not
> contextual instances."
> To me this sounds like the intent was to allow injection into EJB's looked up from JNDI, does this also mean that EJB's in non bean archives should also be injected?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (CDI-169) Remove the 'No type variable in event objects' restriction
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-169?page=com.atlassian.jira.plugin.sy... ]
Pete Muir resolved CDI-169.
---------------------------
Assignee: Pete Muir
Resolution: Done
This got fixed as part of CDI-256, when we changed it to disallow *unresolvable* type variables. We defined that an unresolvable type variable is one which can't be inferred from the Event injection point.
> Remove the 'No type variable in event objects' restriction
> ----------------------------------------------------------
>
> Key: CDI-169
> URL: https://issues.jboss.org/browse/CDI-169
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Affects Versions: 1.0
> Reporter: Stuart Douglas
> Assignee: Pete Muir
> Fix For: 1.1.PFD
>
>
> CDI 10.1 states:
> An event object is an instance of a concrete Java class with no type variables. ... An event type may not contain a type variable.
> Which seems silly considering the container fires events with a type variable at startup. I can't think of any reason why this should be prohibited.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (CDI-158) Extension support for non CDI beans
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-158?page=com.atlassian.jira.plugin.sy... ]
Pete Muir updated CDI-158:
--------------------------
Fix Version/s: TBD
(was: 1.1 (Proposed))
> Extension support for non CDI beans
> -----------------------------------
>
> Key: CDI-158
> URL: https://issues.jboss.org/browse/CDI-158
> Project: CDI Specification Issues
> Issue Type: Tracker
> Components: Java EE integration
> Affects Versions: 1.0
> Reporter: Aslak Knutsen
> Fix For: TBD
>
>
> CDI Extensions in EE6 can only rewrite/change/work upon CDI registered beans. This should be extended to include _any_ EE component.
> e.g.
> * Change/Add @Resource InjectionPoint in a EJB
> * Change/Add @Path on JAX-RS Resource handlers
> * Change/Add @MassageDriven on a MDB
> * Change/Add JPA Annotations
> * Change/Add @TransactionAttributes on EJBs
> * Change/Add @RunAs on EJBs
> * Change/Add @WebService on EJBs
> * Change/Add @WebServlet etc. on Servlets
> * Change/Add @Timer on EJB
> ++++
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years