[cdi-dev] [JBoss JIRA] (CDI-545) Clarify that observers can't be remote business method

Tomas Remes (JIRA) issues at jboss.org
Thu Oct 29 10:32:00 EDT 2015


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

Tomas Remes commented on CDI-545:
---------------------------------

https://github.com/cdi-spec/cdi/pull/262

> Clarify that observers can't be remote business method 
> -------------------------------------------------------
>
>                 Key: CDI-545
>                 URL: https://issues.jboss.org/browse/CDI-545
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Java EE integration
>    Affects Versions: 1.2.Final
>            Reporter: Antoine Sabot-Durand
>
> In section 10.4 of 1.2 spec we have:
> {quote}
> If the bean is a session bean, the observer method must be either a business method of the EJB or a static method of the bean class.
> {quote}
> in 10.4.2 we also have:
> {quote}
> If a non-static method of a session bean class has a parameter annotated {{@Observes}}, and the method is not a business method of the EJB, the container automatically detects the problem and treats it as a definition error.
> {quote}
> This 2 assertions don't prevent an observer to be a business method of a remote client of an EJB. We should be more precise here and forbid this scenario.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list