[jboss-dev-forums] [Design of POJO Server] - System property substitution on all metadata
bstansberry@jboss.com
do-not-reply at jboss.com
Wed Oct 4 00:05:53 EDT 2006
AFAK we currently only do system property substitution when we parse XML config files. As part of creating the metadata for a deployment, shouldn't we do it for any applicable type of metadata, e.g. annotation attributes of type String?
There have been requests for property substitution on annotations (see http://jira.jboss.com/jira/browse/EJBTHREE-424). I'd like to be able to do something like this:
| @Target(ElementType.TYPE)
| @Retention(RetentionPolicy.RUNTIME)
| public @interface Clustered
| {
| Class loadBalancePolicy() default LoadBalancePolicy.class;
|
| String partition() default "${jboss.partition.name:DefaultPartition}";
| }
|
Right now I can search the code for any uses of the annotation and pass the value through something like StringPropertyReplacer, but it's easy to miss things, the conversion happens every time the property is used and it only deals with this one attribute. Since we're going to start pulling metadata from a runtime metadata model, it seems we could just do the substitution once when we populate the model.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975939#3975939
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975939
More information about the jboss-dev-forums
mailing list