[wildfly-dev] Property substitution in EE annotations

Jan Martiška jmartisk at redhat.com
Thu Jan 8 04:53:14 EST 2015


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


More information about the wildfly-dev mailing list