This content has been marked as final.
Show 4 replies
-
1. Re: Anonymous beans
alesj May 29, 2008 4:59 AM (in response to dmlloyd)Your are probably looking for this:
- http://www.jboss.com/index.html?module=bb&op=viewtopic&t=133207
It even has the same subject name. :-)
I need to check why the programmatic approach doesn't work.
Can you create me a test case out of your work?
Or check AbstractBeanMetaData.getBeans / NestedBeanHandler, that's where the nested bean logic is. -
2. Re: Anonymous beans
dmlloyd May 29, 2008 11:01 AM (in response to dmlloyd)"alesj" wrote:
Your are probably looking for this:
- http://www.jboss.com/index.html?module=bb&op=viewtopic&t=133207
It even has the same subject name. :-)
Well, the error message I'm getting is completely different, and I'm working with a programmatic deployment rather than an XML deployment, so it looks like a completely different problem to me...
...OK, it seems entirely possible that I'm just doing it wrong. I'm instantiating a BeanMetaDataBuilder for the nested bean, using the getBeanMetaData() to get it, and then just directly adding that resulting bean to a parent builder via the builder.addPropertyMetaData("prop", nestedBeanMetaData) method.
I'll look at those classes and see where my error is.
(edited because these forums are broken) -
3. Re: Anonymous beans
alesj May 30, 2008 5:38 AM (in response to dmlloyd)"david.lloyd@jboss.com" wrote:
Well, the error message I'm getting is completely different, and I'm working with a programmatic deployment rather than an XML deployment, so it looks like a completely different problem to me...
What's your error?"david.lloyd@jboss.com" wrote:
...OK, it seems entirely possible that I'm just doing it wrong. I'm instantiating a BeanMetaDataBuilder for the nested bean, using the getBeanMetaData() to get it, and then just directly adding that resulting bean to a parent builder via the builder.addPropertyMetaData("prop", nestedBeanMetaData) method.
That should work.
XML transformation doesn't do anything different than what you do programmatically.
And that's exactly what I'm doing in my test:
- http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/deployment/test/AnonymousBeansTestCase.java -
4. Re: Anonymous beans
dmlloyd May 30, 2008 12:35 PM (in response to dmlloyd)For some reason I felt inspired to completely restructure my metadata last night at about 1:00am. Once I get back to this point, I'll post more info. Unless of course it decides to just work. :-)