This content has been marked as final.
Show 5 replies
-
1. Re: programmatically creation of metadata
adrian.brock Mar 1, 2006 9:18 AM (in response to tom.baeyens)Not quite. You should just be able to do:
BeanMetaData bmd = ... KernelConfig config = new PropertyKernelConfig(System.getProperties()); BeanInfo beanInfo = config.getBeanInfo(bmd.getName(), Thread.currentThread().getContextClassLoader()); Object result = Configurator.instantiateAndConfigure(config, beanInfo, bmd);
See the config tests for more info (although it is hidden in an abstract test class).
I am currently working on a simplification of the api
so you don't have to do so many steps to override the implementation
(you show the entire construction path).
JBossXB, Hibernate (and hopefully jboss serialization, if I can persusade Clebert ;-)
have a similar requirement in terms of taking advantage of the ClassInfo reflection
optimizations (both caching and the performance of the reflection object). -
2. Re: programmatically creation of metadata
tom.baeyens Mar 1, 2006 9:54 AM (in response to tom.baeyens)ok. good to see that i'm on the right track.
i don't care much about the many construction steps... but if you're simplifying that, even better.
next is the XML parsing. in barcelona you mentioned that there are multiple parsers for the beaninfo. if i recall correctly, i could add a parser based on org.w3c.dom and add that somewhere in the kernel module so that it 'automaticall' would be maintained.
is that what i should do ? or should i just do the xml parsing based on plain J2SE in my own project ?
regards, tom. -
3. Re: programmatically creation of metadata
adrian.brock Mar 1, 2006 10:04 AM (in response to tom.baeyens)"tom.baeyens@jboss.com" wrote:
next is the XML parsing. in barcelona you mentioned that there are multiple parsers for the beaninfo.
I'll only maintain stuff that has tests. :-)
In fact, there is only one xml parsing routine now (previously there were two).
I'd prefer you persuaded Alex to do whatever it is you want to do at the JBossXB level.
That is the place to deal with XML issues within JBoss.
I don't want any direct dependency on xml/implementation/features in the MC code.
In Barcelona, I said I was thinking of writing a property file -> BeanMetaData parser.
i.e. like log4j has the option to use a .properties or a .xml -
4. Re: programmatically creation of metadata
adrian.brock Mar 1, 2006 10:07 AM (in response to tom.baeyens)"adrian@jboss.org" wrote:
I'd prefer you persuaded Alex to do whatever it is you want to do at the JBossXB level.
That is the place to deal with XML issues within JBoss.
In fact, the xml parser within the MC code is likely to disappear once the
schema annotation issues have been resolved. -
5. Re: programmatically creation of metadata
tom.baeyens Mar 1, 2006 10:22 AM (in response to tom.baeyens)i'll dig into the jaxb parsing issue that introduced a dependency on xerces. also i'll also have to dig a bit in jaxb... walking a dom tree seems much easier to me.
"adrian" wrote:
I'll only maintain stuff that has tests. :-)
great ! then you can maintain jBPM while i learn about jaxb :)
thanks, regards, tom.