[webbeans-dev] [XML Field Decleration]

Gavin King gavin at hibernate.org
Thu Dec 4 12:22:30 EST 2008


On Thu, Dec 4, 2008 at 9:23 AM, Gurkan Erdogdu <gurkanerdogdu at yahoo.com> wrote:
> In the spec within the part of the "Fields of a Web Bean", it says that
>
> "If a field declaration has more than one direct child element, and at least
> one of these elements is not <value> element in
> the Web Beans namespace, a DefinitionException is thrown by the Web Bean
> manager at initialization time."
>
> Then, is it true that the following definition is correct ? iow, can the
> field decleration contains both the <value> field and the injection field?
>
> <mybean:myField>
>     <value>15</value>
>     <mybean>x.y.x.AnotherBean</mybean>
> </mybean:myField>

Your example is of a field declaration with:
* more than one direct child element
* at least one element which is not a <value> element

So therefore a DefinitionException is thrown.

-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list