users@ejb-spec.java.net

[ejb-spec users] Re: [jsr345-experts] Re: Re: Singleton MDB?

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Mon, 14 Jan 2013 12:20:39 -0800

On 1/12/13 7:03 AM, Philippe Marschall wrote:
>
>
> On 03.01.2013 17:27, Jeremy Bauer wrote:
>> I also do not like the idea of re-using @Singleton because it is a
>> component defining annotation. If we are just talking about a single
>> switch, adding an attribute to the annotation ex.
>> @MessageDriven(singleton=true) is my preference.
>
> What adding singleton=true to Stateless and turning Singleton into a
> stereotype?

This is not supported in Java EE 7 - standard annotations cannot be
turned into stereotypes.

-marina
>
> @Stereotype
> @Stateless(singleton=true)
> public @interface Singleton {
> }
>
> Cheers
> Philippe
>