On Sep 26, 2011, at 2:28 AM, Fredrik Jonson wrote: > In <[email protected]> David Blevins wrote: > >> # JAXB Accessors >> >> One of the biggest polluters of the class space is JAXB as it generates >> accessors for all the fields. First thought is, gee, I wonder if we can do >> that at build time and keep the class definitions. If there's some way we >> could write down those classes, it could save us a lot of trouble at >> runtime. > > I'm sure I misunderstand you. Are you saying that openejb is generating > class-files from jaxb schemas in runtime? If that's the case, you can use > jaxb2-maven-plugin to generate classes at build time instead. Which openejb > module are you talking about? Is there a xsd? > > http://mojo.codehaus.org/jaxb2-maven-plugin/
We have hand-optimized classes that originally came from the jaxb xjc compiler. I think that even when these classes are already present jaxb frequently generates additional classes to do some kind of type conversion for accessed fields. I don't know much about this but its possible that if we matched the class types to the schema types better jaxb would create fewer of these. I think david's idea of figuring out how to save these generated classes would be better though, IIRC when I looked at this the types jaxb likes would be very inconvenient for humans. thanks david jencks > > -- > Fredrik Jonson >
