cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Sosnoski <...@sosnoski.com>
Subject Re: [JiBX DataBinding] Question on handling Simple Types
Date Fri, 25 Jun 2010 23:38:10 GMT
Daniel Kulp wrote:
> There is a ReflectionWrapperHelper object in there that can be used as an 
> example.   JAXB uses a more optimized version that generates a unique helper 
> using ASM, but reflection is used as a fallback if that fails.  (or asm isn't 
> available)
>   

Sounds like that's the way to go, then. Nilupa, for now you'll need to 
extract the schema for the wrappers (along with any other embedded 
schemas) and pass it to the JiBX code generation, then link up whatever 
is needed for the ReflectionWrapperHelper. I'll try to clean up the 
interface used for JiBX code generation as part of the 1.2.3 release, to 
make it easier to use from other programs.

Generating code at runtime to do the unwrapping, rather than just using 
reflection, frankly seems a waste of effort to me. The overhead from one 
reflection method call is insignificant compared to the XML processing 
time, and you'd need to do hundreds or thousands of calls to actually 
come out with a net performance gain.

  - Dennis

Mime
View raw message