Change-Id: Ibac5614aa1b23ff360bcce3ea29091f0a7a78906
Signed-off-by: Prasanth Pallamreddy <ppallamr@cisco.com>
public NorthboundApplication() {
_singletons = new HashSet<Object>();
_singletons.add(new ContextResolver<JAXBContext>() {
- JAXBContext jaxbContext = newJAXBContext();
+ JAXBContext jaxbContext;
@Override
- public JAXBContext getContext(Class<?> type) {
+ public synchronized JAXBContext getContext(Class<?> type) {
+ if (jaxbContext == null) {
+ jaxbContext = newJAXBContext();
+ }
return jaxbContext;
}