Ejemplo n.º 1
0
 private void initConfigDecorator() {
   InputStream in =
       Q2.class
           .getClassLoader()
           .getResourceAsStream("META-INF/org/jpos/config/Q2-decorator.properties");
   try {
     if (in != null) {
       PropertyResourceBundle bundle = new PropertyResourceBundle(in);
       String ccdClass = bundle.getString("config-decorator-class");
       if (log != null) log.info("Initializing config decoration provider: " + ccdClass);
       decorator =
           (ConfigDecorationProvider) Q2.class.getClassLoader().loadClass(ccdClass).newInstance();
       decorator.initialize(getDeployDir());
     }
   } catch (IOException e) {
   } catch (Exception e) {
     if (log != null) log.error(e);
     else {
       e.printStackTrace();
     }
   } finally {
     if (in != null) {
       try {
         in.close();
       } catch (IOException e) {
       }
     }
   }
 }