Don't use a static JAXBContext because it has some serious thread contention when creating new unmarshallers.

This commit is contained in:
Kevin Ruland 2012-08-23 19:53:37 +00:00
parent c34d934a55
commit 54ea94f76b

View File

@ -29,9 +29,9 @@ public class OpenRocketComponentSaver {
/** /**
* The JAXBContext. JAXBContext is thread-safe. * The JAXBContext. JAXBContext is thread-safe.
*/ */
private static JAXBContext context = null; private JAXBContext context = null;
static { public OpenRocketComponentSaver() {
try { try {
context = JAXBContext.newInstance(OpenRocketComponentDTO.class); context = JAXBContext.newInstance(OpenRocketComponentDTO.class);
} }