Tabnine Logo
DataSourceConfig.getDriver
Code IndexAdd Tabnine to your IDE (free)

How to use
getDriver
method
in
com.avaje.ebean.config.DataSourceConfig

Best Java code snippets using com.avaje.ebean.config.DataSourceConfig.getDriver (Showing top 5 results out of 315)

origin: org.avaje.ebeanorm/avaje-ebeanorm-server

this.captureStackTrace = params.isCaptureStackTrace();
this.maxStackTraceSize = params.getMaxStackTraceSize();
this.databaseDriver = params.getDriver();
this.databaseUrl = params.getUrl();
this.pstmtCacheSize = params.getPstmtCacheSize();
origin: org.avaje/ebean

this.captureStackTrace = params.isCaptureStackTrace();
this.maxStackTraceSize = params.getMaxStackTraceSize();
this.databaseDriver = params.getDriver();
this.databaseUrl = params.getUrl();
this.pstmtCacheSize = params.getPstmtCacheSize();
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: org.avaje.ebeanorm/avaje-ebeanorm-server

private DataSource getDataSourceFromConfig(ServerConfig config) {
 DataSource ds = null;
 if (config.getDataSourceJndiName() != null) {
  ds = jndiDataSourceFactory.lookup(config.getDataSourceJndiName());
  if (ds == null) {
   String m = "JNDI lookup for DataSource " + config.getDataSourceJndiName() + " returned null.";
   throw new PersistenceException(m);
  } else {
   return ds;
  }
 }
 DataSourceConfig dsConfig = config.getDataSourceConfig();
 if (dsConfig == null) {
  String m = "No DataSourceConfig definded for " + config.getName();
  throw new PersistenceException(m);
 }
 if (dsConfig.isOffline()) {
  if (config.getDatabasePlatformName() == null) {
   String m = "You MUST specify a DatabasePlatformName on ServerConfig when offline";
   throw new PersistenceException(m);
  }
  return null;
 }
 if (dsConfig.getHeartbeatSql() == null) {
  // use default heartbeatSql from the DatabasePlatform
  String heartbeatSql = getHeartbeatSql(dsConfig.getDriver());
  dsConfig.setHeartbeatSql(heartbeatSql);
 }
 return DataSourceGlobalManager.getDataSource(config.getName(), dsConfig);
}
origin: org.avaje/ebean

private DataSource getDataSourceFromConfig(ServerConfig config) {
 DataSource ds = null;
 if (config.getDataSourceJndiName() != null) {
  ds = jndiDataSourceFactory.lookup(config.getDataSourceJndiName());
  if (ds == null) {
   String m = "JNDI lookup for DataSource " + config.getDataSourceJndiName() + " returned null.";
   throw new PersistenceException(m);
  } else {
   return ds;
  }
 }
 DataSourceConfig dsConfig = config.getDataSourceConfig();
 if (dsConfig == null) {
  String m = "No DataSourceConfig definded for " + config.getName();
  throw new PersistenceException(m);
 }
 if (dsConfig.isOffline()) {
  if (config.getDatabasePlatformName() == null) {
   String m = "You MUST specify a DatabasePlatformName on ServerConfig when offline";
   throw new PersistenceException(m);
  }
  return null;
 }
 if (dsConfig.getHeartbeatSql() == null) {
  // use default heartbeatSql from the DatabasePlatform
  String heartbeatSql = getHeartbeatSql(dsConfig.getDriver());
  dsConfig.setHeartbeatSql(heartbeatSql);
 }
 return DataSourceGlobalManager.getDataSource(config.getName(), dsConfig);
}
com.avaje.ebean.configDataSourceConfiggetDriver

Javadoc

Return the database driver.

Popular methods of DataSourceConfig

  • <init>
  • getUrl
    Return the connection URL.
  • loadSettings
    Load the settings from ebean.properties.
  • setUrl
    Set the connection URL.
  • 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

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Runner (org.openjdk.jmh.runner)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now