-
1. Re: Adding annotations to MDR via bean metadata
alesj Aug 18, 2009 9:53 AM (in response to kabirkhan)KernelScopeInfo doesn't (yet) add ctor annotations:
public void updateMetaData(MutableMetaDataRepository repository, ControllerContext context, MutableMetaDataLoader mutable, boolean add) { if (context instanceof KernelControllerContext == false) return; KernelControllerContext kernelContext = (KernelControllerContext) context; updateClassAnnotations(mutable, kernelContext, add); if (mutable instanceof ComponentMutableMetaData) updatePropertyAnnotations(repository, (ComponentMutableMetaData) mutable, kernelContext, add); else if (add == true) log.warn("Unable to add properties to mutable metadata that does not support components: " + mutable + " for " + context.toShortString()); }
Only class and properties. -
2. Re: Adding annotations to MDR via bean metadata
kabirkhan Aug 18, 2009 11:37 AM (in response to kabirkhan)Yup I found that, and also that Web Beans ignores the mdr stuff anyway https://jira.jboss.org/jira/browse/WBRI-370
The MetaData seems fine for properties, I was looking at the wrong fields in the debugger when I made the initial post. I'll implement constructor annotations, do you remember where this is being tested from? -
3. Re: Adding annotations to MDR via bean metadata
kabirkhan Aug 18, 2009 1:33 PM (in response to kabirkhan)While on this topic, should we support metadata annotations for methods as well? I think we should be able to do things like (using metadata) since @Initializer methods are web beans injection points just like constructors and properties:
class Bean { @Initializer public void init(@Current Thing t, @Current Other o) { } }
-
4. Re: Adding annotations to MDR via bean metadata
kabirkhan Aug 18, 2009 2:18 PM (in response to kabirkhan)"kabir.khan@jboss.com" wrote:
I'll implement constructor annotations, do you remember where this is being tested from?
https://jira.jboss.org/jira/browse/JBKERNEL-52 -
5. Re: Adding annotations to MDR via bean metadata
kabirkhan Aug 19, 2009 7:40 AM (in response to kabirkhan)I added org.jboss.test.kernel.annotations.test.constructor.AnnotatedConstructorTestCase for this. If you want it somewhere else just let me know