[JBoss JIRA] (CDI-294) Clarify that a Java EE component definition never results in a managed bean being created
by Jozef Hartinger (JIRA)
Jozef Hartinger created CDI-294:
-----------------------------------
Summary: Clarify that a Java EE component definition never results in a managed bean being created
Key: CDI-294
URL: https://issues.jboss.org/browse/CDI-294
Project: CDI Specification Issues
Issue Type: Clarification
Components: Beans, Java EE integration
Affects Versions: 1.0
Reporter: Jozef Hartinger
Assignee: Pete Muir
Fix For: 1.1 (Proposed)
Having e.g. a Servlet that matches managed bean requirements, there is nothing in the spec saying that the container should not take the servlet class and make a managed bean out of it. This results in ProcessInjectionTarget being fired twice. Furthermore, it does not actually make any sense to have Java EE component definitions (e.g. Servlets) to act as managed beans.
--
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
12 years
[JBoss JIRA] (CDI-304) Clarify Producers for injection into generic types
by Mark Struberg (JIRA)
Mark Struberg created CDI-304:
---------------------------------
Summary: Clarify Producers for injection into generic types
Key: CDI-304
URL: https://issues.jboss.org/browse/CDI-304
Project: CDI Specification Issues
Issue Type: Clarification
Components: Beans
Affects Versions: 1.1.PRD
Reporter: Mark Struberg
There is a discussion over in DeltaSpike whether an injection point
{code}
@Inject
private JsfMessage<SomeMessageClass>;
{code}
with a producer method
{code}
@Produces @Dependent
JsfMessage createMessage(InjectionPoint ip)
{code}
5.2 imo only defines the other way around. Having a raw type at the injection point and a parameterized producer method.
We should define how this is intended to work.
Please note that the producer above works in all existing containers so far but not in Weld2-beta1.
--
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
12 years, 1 month
[JBoss JIRA] (CDI-305) Reflect the new EJB passivation-capable flag in CDI
by Pete Muir (JIRA)
Pete Muir created CDI-305:
-----------------------------
Summary: Reflect the new EJB passivation-capable flag in CDI
Key: CDI-305
URL: https://issues.jboss.org/browse/CDI-305
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Java EE integration
Affects Versions: 1.1.PRD
Reporter: Pete Muir
Fix For: 1.1 (Proposed)
EJB 3.2 adds the ability to disable passivation of SFSB by either using @Stateful(passivationCapable=false) or setting it in the DD.
We should update the CDI spec to cover this.
--
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
12 years, 1 month
[Vote] @ApplicationScoped and visibility
by Pete Muir
CDI EG members,
Please vote on the following two issues by indicating whether you prefer either option (a) or (b) to both questions (1) and (2). Please vote asap, voting closes as soon as I have a complete set of votes from the EG or at COB (Eastern) on 30th Nov, whichever happens sooner :-)
Question 1, Visibility
---------------------------
The CDI 1.0 specification states that only beans whose bean class is accessible (using standard classloader visibility rules) can be injected into another bean. For example, if you have a bean A in WAR, assuming standard Java EE classloader structure, it wouldn't be available for injection in bean B, in an EJB modiule. This generally makes sense, as the type is not visible either.
CDI also offers two options to replace bean implementations transparently, without explicitly selecting that implementation (either by type or using a qualifier) - alternatives and specialization.
First, let's consider specialization. For example, if bean B, from the example above, is specialized by bean S in the WAR, and bean C in the same EJB module as B injects a type B, then what should be injected (if anything). The CDI 1.0 specification addresses this issue by disabling any bean which has been specialized across the entire application. Therefore, according to CDI 1.0, this would result in an deployment problem (as there would be an unsatisfied injection point).
Alternatives are addressed a little differently in CDI 1.0. For example, if bean B has an alternative A packaged in the WAR, then if A is selected in the war only, then if bean C in the same EJB module as B injects a type B, it would be injected with C. However, if A is selected for the EJB module as well, then the deployment should fail as beans.xml of the EJB module references S which it cannot see. Note that we have also added global visibility for alternatives in CDI 1.1, which may need revising based on what is decided here.
The EG has debated two options.
(a) maintain the status quo, as described by the CDI 1.0 spec
(b) take an approach where visibility is isolated according to the calling context. Thus, if a call originates via the WAR, then specialization and enabled alternatives in the WAR are visible to any bean which is called in that stack.
Approximately, Weld takes approach (a), and OWB takes approach (b), so which approach is more backwards compatible here is debatable.
Question 2, @ApplicationScoped
---------------------------------------------
CDI implementations have not consistently shared @ApplicationScoped beans across all modules of an EAR. Weld, and app servers built on Weld (those that we have surveyed include JBoss AS, GlassFish, WebLogic) have shared application scoped beans across the EAR. OWB isolates @ApplicationScoped beans to the calling context of the WAR, however applications servers built on OWB have shared beans across all modules of an EAR (this is certainly true of WebSphere, and I believe it is true of TomEE).
The EG has debated two options.
(a) require @ApplicationScoped beans to be shared across all modules of an EAR
(b) take an approach where @ApplicationScoped beans are isolated to the calling context
Whichever approach is taken, the EG is agreed that a scope that addresses the other option should be introduced.
So, please indicated which options you favour:
Question 1: (a) OR (b)
Question 2: (a) OR (b)
Thanks,
Pete
12 years, 1 month