On Jun 11, 2011, at 12:55 AM, Mark Struberg wrote:

> The problem is that this would not be a sheet of paper but rather one written 
> with 'i' ;) 
> 
> * no marker file -> requires to scan ALL classes on the whole classpath
> * heavily underspecified -> what is this damn thing doing in a PORTABLE way?
> * interoperability, what's that? how does @ManagedBean work together with 
> CDI, with EJB, with JSF managed beans?

Indeed the @ManagedBean that made it into the spec is just a placeholder at 
best.  Every page reads with a big unwritten "TODO".  I was really surprised to 
actually see tests for it in the TCK.  I was like "wait, we haven't actually 
specified anything yet!"

There will be a ton of @ManagedBean work in Java EE 7 guaranteed.  Or at least 
I hope so :)  It needs plenty of work.

> My suggestion: go the route OWB took with the BDA (Bean Archive Definition) 
> approach: we optionally support this specified but heavily broken feature. 
> But it is disabled in our default configuration. 
> 
> So just introduce a config which is enabled for the TCK tests, and if someone 
> needs this @ManagedBean support for his project, then he is free to use this 
> config too. But it's disable by default.

We tried this for a very short time in the early days of Geronimo till we were 
reminded that it was explicitly against the TCK agreement to ship a certified 
server in "non compliant" mode by default.

Technically only a fully certified server like Geronimo has that restriction, 
so projects that are just bits and pieces of the puzzle are pretty free to be 
creative like that.  But we'd like to certify TomEE, so at least there it has 
to remain enabled by default.


-David

> 
> --- On Fri, 6/10/11, David Blevins <[email protected]> wrote:
> 
>> From: David Blevins <[email protected]>
>> Subject: Re: Examples - CDI
>> To: [email protected]
>> Date: Friday, June 10, 2011, 11:49 PM
>> 
>> On Jun 10, 2011, at 3:36 AM, Mark Struberg wrote:
>> 
>>> The one from JSR-317 is a zombie since it was born (3
>> days before the spec went final...). It is not even used by
>> the RI itself (glassfish). 
>> 
>> That one. :)  It's required part of the EJB TCK so
>> Glassfish definitely supports it.
>> 
>> Technically it was added in April and the spec closed that
>> December, but you're right in the grand scheme of things it
>> was really really late.  And the spec says next to
>> nothing.
>> 
>> Since we have to support it, we might as well have fun with
>> it.  I see a blank sheet of paper we can write anything
>> on :)
>> 
>> 
>> -David
>> 
>> 
>>> --- On Fri, 6/10/11, David Blevins <[email protected]>
>> wrote:
>>> 
>>>> From: David Blevins <[email protected]>
>>>> Subject: Re: Examples - CDI
>>>> To: [email protected]
>>>> Date: Friday, June 10, 2011, 12:19 AM
>>>> 
>>>> On Jun 9, 2011, at 4:16 PM, Ranga S wrote:
>>>> 
>>>>> Thanks!
>>>>> I tried using the createEJBContainer
>> construct, but it
>>>> complains about "not finding any modules to
>> deploy" when I
>>>> run it. 
>>>> 
>>>> Add a src/main/resources/META-INF/beans.xml file.
>> 
>>>> That should do the trick.  CDI spec requires
>> users to
>>>> have a beans.xml even if it is an empty file.
>>>> 
>>>> That said the EJB spec does not require an xml
>> file so we
>>>> end up having to scan everything anyway.  So
>> we could
>>>> probably get it to work without the empty file.
>>>> 
>>>> We're currently just looking for EJB annotations
>> +
>>>> @ManagedBean to determine if it is a module of
>> interest, but
>>>> we could easily expand that.
>>>> 
>>>> Anyway, for now try with the extra xml file and
>> give a
>>>> shout if you run into any issues.
>>>> 
>>>> 
>>>> -David
>>>> 
>>>> 
>> 
>> 

Reply via email to