[wildfly-dev] Property substitution in EE annotations

Chao Wang chaowan at redhat.com
Thu Jan 8 05:32:20 EST 2015


On 01/08/2015 05:53 PM, Jan Martiška wrote:
> Hi,
> let me ask a question. I am playing with property substitution in Java EE applications and I can't get it to work with annotations in anything else than EJB-related stuff (javax.ejb.* annotations). I tried so far:
> - @javax.persistence.Table's name to parametrize the table name for an entity
> - @javax.validation.constraints.Pattern's regexp parameter to parametrize a regular expression which validates a string
>
> Neither of these seems to work for me --- Hibernate and Hibernate Validator see and try to use the raw string that I specified in the annotation (and of course fail because the syntax is wrong).
> I have the /subsystem=ee:annotation-property-replacement=true, of course. As I said, for EJB-related things it works well (even when I add them to the same application).
>
> I'm trying with the current WildFly master as well as EAP 6.3.
> Per https://issues.jboss.org/browse/WFLY-2855 I understand that property replacement is meant to work with all Java EE annotations.
>
> Is this expected, is it a bug, or might I be missing something?
>
> Thanks!
> Jan
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
It's not done for all Java EE annotations. At present, It only works for 
EJB related annotations from package below :

EJB Types: javax.ejb
JBoss Ejb3 extension: jboss-ejb3-ext-api
Resource injection: javax.annotation
Security: javax.annotation.security

cheers,

Chao


More information about the wildfly-dev mailing list