[cdi-dev] [JBoss JIRA] (CDI-362) No-interface view EJB proxying rules are less strict than CDI, leading to odd error reporting

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Tue Apr 2 16:40:43 EDT 2013


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

Jozef Hartinger commented on CDI-362:
-------------------------------------

I find this scary as a user may be doing this accidentally and they may not realize the mistake until runtime. Even at runtime the methods would be invoked on the client proxy instance so the methods may happen to seem to be working and not cause a failure until much later (e.g. when the state set by these method invocation won't be available after activation).

Of course this is an unlikely scenario though it makes me wonder whether non-public final methods on a session bean with bean class local view (not very common construct) are worth it.
                
> No-interface view EJB proxying rules are less strict than CDI, leading to odd error reporting
> ---------------------------------------------------------------------------------------------
>
>                 Key: CDI-362
>                 URL: https://issues.jboss.org/browse/CDI-362
>             Project: CDI Specification Issues
>          Issue Type: Bug
>            Reporter: Pete Muir
>             Fix For: 1.1.FD
>
>
> E.g.
> // allowed by EJB
> // disallowed by CDI
> @Stateful @RequestScoped
> public class MyBean {
>     final void m() { };
> }
> public class Other {
>    @EJB MyBean field; // PASS
>    @Inject MyBean field; // FAIL - unproxyable
> }

--
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


More information about the cdi-dev mailing list