I am trying to register an additional bean. It works perfectly when the class is not in a
bean deployment archive, however if QualifiedBean2 is in a bean deployment archive then it
stops working. The bean itself does not have any annotations.
Stuart
________________________________________
From: Gavin King [gavin.king(a)gmail.com]
Sent: Monday, 23 November 2009 6:29 PM
To: Stuart Douglas
Cc: seam-dev(a)lists.jboss.org
Subject: Re: [seam-dev] Overriding annotated types and the SPI
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(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org