It's weird to see the word dynamic next to the word stereotype.<br><br>Same as Mark here. We defined one or two @Stereotype's ever since we started using CDI. We play much more with qualifiers and annotation litterals.<br>
<br>I don't know if any extentions programatically manipulate them, but I'm sure it's not common.<br>For instance, a quick look at seam-solder and seam-faces shows only one stereotype is defined, and there's no tweaking with it.<br>
<br>fm.<br><br><br><div class="gmail_quote">On Wed, May 2, 2012 at 1:54 PM, Mark Struberg <span dir="ltr"><<a href="mailto:struberg@yahoo.de" target="_blank">struberg@yahoo.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have not seen those dynamic stereotypes in free nature yet.<br>
<br>
Actually I'm not using Stereotypes that much at all. Mainly because their usage is limited by the Java Annotation boundaries.<br>
<br>
Imagine the following Stereotype for my Services (I spare out the standard stuff)<br>
<br>
<br>
@StereoType<br>
@Secured<br>
@Transactional<br>
@ApplicationScoped<br>
public @interface @Service {}<br>
<br>
The problem here is that there is no way to 'propagate' any rolesAllowed from @Service to @Secured, etc.<br>
<br>
What I'd like to have is something like<br>
...<br>
public @interface @Service {<br>
<br>
String[] rolesAllowed();<br>
TransactionAttributeType transactionType();<br>
<br>
}<br>
<br>
where the rolesAllowed() would get propagated to the @Secured meta-annotation and transactionType() to the @Transactional<br>
<br>
With such an annotation I could use:<br>
<br>
@Service(rolesAllowed={"admin", "editor"}, transactionType = REQUIRES_NEW)<br>
public String doSomething() {...<br>
<br>
<br>
<br>
But that's not possible with Java Annotations. Or do you have any ideas how to do that? (without having to manually propagate this in each and every interceptor).<br>
<br>
<br>
LieGrue,<br>
strub<br>
<div><div><br>
<br>
<br>
----- Original Message -----<br>
> From: Pete Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>><br>
> To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>; <a href="mailto:deltaspike-dev@incubator.apache.org" target="_blank">deltaspike-dev@incubator.apache.org</a>; David Blevins <<a href="mailto:david.blevins@gmail.com" target="_blank">david.blevins@gmail.com</a>><br>
> Cc:<br>
> Sent: Wednesday, May 2, 2012 1:05 PM<br>
> Subject: [cdi-dev] Dynamic stereotypes<br>
><br>
> Hi all<br>
><br>
> The Java EE spec leads would like feedback on how often stereotypes are<br>
> "dynamic" vs "static".<br>
><br>
> A static stereotype is one that is defined in Java code, compiled, and then<br>
> deployed without modification from a container extension.<br>
><br>
> A dynamic stereotype is one that defined in Java code, compiled, and then<br>
> modified by an extension.<br>
><br>
> Another way of putting it is:<br>
><br>
> * Are there any extensions which modify stereotypes?<br>
> * Is this something that is common or not?<br>
><br>
> This relates to David's metatype proposal.<br>
><br>
> Pete<br>
> _______________________________________________<br>
> cdi-dev mailing list<br>
> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
><br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.suntriprecords.com" target="_blank">http://www.suntriprecords.com</a><br><br>