users@javaee-spec.java.net

[javaee-spec users] [jsr342-experts] Re: CDI in Application Client Container

From: Antonio Goncalves <antonio.goncalves_at_gmail.com>
Date: Sun, 11 Nov 2012 21:15:05 +0100

Interesting ;o) Well, looks like the TCK needs some extra test cases then
;o)

ACC is not very well known and not used very often. It's a shame because it
could have been an easy way to bootstrap CDI in a Java SE environment for
example (and in a standard way)

Antonio
Le 11 nov. 2012 21:07, "Bill Shannon" <bill.shannon_at_oracle.com> a écrit :

> Sigh...
>
> It appears that we neither implemented nor tested support for CDI in the
> app client container. Clearly something we'll need to fix for EE 7, if not
> sooner.
>
> Bill Shannon wrote on 11/09/2012 04:47 PM:
>
> Yes, based on the Java EE 6 platform spec, I intended and expected CDI to
> work in the app client container.
>
> I'm trying to find out what we actually implemented and tested... :-)
>
> Antonio Goncalves wrote on 11/09/12 14:10:
>
> Ok, good to know. But that means that all ACC implementations should
> support it then ? As Pete said, looks like the JBoss one doesn't....
>
> I found the mail I sent to the GlassFish forum a couple of years ago
> about this topic (
> http://www.java.net/forum/topic/glassfish/glassfish/using-cdi-acc-se-environment).
> I'll be doing more test to make sure and fill a bug if needed.
>
>
> On Fri, Nov 9, 2012 at 10:57 PM, Bill Shannon <bill.shannon_at_oracle.com>wrote:
>
>> CDI is supposed to be supported in the app client container. If it's
>> not working, please file bugs.
>>
>> Antonio Goncalves wrote on 11/09/12 06:09:
>>
>> Hum.... for me it's just another container (EJB, Servlet & Client) so I
>> would expect the same services from CDI. ACC is not plain Java SE, it's a
>> container that gives you a small set of services, and that includes CDI (as
>> per Java EE specification).
>>
>> Bill/Linda, if CDI is not supported in ACC why not getting rid of it in Figure
>> EE.2-1 ? It's confusing.
>>
>> Antonio
>>
>>
>> On Fri, Nov 9, 2012 at 3:01 PM, Pete Muir <pmuir_at_bleepbleep.org.uk>wrote:
>>
>>> This also ties in to more general Java SE support for CDI IMO. I would
>>> probably prefer to get a general solution sorted, rather than a special
>>> case for ACC.
>>>
>>> On 9 Nov 2012, at 14:56, Antonio Goncalves wrote:
>>>
>>> > I like to use Producers and Alternatives so I can easily switch
>>> context. In the case of having CDI in ACC that would allow me to invoke
>>> different Web Serivces just by changing beans.xml
>>> >
>>> >
>>> > On Fri, Nov 9, 2012 at 2:44 PM, Pete Muir <pmuir_at_bleepbleep.org.uk>
>>> wrote:
>>> > It's not in the cdi tck so I doubt it is in jboss as.
>>> >
>>> > Nigel's point about scopes is very relevant.
>>> > On 9 Nov 2012 14:03, "Antonio Goncalves" <antonio.goncalves_at_gmail.com>
>>> wrote:
>>> > I'm not an ACC expert, but I do use it once in a while. But to be
>>> honest, I don't know why it doesn't work. If you look at the EE spec (eg.
>>> EE 7 - Figure EE.2-1) you see that CDI & DI is in the ACC. But on the other
>>> hand, the CDI 1.0 spec (12.1. Bean archives) says "The container is not
>>> required to support application client jar bean archives." I tried several
>>> time with the appclient from GlassFish, and CDI just doesn't work (wonder
>>> if JBoss ACC allows CDI or not). The "is not required" part is frustrating.
>>> >
>>> > Antonio
>>> >
>>> >
>>> > On Fri, Nov 9, 2012 at 12:48 PM, Pete Muir <pmuir_at_bleepbleep.org.uk>
>>> wrote:
>>> > I'm not an expert in the ACC, so would need a ACC expert who knows CDI
>>> to help us define the behavior. Interested Antonio?
>>> >
>>> > On 9 Nov 2012, at 12:41, Antonio Goncalves wrote:
>>> >
>>> > > Hi all,
>>> > >
>>> > > Correct me if I'm wrong but I haven't seen any discussion on this
>>> topic. In Java EE 6 CDI doesn't work in ACC. Wouldn't it be useful to add
>>> it in EE 7 ?
>>> > >
>>> > > A use case I'm working on at the moment is that I have a Java SE
>>> class (running in ACC) that injects a web service reference with
>>> @WebServiceRef. With CDI enabled I could produce this reference and just
>>> @Inject it.
>>> > >
>>> > > What do you think ?
>>> > >
>>> > > --
>>> > > Antonio Goncalves
>>> > > Software architect and Java Champion
>>> > >
>>> > > Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Antonio Goncalves
>>> > Software architect and Java Champion
>>> >
>>> > Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
>>> >
>>> >
>>> >
>>> > --
>>> > Antonio Goncalves
>>> > Software architect and Java Champion
>>> >
>>> > Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
>>>
>>>
>>
>>
>> --
>> Antonio Goncalves
>> Software architect and Java Champion
>>
>> Web site <http://www.antoniogoncalves.org> | Twitter<http://twitter.com/agoncal>|
>> LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org> |
>> Devoxx France <http://www.devoxx.fr>
>>
>>
>>
>
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <http://www.antoniogoncalves.org> | Twitter<http://twitter.com/agoncal>|
> LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org> |
> Devoxx France <http://www.devoxx.fr>
>
>
>
>