[seam-dev] Overriding annotated types and the SPI

Gavin King gavin.king at gmail.com
Mon Nov 23 02:29:06 EST 2009


Are you trying to:

(a) *override* the bean that the container creates, or
(b) are you trying to register additional beans?

If (a), you would need to call veto() on the AnnotatedType created by
the container.

On Mon, Nov 23, 2009 at 1:19 AM, Stuart Douglas
<stuart at baileyroberts.com.au> wrote:
> I have been working on my XML configuration extension and have been making good progress, however I have run into some behavior that I cannot explain.
> At the moment in my XML file I can do this:
>
>
>    <test:OtherQualifier>
>        <Qualifier/>
>    </test:OtherQualifier>
>
> <test:QualifiedBean2>
>        <test:OtherQualifier value1="BB" value2="2"/>
>    </test:QualifiedBean2>
>
> <test:QualifierTestBean>
>     <test:bean2>
>            <test:OtherQualifier value1="BB" value2="2"/>
>            <Inject/>
>     </test:bean2>
> </test:QualifierTestBean>
>
> When my extension sees this it creates two AnnotatedTypes and a Qualifier and registers them in the BeforeBeanDiscovery event. This all works fine, QualifiedBean2 gets injected into QualifierTestBean and life is good.
> However if QualifiedBean2 is deployed inside a Bean archive things suddenly go pear shaped, all of a sudden the container seems to forget about the qualifier on QualifiedBean2 and it stops working. Does anyone have any idea what could be causing this? It looks like the bean deployment process is overriding my user supplied type level metadata.
>
> Thanks,
>
> Stuart
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>



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



More information about the seam-dev mailing list