users@jaxb.java.net

Using javax.xml.bind.Marshaller manually, will it read a "_at_XmlSchema" annotation automatically?

From: KARR, DAVID (ATTCINW) <"KARR,>
Date: Mon, 21 Dec 2009 13:41:10 -0800

I'm looking at some sample Soap client code that's using JAXB for
serialization.

It's using the JAXB @Xml annotations, to set the schema among other
things. It's calling javax.xml.bind.Marshaller.marshal() manually, but
when it constructs the JAXBElement it's reading the "@XmlSchema"
annotation from the package to get the namespace. In order to do this
efficiently, it has to cache the class-namespace mapping in a map
protected by a synchronized block. Are there any reasonable
alternatives to this strategy?

I guess this is a good reason to use CXF, which hides this cruft.