jsr345-experts@ejb-spec.java.net

[jsr345-experts] Re: [ejb-spec users] Re: Enhancing _at_Stateless, @Stateful and @Singleton annotations

From: Antonio Goncalves <antonio.goncalves_at_gmail.com>
Date: Tue, 21 Jun 2011 19:19:26 +0200

If we "re architecture" the EJB spec and extract services, then @Stateless
could be a CDI @Stereotype, for example :

@Stereotype
@TransactionAttribute(REQUIRED)
@PermitAll
@ThreadSafe
@OtherServiceICannotThinkOf
public @interface @Stateless { }

On Fri, Jun 17, 2011 at 15:15, Adam Bien <abien_at_adam-bien.com> wrote:

> I would require EJB 3.2 containers to understand @Stereotypes or at least
> react to @Stateless, @Stateful etc. inside a @Stereotype.
> On 17.06.2011, at 11:48, Pete Muir wrote:
>
> >
> > On 16 Jun 2011, at 09:22, Adam Bien wrote:
> >
> >> Hi,
> >>
> >> currently the @Stateless, @Stateful annotations look like:
> >>
> >> @Target(value = {ElementType.TYPE})
> >> @Retention(value = RetentionPolicy.RUNTIME)
> >> public @interface Stateless {}
> >>
> >>
> >> I would like to extend the @Target of all @Stateless, @Stateful,
> @Singleton beans to:
> >>
> >> @Target(value = {ElementType.TYPE,*ElementType.ANNOTATION_TYPE*})
> >>
> >> (add ElementType.ANNOTATION_TYPE)
> >>
> >> This would allow to use EJB meta-annotations in CDI @Stereotype
> definition,
> >
> > I'm not sure what use this is, without also requiring EJB containers to
> also look on stereotypes?
>
>
>


-- 
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org> |
Twitter<http://twitter.com/agoncal>|
Blog <http://feeds.feedburner.com/AntonioGoncalves> |
LinkedIn<http://www.linkedin.com/in/agoncal>| Paris
JUG <http://www.parisjug.org>