- private static final Logger LOGGER = LoggerFactory.getLogger(AaiCqResponse.class);
- private static JAXBContext jaxbContext;
-
- // JABX initial stuff
- static {
- Map<String, Object> properties = new HashMap<>();
- properties.put(JAXBContextProperties.MEDIA_TYPE, "application/json");
- properties.put(JAXBContextProperties.JSON_INCLUDE_ROOT, false);
- // Define JAXB context
- try {
- // @formatter:off
- jaxbContext = JAXBContextFactory.createContext(new Class[] {
- Vserver.class,
- GenericVnf.class,
- VfModule.class,
- CloudRegion.class,
- ServiceInstance.class,
- Tenant.class,
- ModelVer.class
- }, properties);
- // @formatter:on
-
- // verify that we can create an unmarshaller
- jaxbContext.createUnmarshaller();
-
- } catch (JAXBException e) {
- LOGGER.error("Could not initialize JAXBContext", e);
- LOGGER.info("Problem initiatlizing JAXBContext", e);
- }
- }