[JBoss JIRA] (CDI-211) Clarify BeanManager.createProducer()
by Jozef Hartinger (JIRA)
Jozef Hartinger created CDI-211:
-----------------------------------
Summary: Clarify BeanManager.createProducer()
Key: CDI-211
URL: https://issues.jboss.org/browse/CDI-211
Project: CDI Specification Issues
Issue Type: Clarification
Components: Portable Extensions
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Fix For: 1.1 (Proposed)
The specification defines a pair of BeanManager.createProducer() methods:
{code}
public Producer<?> createProducer(AnnotatedField<?> field);
public Producer<?> createProducer(AnnotatedMethod<?> method);
{code}
If cases when the field or method is not static, it is unclear which contextual instance the created producer should operate upon.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-210) BeanManager.createBean() should use type variables instead of wildcards
by Jozef Hartinger (JIRA)
Jozef Hartinger created CDI-210:
-----------------------------------
Summary: BeanManager.createBean() should use type variables instead of wildcards
Key: CDI-210
URL: https://issues.jboss.org/browse/CDI-210
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Portable Extensions
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Fix For: 1.1 (Proposed)
{code}
public Bean<?> createBean(BeanAttributes<?> attributes, Class<?> beanClass, InjectionTarget<?> injectionTarget)
public Bean<?> createBean(BeanAttributes<?> attributes, Class<?> beanClass, Producer<?> producer)
{code}
I propose:
{code}
public <T> Bean<T> createBean(BeanAttributes<T> attributes, Class<T> beanClass, InjectionTarget<T> injectionTarget)
public <T> Bean<T> createBean(BeanAttributes<T> attributes, Class<?> beanClass, Producer<T> producer);
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-190) Require deployment-time validation of injection points defined on observer and disposer methods
by Jozef Hartinger (Created) (JIRA)
Require deployment-time validation of injection points defined on observer and disposer methods
-----------------------------------------------------------------------------------------------
Key: CDI-190
URL: https://issues.jboss.org/browse/CDI-190
Project: CDI Specification Issues
Issue Type: Feature Request
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Fix For: 1.1.EDR2
The spec says:
{quote}
The container must validate all injection points of all enabled beans and of all other Java EE component classes supporting
injection when the application is initialized to ensure that there are no unsatisfied or unresolvable ambiguous dependen-
cies. If an unsatisfied or unresolvable ambiguous dependency exists, the container automatically detects the problem and
treats it as a deployment problem.
{quote}
This should be clarified to also include validation of injection points of observer and disposer methods of enabled beans.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] Created: (CDI-112) Clarify how alternatives are enabled
by Shane Bryzak (JIRA)
Clarify how alternatives are enabled
------------------------------------
Key: CDI-112
URL: https://issues.jboss.org/browse/CDI-112
Project: CDI Specification Issues
Issue Type: Clarification
Components: Beans
Affects Versions: 1.0
Reporter: Shane Bryzak
The spec is open to interpretation about how alternatives are enabled. One popular interpretation is that alternatives must be enabled within the same bean archive that contains the alternative bean. However, it might be worth considering the merit of enabling an alternative from a deployment archive that contains the bean archive.
For example, suppose we have the following deployment archive:
foo.war
/WEB-INF
beans.xml
/lib
bar.jar
/META-INF
beans.xml
/com
/acme
AlternativeBean.class
It may be worth allowing AlternativeBean.class (a class annotated with @Alternative) to be enabled by listing it in the <alternatives> section of foo.war/WEB-INF/beans.xml.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-202) Clarify when BeanManager.createBeanAttributes(AnnotatedMember) returns an alternative
by Jozef Hartinger (Created) (JIRA)
Clarify when BeanManager.createBeanAttributes(AnnotatedMember) returns an alternative
-------------------------------------------------------------------------------------
Key: CDI-202
URL: https://issues.jboss.org/browse/CDI-202
Project: CDI Specification Issues
Issue Type: Clarification
Components: Beans
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Fix For: 1.1 (Proposed)
Currently, a producer field/method is an alternative if it is annotated with @Alternative or an alternative stereotype or the class declaring the field/method is annotated this way. However, when the BeanManager.createBeanAttributes(AnnotatedMember) method is called, the container has no access to the bean that declares the member. Therefore, the specification should clarify whether the container
* should examine the AnnotatedType for @Alternative or alternative stereotypes
* should try to infer the declaring bean (probably not possible since multiple beans may exist, each of them possibly modified in the ProcessBeanAttributes phase, etc.)
* should make an assumption (e.g. the bean that declares the returned BeanAttributes is always assumed not to be an alternative)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-212) Clarify BeanManager.createBean()
by Jozef Hartinger (JIRA)
Jozef Hartinger created CDI-212:
-----------------------------------
Summary: Clarify BeanManager.createBean()
Key: CDI-212
URL: https://issues.jboss.org/browse/CDI-212
Project: CDI Specification Issues
Issue Type: Clarification
Components: Portable Extensions
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Fix For: 1.1 (Proposed)
It is unclear from the specification whether the BeanManager.createBean() method should ever return an implementation of the Decorator or Interceptor interface.
Method parameters of the createBean() method provide all the necessary information for constructing a Decorator implementation. Therefore, IMHO the method should return a container-provided Decorator implementation if the set of stereotypes returned by BeanAttributes.getStereotypes contains javax.decorator.Decorator.
On the other hand, Interceptors do not fit this model because the AnnotatedType of the bean class is not available to the method and using the reflection API to scan the bean class directly would not be consistent with the rest of the specification.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-204) Clarify ProcessInjectionPoint type parameters
by Jozef Hartinger (Created) (JIRA)
Clarify ProcessInjectionPoint type parameters
---------------------------------------------
Key: CDI-204
URL: https://issues.jboss.org/browse/CDI-204
Project: CDI Specification Issues
Issue Type: Clarification
Components: Portable Extensions
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Priority: Minor
Fix For: 1.1 (Proposed)
{quote}
The container must fire an event for every injection point of every Java EE component class supporting injection that may
be instantiated by the container at runtime.
The event object must be of type javax.enterprise.inject.spi.ProcessInjectionPoint<T,X> where T is the bean class of the bean that declares the injection point, and X is the declared type of the injection point.
{quote}
The first paragraph implies that this event may be fired for injection points not necesarilly defined on a bean. In that case, the value of the T type parameter is unclear.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months