[JBoss JIRA] (CDI-513) Clarify whether passivating pseudo-scopes are valid
by Mark Struberg (JIRA)
[ https://issues.jboss.org/browse/CDI-513?page=com.atlassian.jira.plugin.sy... ]
Mark Struberg commented on CDI-513:
-----------------------------------
{quote}
Passivating scopes must be explicitly declared @NormalScope(passivating=true).
{quote}
This would effectively render the whole addScope Extension method useless...
How would you add a scope for the JSF @ViewScoped annotation in that case? (This annotation is neither @NormalScoped nor @Scope).
I suggest we remove this whole sentence as it contradicts other spec parts.
> 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)
9 years, 9 months
DefinitionException vs DeploymentException
by Mark Struberg
Hi!
I think we currently fail to have a clean notion about what should be a DefinitionException and what should be a DeploymentException.
It seems like most of the TCK in this regard is just modelling Weld behaviour and follows no whatever logic.
E.,g. we have 2 tests doing almost the same:
org.jboss.cdi.tck.tests.extensions.lifecycle.bbd.broken.passivatingScope.AddingPassivatingScopeTest
Which according to the TCK should throw a DefinitionException
and
org.jboss.cdi.tck.tests.context.passivating.broken.NonPassivationManagedBeanHasPassivatingScopeTest
which according to the TCK should throw a DeploymentException
But BOTH actually do the same: they test if some managed bean implements Serializable. And both do this during bootstrap.
Am I blind and don’t see the difference, or is all this just madly broken?
LieGrue,
strub
9 years, 9 months
[JBoss JIRA] (CDI-513) Clarify whether passivating pseudo-scopes are valid
by Jozef Hartinger (JIRA)
[ https://issues.jboss.org/browse/CDI-513?page=com.atlassian.jira.plugin.sy... ]
Jozef Hartinger updated CDI-513:
--------------------------------
Summary: Clarify whether passivating pseudo-scopes are valid (was: AddingPassivatingScopeTest is illegal as addScope for passivating non-normalscopes is perfectly fine)
> 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)
9 years, 9 months
[JBoss JIRA] (CDI-513) AddingPassivatingScopeTest is illegal as addScope for passivating non-normalscopes is perfectly fine
by Jozef Hartinger (JIRA)
[ https://issues.jboss.org/browse/CDI-513?page=com.atlassian.jira.plugin.sy... ]
Jozef Hartinger commented on CDI-513:
-------------------------------------
Dear EG,
please clarify whether the notion of a passivating pseudo-scope is valid in CDI. The following indirect evidence seems to contradict this:
1) There is no way to mark a pseudo-scope as passivating using annotations. Using BeforeBeanDiscovery.addScope(annotation, false, true) therefore looks like a possible hack (misuse of lenient signature) instead of an intended use case.
2) The author of the BeforeBeanDiscovery API himself implemented a check which treats passivating pseudo-scopes as invalid. See https://issues.jboss.org/browse/WELD-307 for details. The same author implemented the TCK test mentioned in https://issues.jboss.org/browse/CDITCK-466
3) 6.6.4 says:
{quote}
Passivating scopes must be explicitly declared @NormalScope(passivating=true).
{quote}
On the other hand, if passivating pseudoscopes were allowed it should not conflict with anything and this feature may be useful for certain use cases.
> AddingPassivatingScopeTest is illegal as addScope for passivating non-normalscopes is perfectly fine
> ----------------------------------------------------------------------------------------------------
>
> 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)
9 years, 9 months
[JBoss JIRA] (CDI-513) AddingPassivatingScopeTest is illegal as addScope for passivating non-normalscopes is perfectly fine
by Mark Struberg (JIRA)
Mark Struberg created CDI-513:
---------------------------------
Summary: AddingPassivatingScopeTest is illegal as addScope for passivating non-normalscopes is perfectly fine
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)
9 years, 9 months
[JBoss JIRA] (CDI-512) Initialization parameter to specify loaded Extensions
by John Ament (JIRA)
John Ament created CDI-512:
------------------------------
Summary: Initialization parameter to specify loaded Extensions
Key: CDI-512
URL: https://issues.jboss.org/browse/CDI-512
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Java SE Integration
Reporter: John Ament
Assignee: John Ament
As a tie in for CDI-511, define a initialization parameter that can specify the list of extensions to be enabled.
The parameter should accept any Collection, however if a duplicate entry is found it is ignored.
The collection should support either Classes or Strings representing the FQCN of the extension itself, or the extension instance.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (CDI-511) Java SE bootstrap parameter to disable extension loading
by John Ament (JIRA)
John Ament created CDI-511:
------------------------------
Summary: Java SE bootstrap parameter to disable extension loading
Key: CDI-511
URL: https://issues.jboss.org/browse/CDI-511
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Java SE Integration
Reporter: John Ament
Assignee: John Ament
We should define a standard parameter when initializing a CDIContainer that allows a user to not load any portable extensions defined in META-INF/services/javax.enterprise.inject.spi.Extension
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (CDI-510) Update JCP license
by John Ament (JIRA)
John Ament created CDI-510:
------------------------------
Summary: Update JCP license
Key: CDI-510
URL: https://issues.jboss.org/browse/CDI-510
Project: CDI Specification Issues
Issue Type: Bug
Reporter: John Ament
Update the JCP license file to reflect CDI 2.0, JSR 365 (instead of JSR 346)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (CDI-509) Upgrade to latest felix plugin in API JAR
by John Ament (JIRA)
John Ament created CDI-509:
------------------------------
Summary: Upgrade to latest felix plugin in API JAR
Key: CDI-509
URL: https://issues.jboss.org/browse/CDI-509
Project: CDI Specification Issues
Issue Type: Feature Request
Reporter: John Ament
Assignee: John Ament
Upgrade to the latest felix plugin in the API JAR to allow the API to include lambdas (version 2.5.3)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
Upgrading the Felix plugin
by John D. Ament
All,
I found that the current version of the felix plugin used in the CDI
project doesn't support lambdas. I'm planning to upgrade it to the latest,
and wanted to confirm
This section of the pom should now read 2.0 right? not 1.1?
javax.decorator;version=1.1,
javax.enterprise.*;version=1.1,
John
9 years, 9 months