deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Beikov <christian.bei...@gmail.com>
Subject Re: Exclude annotation
Date Wed, 17 Sep 2014 16:11:53 GMT
Is nobody interested in something like that? I would really like to 
discuss it and also contribute the implementation.

Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*
Am 25.08.2014 um 22:21 schrieb Christian Beikov:
> Hello guys!
>
> I implemented an extension that excludes a bean or producer only if a 
> bean for a user specified type exists.
> Here a little example:
>
> public class AImpl1 implement A { ... }
>
> @ExcludeIfExists(A.class)
> public class AImpl2 implement A { ... }
>
> When both classes are on the classpath, AImpl2 will be vetoed.
> When only AImpl2 is on the classpath, a bean will be created for it.
>
> This was something that I was missing when trying to use the Exclude 
> annotation of Deltaspike. Now I would like to know if you are 
> interested in such an extension. I can provide you the basic code, 
> which is actually not that trivial.
> I think many people would benefit from this extension. Especially the 
> servlet module could benefit from that too since it could replace 
> current usages of the Deltaspike qualifier on the producers with the 
> exclude annotation. Then the servlet module could provide beans for 
> the servlet resources on EE6 servers. On EE7 servers those beans would 
> be vetoed since EE7 servers already provides default beans for many 
> resources.
>
> I hope you like the idea and I can help get that into the next 
> deltaspike release.
> -- 
>
> Mit freundlichen Grüßen,
> ------------------------------------------------------------------------
> *Christian Beikov*


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message