+ private final Set<Object> _singletons;
+
+ public NorthboundApplication() {
+ _singletons = new HashSet<Object>();
+ _singletons.add(new ContextResolver<JAXBContext>() {
+ JAXBContext jaxbContext;
+ @Override
+ public synchronized JAXBContext getContext(Class<?> type) {
+ if (jaxbContext == null) {
+ jaxbContext = newJAXBContext();
+ }
+ return jaxbContext;
+ }
+
+ } );
+ _singletons.add(getJsonProvider());
+ _singletons.add(new JacksonJsonProcessingExceptionMapper());
+ _singletons.add(new QueryContextProvider());
+ _singletons.add(new GenericExceptionMapper());
+ }