-
1. Re: Replacing system properties in metadata
alesj Jun 5, 2008 5:29 AM (in response to adrian.brock)File a JIRA issue and I'll try to squeeze this feature in before I do MDR CR1 release.
Replaceable would have an attrribute then to decide, which of the two options we use.
Just need to decide which would be the default - since we mostly don't care here - so default is in order.
My vote goes to 2), always liked lazy stuff. :-) -
2. Re: Replacing system properties in metadata
brian.stansberry Jun 5, 2008 8:59 AM (in response to adrian.brock)Adrian and I both opened threads on the same general topic. :) In the other one at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=136807 I think Scott is driving at a need to provide visibility to the raw value as well; i.e. make sure the raw value is visible to services like mgmt tools that want it. Will this change to MetaDataRetrievalToMetaDataBridge preclude that? If so we should probably defer doing this until we have a solution to that problem.
-
3. Re: Replacing system properties in metadata
starksm64 Jun 5, 2008 10:40 AM (in response to adrian.brock)Right, I don't think Replaceable is sufficient. I think this should be dervived from the ManagementProperty annotation declaring a type of SystemPropertyMetaType (does not exist currently) so that a mgmt tool can show what property refs are in use as well as what those values resolve to for a given profile's/servers properties.
-
4. Re: Replacing system properties in metadata
dmlloyd Jun 5, 2008 11:49 AM (in response to adrian.brock)This seems like a really cool feature - I'm sure I could make use of it in XNIO and Remoting - but is this something that can/should wait until after AS5.0 is released?
-
5. Re: Replacing system properties in metadata
brian.stansberry Jun 5, 2008 12:10 PM (in response to adrian.brock)I brought it up because I have an annotation whose default is a system property and we were discussing another such case. I have a hard coded workaround for the 1st and don't like adding another. But it's not a high priority for me personally; the discussion just brought it to mind.
-
6. Re: Replacing system properties in metadata
alesj Jun 6, 2008 7:01 AM (in response to adrian.brock)"scott.stark@jboss.org" wrote:
Right, I don't think Replaceable is sufficient.
So, should I still add this to MDR or not? -
7. Re: Replacing system properties in metadata
alesj Jun 6, 2008 7:33 AM (in response to adrian.brock)"adrian@jboss.org" wrote:
Then we could add something to MetaDataRetrievalToMetaDataBridge
that does the replacement, e.g.public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) throw new IllegalArgumentException("Null annotationType"); AnnotationItem<T> item = retrieval.retrieveAnnotation(annotationType); if (item == null) return null; - return item.getValue(); + T result = item.getValue(); + if (annotationType.hasAnnotation(Replaceable.class)) + result = checkReplaceable(result); + return result; }
Similar code would be required for getAnnotations()
If we're about to do this, then it should be done on AnnotationItem, since annotations can also come from MetaData::get(Local)MetaData(s). -
8. Re: Replacing system properties in metadata
starksm64 Jun 6, 2008 9:41 AM (in response to adrian.brock)"alesj" wrote:
"scott.stark@jboss.org" wrote:
Right, I don't think Replaceable is sufficient.
So, should I still add this to MDR or not?
No, I don't believe so.