On Fri, Apr 9, 2010 at 7:44 PM, Stuart Douglas <stuart@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