Codota Logo
DataSourceConfig.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.avaje.ebean.config.DataSourceConfig
constructor

Best Java code snippets using com.avaje.ebean.config.DataSourceConfig.<init> (Showing top 7 results out of 315)

  • Common ways to obtain DataSourceConfig
private void myMethod () {
DataSourceConfig d =
  • Codota Iconnew DataSourceConfig()
  • Codota IconServerConfig serverConfig;serverConfig.getDataSourceConfig()
  • Smart code suggestions by Codota
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-server

public DataSourcePool getDataSource(String name, DataSourceConfig dsConfig){
  
  if (name == null){
    throw new IllegalArgumentException("name not defined");
  }
      
  synchronized(monitor){
    DataSourcePool pool = dsMap.get(name);
    if (pool == null){
      if (dsConfig == null){
        dsConfig = new DataSourceConfig();
        dsConfig.loadSettings(name);
      }
      pool = new DataSourcePool(this, name, dsConfig);
      dsMap.put(name, pool); 
    }
    return pool;
  }
}
 
origin: org.avaje/ebean

public DataSourcePool getDataSource(String name, DataSourceConfig dsConfig){
  
  if (name == null){
    throw new IllegalArgumentException("name not defined");
  }
      
  synchronized(monitor){
    DataSourcePool pool = dsMap.get(name);
    if (pool == null){
      if (dsConfig == null){
        dsConfig = new DataSourceConfig();
        dsConfig.loadSettings(name);
      }
      pool = new DataSourcePool(this, name, dsConfig);
      dsMap.put(name, pool); 
    }
    return pool;
  }
}
 
origin: MinecraftWars/Gringotts

public void configureDbConfig(ServerConfig config) {
  Validate.notNull(config, "Config cannot be null");
  DataSourceConfig ds = new DataSourceConfig();
  ds.setDriver("org.sqlite.JDBC");
  ds.setUrl("jdbc:sqlite:{DIR}{NAME}.db");
  ds.setUsername("bukkit");
  ds.setPassword("walrus");
  ds.setIsolationLevel(TransactionIsolation.getLevel("SERIALIZABLE"));
  if (ds.getDriver().contains("sqlite")) {
    config.setDatabasePlatform(new SQLitePlatform());
    config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
  }
  config.setDataSourceConfig(ds);
}
origin: MrNeuronix/IRISv2

config.setName("iris");
DataSourceConfig ds = new DataSourceConfig();
ds.loadSettings("iris");
origin: com.khubla.pragmatach/pragmatach-ebean

final DataSourceConfig dataSourceConfig = new DataSourceConfig();
dataSourceConfig.setDriver(Application.getConfiguration().getParameter("ebean.driver"));
dataSourceConfig.setUsername(Application.getConfiguration().getParameter("ebean.username"));
origin: org.avaje/ebean

dataSourceConfig = new DataSourceConfig();
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

dataSourceConfig = new DataSourceConfig();
com.avaje.ebean.configDataSourceConfig<init>

Popular methods of DataSourceConfig

  • getUrl
    Return the connection URL.
  • loadSettings
    Load the settings from ebean.properties.
  • setUrl
    Set the connection URL.
  • getDriver
    Return the database driver.
  • getCustomProperties
    Return a map of custom properties for the jdbc driver connection.
  • getHeartbeatSql
    Return a SQL statement used to test the database is accessible. Note that if this is not set then it
  • getIsolationLevel
    Return the transaction isolation level.
  • getLeakTimeMinutes
    Return the time in minutes after which a connection could be considered to have leaked.
  • getMaxConnections
    Return the maximum number of connections the pool can reach.
  • getMaxInactiveTimeSecs
    Return the time in seconds a connection can be idle after which it can be trimmed from the pool. Thi
  • getMaxStackTraceSize
    Return the max size for reporting stack traces on busy connections.
  • getMinConnections
    Return the minimum number of connections the pool should maintain.
  • getMaxStackTraceSize,
  • getMinConnections,
  • getPassword,
  • getPoolListener,
  • getPstmtCacheSize,
  • getUsername,
  • getWaitTimeoutMillis,
  • isCaptureStackTrace,
  • isOffline

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • addToBackStack (FragmentTransaction)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Option (scala)
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