users@javaee-spec.java.net

[javaee-spec users] Re: [jsr342-experts] Re: Java EE 7 first Early Draft candidate

From: Pete Muir <pmuir_at_bleepbleep.org.uk>
Date: Tue, 6 Mar 2012 11:13:40 +0000

On 5 Mar 2012, at 20:59, Linda DeMichiel wrote:

> Hi Antonio,
>
> On 3/5/2012 12:16 AM, Antonio Goncalves wrote:
>> Hi all,
>>
>> Here are some comments after reading the document :
>>
>> * */EE.5 Resources, Naming, and Injection/*. The introduction of the chapter talks about Resource, EJB, PersistenceUnit
>> and PersistenceContext annotation but nothing about @Inject (only later from EE.5.20 Bean Manager References). Maybe we
>> could also introduce @Inject (and point to the CDI/JSR303 specs) no ? It seams funny to not talk about it in the
>> introduction of a chapter that mentions injection.
>>
>
> I agree. I will add this to the introduction.
>
>> * /*EE.5.2.5 Annotations and Injection*/. "For all classes except application client main classes, the fields or methods
>> must not be static." I have heard that CDI 1.1 was looking at injecting beans to statis fields. Am I right ? If this is
>> the case we could also mention it.
>>
>
> I'm not sure -- At least I'm not seeing it in the latest CDI spec draft that I have. We will need to track this however.
>
>> * In */EE.5.21 Support for Dependency Injection/* it would be useful to have a section listing all the objects that can
>> be injected out of the box (without any producer) by CDI : UserTransaction, Principal, Validator...
>>
>
> I think this belongs more appropriately in the CDI spec -- i.e., it would be better to avoid the duplication.

Note, it's already there.

>
>> * */EE.5.17 Resource Definition and Configuration/*. Here we talk about DataSourceDefinition,
>> JMSConnectionFactoryDefinition, JMSDestinationDefinition, MailSessionDefinition, and ConnectorResourceDefinition. We've
>> already talked about it but it is still unclear why we can't have CDI Alternatives with resource definition. Either we
>> explicitiely explain why we can't have it, or we try to make it work (this would be a very interesting feature).
>>
>
> This is more properly a CDI issue, isn't it?

No, it's an integration issue. CDI can't suddenly stop a data source definition being deployed.