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

Mark Struberg (JIRA) jira-events at lists.jboss.org
Thu Apr 4 13:40:44 EDT 2013


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

Mark Struberg commented on CDI-362:
-----------------------------------

> Still would need to tackle the @Stateful @SomeCdiScope case

~pmuir yes I can elaborate: think about a 

{code}
@Stateful 
@SessionScoped 
public class MyBackingBean {...
{code}

It gets the lifecycle from CDI. It's Contextual Instances will get stored in the SessionContext from CDI. But still it's an EJB. Which proxy will it get? I assume it will get stored in the SessionContext _with_ the 1:1 EJB proxy already applied, right? And we will _outside_ in BeanManager#getReference() return a CDI NormalScoping proxy?
So we have proxies from both CDI and EJB involved - thus what rules shall apply?
                
> 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