Пример #1
0
  public void init() {
    LOG.debug("Creating hawtio SchemaLookup instance");
    try {
      if (mapper == null) {
        mapper = new ObjectMapper();

        mapper.setVisibilityChecker(
            new IgnorePropertiesBackedByTransientFields(mapper.getVisibilityChecker()));

        JaxbAnnotationModule module1 = new JaxbAnnotationModule();
        mapper.registerModule(module1);

        BeanValidationAnnotationModule module2 = new BeanValidationAnnotationModule();
        mapper.registerModule(module2);
      }
      // now lets expose the mbean...
      super.init();
      singleton = this;
    } catch (Exception e) {
      LOG.warn("Exception during initialization: ", e);
      throw new RuntimeException(e);
    }
  }
Пример #2
0
 @Override
 public void init() throws Exception {
   ConfigFacade.singleton = this;
   super.init();
 }