Codota Logo
PropertyLoader
Code IndexAdd Codota to your IDE (free)

How to use
PropertyLoader
in
org.miloss.fgsms.common

Best Java code snippets using org.miloss.fgsms.common.PropertyLoader (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.mil-oss/fgsms-common

/**
 * A convenience overload of {@link #loadProperties(String, ClassLoader)}
 * that uses the current thread's context classloader.
 */
public static Properties loadProperties(final String name) {
  return loadProperties(name,
      Thread.currentThread().getContextClassLoader());
}
private static final boolean THROW_ON_LOAD_FAILURE = true;
origin: org.mil-oss/fgsms-common

@Deprecated
private static Connection getConfigurationDB_NONPOOLED_Connection_FAILOVER() {
  try {
    Properties prop = PropertyLoader.loadProperties(PropertyFilePath);
    Driver d = (Driver) Class.forName(prop.getProperty(DBdriver)).newInstance();
    DriverManager.registerDriver(d);
    Connection con = DriverManager.getConnection(
        prop.getProperty(ConfigDBURL_FAILOVER),
        prop.getProperty(ConfigUsername_FAILOVER),
        DE(prop.getProperty(ConfigPassword_FAILOVER)));
    PreparedStatement com = con.prepareStatement("select 1;");
    try {
      com.execute();
      DBUtils.safeClose(com);
      return con;
    } catch (Exception e) {
      log.log(Level.FATAL, "Error obtaining failover config database connection, attempting alternate. msg:" + e.getLocalizedMessage(), e);
      return null;
    } finally {
      DBUtils.safeClose(com);
    }
  } catch (Exception ex) {
    log.log(Level.FATAL, "Error obtaining primary conf database connection:" + ex.getLocalizedMessage(), ex);
    return null;
  }
}
origin: org.mil-oss/fgsms-common

@Deprecated
private static Connection getPerformanceDB_NONPOOLED_Connection_FAILOVER() {
  try {
    Properties prop = PropertyLoader.loadProperties(PropertyFilePath);
    Driver d = (Driver) Class.forName(prop.getProperty(DBdriver)).newInstance();
    DriverManager.registerDriver(d);
    Connection con = DriverManager.getConnection(
        prop.getProperty(PerformanceDBURL_FAILOVER),
        prop.getProperty(PerformanceUsername_FAILOVER),
        DE(prop.getProperty(PerformancePassword_FAILOVER)));
    PreparedStatement com = con.prepareStatement("select 1;");
    try {
      com.execute();
      DBUtils.safeClose(com);
      return con;
    } catch (Exception e) {
      log.log(Level.FATAL, "Error obtaining secondary perf database connection, msg:" + e.getLocalizedMessage(), e);
      return null;
    } finally {
      DBUtils.safeClose(com);
    }
  } catch (Exception ex) {
    log.log(Level.FATAL, "No connection to the secondary database could be made, msg:" + ex.getLocalizedMessage(), ex);
    return null;
  }
}
origin: org.mil-oss/fgsms-common

public static Connection getConfigurationDB_NONPOOLED_Connection() {
  try {
    Properties prop = PropertyLoader.loadProperties(PropertyFilePath);
    Driver d = (Driver) Class.forName(prop.getProperty(DBdriver)).newInstance();
    DriverManager.registerDriver(d);
origin: org.mil-oss/fgsms-common

public static Connection getPerformanceDB_NONPOOLED_Connection() {
  try {
    Properties prop = PropertyLoader.loadProperties(PropertyFilePath);
    Driver d = (Driver) Class.forName(prop.getProperty(DBdriver)).newInstance();
    DriverManager.registerDriver(d);
origin: org.mil-oss/fgsms-agentcore

  prop = PropertyLoader.loadProperties("org/miloss/fgsms/agentcore/fgsms-agent");
  log.log(Level.INFO, "Agent configuration loaded from embedded config file within fgsms-agentCore.jar. Use -Dorg.miloss.fgsms.agentConfigFileOverride=path/to/config.properties to override or include the file fgsms-agent.properties in the classpath." + Constants.Version);
} catch (Exception ex) {
origin: org.mil-oss/fgsms-qpid-jmx-agent

Properties prop = PropertyLoader.loadProperties("fgsmsqpidjmx/connection");
org.miloss.fgsms.commonPropertyLoader

Javadoc

Loads a properties file from the classpathfrom http://www.javaworld.com/javaqa/2003-08/01-qa-0808-property.html?page=2

Most used methods

  • loadProperties
    Looks up a resource named 'name' in the classpath. The resource must map to a file with .properties

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now