[javaee-spec users] Re: allowing stereotypes to be used more widely

From: Bill Shannon <>
Date: Mon, 19 Nov 2012 17:16:06 -0800

Marina Vatkina wrote on 11/19/12 15:46:
> Pete,
> Pete Muir wrote:
>> I was on the fence for a long time, however discussing with the CDI EG and
>> colleagues made it clear there was little support once we went through the
>> possible confusion that can arise. The CDI EG also agrees with me here :-)
>> Here is the point which we think kills the idea. If you define this stereotype
>> in CDI, with the support proposed for all Java EE specs:
>> @Stereotype
>> @RequestScoped
>> @Stateless
>> public @interface MyStereotype {}
>> And define this bean:
>> @MyStereotype public class MyBean {}
>> you end up with a request scoped SLSB.
> How is it different from:
> @RequestScoped
> @Stateless
> public class MyBean {}

If we implemented it, it wouldn't be any different. That's the whole point.
It's a sort of macro facility for annotations. Obviously it looks extra
verbose if you just have one bean, but if you have many it's simpler.