public boolean isDependencyInjectionEnabled() { try { return Boolean.parseBoolean(prop.getProperty("agent.dependencyinjection.enabled")); } catch (Exception ex) { log.warn("error parsing agent.dependencyinjection.enabled"); } return false; }
/** * base 64 encoder */ public static String encode(String text) { try { return org.apache.commons.codec.binary.Base64.encodeBase64String(text.getBytes(Constants.CHARSET)); } catch (UnsupportedEncodingException ex) { LogHelper.getLog().warn("unexpected base64 encoding error", ex); } return ""; }
public long getDeadMessageQueueDuration() { String s = prop.getProperty("message.processor.dead.message.queue.duration"); long ret = 10000; if (!Utility.stringIsNullOrEmpty(s)) { try { ret = Long.parseLong(s); } catch (Exception ex) { log.warn("error parsing message.processor.dead.message.queue.duration"); } } if (ret < 10000) { ret = 10000; } return ret; }
public static List<IEndpointDiscovery> LoadEndpointProviders(ConfigLoader cl) { if (cl == null || cl.prop == null) { throw new NullPointerException("fgsms properties file is not available."); } List<String> discovery_providers = cl.getDiscovery_providers(); List<IEndpointDiscovery> eps = new ArrayList<IEndpointDiscovery>(); for (int i = 0; i < discovery_providers.size(); i++) { try { Class t = Class.forName(discovery_providers.get(i)); IEndpointDiscovery newInstance = (IEndpointDiscovery) t.newInstance(); newInstance.LoadConfig(cl.prop); eps.add(newInstance); } catch (Exception ex) { log.warn("Unable to load endpoint provider " + discovery_providers.get(i), ex); } } return eps; } }
private static void SendLogger(String msg, SLAAction logAction, String url, String incident) { if (logAction != null) { NameValuePair GetNameValuePairByName = Utility.getNameValuePairByName(logAction.getParameterNameValue(), "Logger"); if (GetNameValuePairByName != null) { Logger l = null; if (GetNameValuePairByName.isEncrypted()) { l = Logger.getLogger(Utility.DE(GetNameValuePairByName.getValue())); } else { l = Logger.getLogger((GetNameValuePairByName.getValue())); } l.log(Level.WARN, SLACommon.getBundleString("SLALoggerPrefix") + url + " message: " + msg.toString() + " SLAFaultID: " + incident); } } else { log.warn("log action is null, defaulting"); log.log(Level.WARN, SLACommon.getBundleString("SLALoggerPrefix") + url + " message: " + msg.toString() + " SLAFaultID: " + incident); } }
log.warn(null, ex); throw new IllegalArgumentException(ex.getMessage()); ReportGeneratorPlugin plugin = (ReportGeneratorPlugin) Class.forName(reportType.getType()).newInstance(); } catch (Throwable t) { log.warn(null, t); throw new IllegalArgumentException(reportType.getType() + " could not be initialized");
log.warn("check for configuration file, uddi.properties", ex); return;
log.warn("check for configuration file, uddi.properties", ex); return;