[seam-dev] Xml module and preventing bean installation
Dan Allen
dan.j.allen at gmail.com
Sun Apr 11 01:51:22 EDT 2010
On Fri, Apr 9, 2010 at 7:44 PM, Stuart Douglas
<stuart at baileyroberts.com.au>wrote:
> After some discussion with Tihomir I have added an @XmlConfigured
> annotation to seam-xml. This prevents the bean from being installed, so it
> is possible to create beans with ambiguous dependencies and allow the user
> to pick which one they want with XML configuration.
>
> The problem with this is that if you want to use it you now need a compile
> time dependency on seam-xml just to get one annotation. Should we have a
> @DoNotInstall (or whatever) annotation in weld-extensions instead, or is a
> compile time dependency on seam-xml ok?
>
> Tihomir has pointed out that @XmlConfigured makes it much clearer what is
> going on, and tells anyone reading the code to look in beans.xml, and I am
> inclined to agree with him, but I would like to know what everyone else
> thinks.
>
>
Building on this, I was thinking that we should provide a @Veto annotation
in a common module (perhaps Weld extensions), that can be used to prevent a
class from being installed. The @Veto annotation would be an @Alternative
stereotype. Naturally, this is pretty easy for users to create, but since
the need is so common, I would think it makes sense to provide it. WDYT?
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20100411/cf726e76/attachment-0001.html
More information about the seam-dev
mailing list