[cdi-dev] [JBoss JIRA] (CDI-513) Clarify whether passivating pseudo-scopes are valid

Mark Struberg (JIRA) issues at jboss.org
Tue Mar 3 10:45:51 EST 2015


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

Mark Struberg commented on CDI-513:
-----------------------------------

Let's approach it from a different angle: does the combination non-normalscope AND passivating make sense?
Imo it does. This are all the use cases where CDI does not handle the lifecycle (nor applies a proxy) but we would like to get the Serializable check.

If anyone comes up with a blocker for this case then I'm perfectly happy to add a check that addScope(Xxx.class, false, true) is an illegal situation.
If not then it must get supported.

> Clarify whether passivating pseudo-scopes are valid
> ---------------------------------------------------
>
>                 Key: CDI-513
>                 URL: https://issues.jboss.org/browse/CDI-513
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>    Affects Versions: 1.2.Final
>            Reporter: Mark Struberg
>
> On behalf of Jozef I copied this to a CDI ticket... See CDITCK-466
> I personally think it is clear as there is no single word which forbids this and there is a very vocal description about the single flags.
> -----
> AddingPassivatingScopeTest is illegal as addScope for passivating non-normalscopes is perfectly fine.
> There is nothing in the spec which says that a non-normalscope cannot be passivating.
> The practical use case for this is e.g. when bridging over to Spring. Those beans might need to get checked for Serializable BUT spring brings it's own proxies. So we do not need to wrap it into just another normalscoping proxy.
> Actually the test should come in 2 flavours:
> 1.) RomanEmpire being Serializable -> all fine must work
> 2.) RomainEmpire not Serializable -> DefinitionException



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the cdi-dev mailing list