Skip to main content

Blog Archive for mkarg during January 2012

You want JAXB to unmarshal singletons? You already spent lots of time coding rather complex workarounds applying XmlAdapters and afterUnmarshal callbacks? The solution is astonishingly simple. Possibly so simple that nobody in the JAXB team ever thought it would be necessary to put the word "singleton" somewhere next to the JavaDocs for this... Anyways, here is the solution: import javax.xml...