Tabnine Logo
ConnectionSourceBase
Code IndexAdd Tabnine to your IDE (free)

How to use
ConnectionSourceBase
in
ch.qos.logback.core.db

Best Java code snippets using ch.qos.logback.core.db.ConnectionSourceBase (Showing top 16 results out of 315)

origin: camunda/camunda-bpm-platform

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
 Connection connection = null;
 try {
  connection = getConnection();
  if (connection == null) {
   addWarn("Could not get a connection");
   return;
  }
  DatabaseMetaData meta = connection.getMetaData();
  DBUtil util = new DBUtil();
  util.setContext(getContext());
  supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
  supportsBatchUpdates = util.supportsBatchUpdates(meta);
  dialectCode = DBUtil.discoverSQLDialect(meta);
  addInfo("Driver name="+meta.getDriverName());
  addInfo("Driver version="+meta.getDriverVersion());
  addInfo("supportsGetGeneratedKeys="+supportsGetGeneratedKeys);
  
 } catch (SQLException se) {
  addWarn("Could not discover the dialect to use.", se);
 } finally {
  DBHelper.closeConnection(connection);
 }
}
origin: camunda/camunda-bpm-platform

@Override
public void start() {
 if (dataSource == null) {
  addWarn("WARNING: No data source specified");
 } else {
  discoverConnectionProperties();
  if (!supportsGetGeneratedKeys()
    && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
   addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
  }
 }
 super.start();
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnnectionProperties() {
 try {
  Connection connection = getConnection();
  if (connection == null) {
   addWarn("Could not get a connection");
   return;
  }
  DatabaseMetaData meta = connection.getMetaData();
  DBUtil util = new DBUtil();
  util.setContext(getContext());
  supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
  supportsBatchUpdates = util.supportsBatchUpdates(meta);
  dialectCode = DBUtil.discoverSQLDialect(meta);
  System.out.println("Driver name="+meta.getDriverName());
  System.out.println("Driver version="+meta.getDriverVersion());
  System.out.println("supportsGetGeneratedKeys="+supportsGetGeneratedKeys);
  
 } catch (SQLException se) {
  addWarn("Could not discover the dialect to use.", se);
 }
}
origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
 try {
  Connection connection = getConnection();
  if (connection == null) {
   addWarn("Could not get a connection");
   return;
  }
  DatabaseMetaData meta = connection.getMetaData();
  DBUtil util = new DBUtil();
  util.setContext(getContext());
  supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
  supportsBatchUpdates = util.supportsBatchUpdates(meta);
  dialectCode = DBUtil.discoverSQLDialect(meta);
  addInfo("Driver name="+meta.getDriverName());
  addInfo("Driver version="+meta.getDriverVersion());
  addInfo("supportsGetGeneratedKeys="+supportsGetGeneratedKeys);
  
 } catch (SQLException se) {
  addWarn("Could not discover the dialect to use.", se);
 }
}
origin: io.virtdata/virtdata-lib-realer

@Override
public void start() {
  if (dataSource == null) {
    addWarn("WARNING: No data source specified");
  } else {
    discoverConnectionProperties();
    if (!supportsGetGeneratedKeys() && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
      addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
    }
  }
  super.start();
}
origin: ch.qos.logback/core

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
 try {
  Connection connection = getConnection();
  if (connection == null) {
   addWarn("Could not get a connection");
   return;
  }
  DatabaseMetaData meta = connection.getMetaData();
  DBUtil util = new DBUtil();
  util.setContext(getContext());
  supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
  supportsBatchUpdates = util.supportsBatchUpdates(meta);
  dialectCode = DBUtil.discoverSQLDialect(meta);
  addInfo("Driver name="+meta.getDriverName());
  addInfo("Driver version="+meta.getDriverVersion());
  addInfo("supportsGetGeneratedKeys="+supportsGetGeneratedKeys);
  
 } catch (SQLException se) {
  addWarn("Could not discover the dialect to use.", se);
 }
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
public void start() {
  if (dataSource == null) {
    addWarn("WARNING: No data source specified");
  } else {
    discoverConnectionProperties();
    if (!supportsGetGeneratedKeys() && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
      addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
    }
  }
  super.start();
}
origin: com.hynnet/logback-core

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
 Connection connection = null;
 try {
  connection = getConnection();
  if (connection == null) {
   addWarn("Could not get a connection");
   return;
  }
  DatabaseMetaData meta = connection.getMetaData();
  DBUtil util = new DBUtil();
  util.setContext(getContext());
  supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
  supportsBatchUpdates = util.supportsBatchUpdates(meta);
  dialectCode = DBUtil.discoverSQLDialect(meta);
  addInfo("Driver name="+meta.getDriverName());
  addInfo("Driver version="+meta.getDriverVersion());
  addInfo("supportsGetGeneratedKeys="+supportsGetGeneratedKeys);
  
 } catch (SQLException se) {
  addWarn("Could not discover the dialect to use.", se);
 } finally {
  DBHelper.closeConnection(connection);
 }
}
origin: Nextdoor/bender

@Override
public void start() {
  if (dataSource == null) {
    addWarn("WARNING: No data source specified");
  } else {
    discoverConnectionProperties();
    if (!supportsGetGeneratedKeys() && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
      addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
    }
  }
  super.start();
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
  Connection connection = null;
  try {
    connection = getConnection();
    if (connection == null) {
      addWarn("Could not get a connection");
      return;
    }
    DatabaseMetaData meta = connection.getMetaData();
    DBUtil util = new DBUtil();
    util.setContext(getContext());
    supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
    supportsBatchUpdates = util.supportsBatchUpdates(meta);
    dialectCode = DBUtil.discoverSQLDialect(meta);
    addInfo("Driver name=" + meta.getDriverName());
    addInfo("Driver version=" + meta.getDriverVersion());
    addInfo("supportsGetGeneratedKeys=" + supportsGetGeneratedKeys);
  } catch (SQLException se) {
    addWarn("Could not discover the dialect to use.", se);
  } finally {
    DBHelper.closeConnection(connection);
  }
}
origin: com.hynnet/logback-core

@Override
public void start() {
 if (dataSource == null) {
  addWarn("WARNING: No data source specified");
 } else {
  discoverConnectionProperties();
  if (!supportsGetGeneratedKeys()
    && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
   addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
  }
 }
 super.start();
}
origin: Nextdoor/bender

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
  Connection connection = null;
  try {
    connection = getConnection();
    if (connection == null) {
      addWarn("Could not get a connection");
      return;
    }
    DatabaseMetaData meta = connection.getMetaData();
    DBUtil util = new DBUtil();
    util.setContext(getContext());
    supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
    supportsBatchUpdates = util.supportsBatchUpdates(meta);
    dialectCode = DBUtil.discoverSQLDialect(meta);
    addInfo("Driver name=" + meta.getDriverName());
    addInfo("Driver version=" + meta.getDriverVersion());
    addInfo("supportsGetGeneratedKeys=" + supportsGetGeneratedKeys);
  } catch (SQLException se) {
    addWarn("Could not discover the dialect to use.", se);
  } finally {
    DBHelper.closeConnection(connection);
  }
}
origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

@Override
public void start() {
 if (dataSource == null) {
  addWarn("WARNING: No data source specified");
 } else {
  Connection connection = null;
  try {
   connection = getConnection();
  } catch (SQLException se) {
   addWarn("Could not get a connection to discover the dialect to use.",
     se);
  }
  if (connection != null) {
   discoverConnectionProperties();
  }
  if (!supportsGetGeneratedKeys()
    && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
   addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
  }
 }
 super.start();
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Learn relevant information about this connection source.
 *
 */
public void discoverConnectionProperties() {
  Connection connection = null;
  try {
    connection = getConnection();
    if (connection == null) {
      addWarn("Could not get a connection");
      return;
    }
    DatabaseMetaData meta = connection.getMetaData();
    DBUtil util = new DBUtil();
    util.setContext(getContext());
    supportsGetGeneratedKeys = util.supportsGetGeneratedKeys(meta);
    supportsBatchUpdates = util.supportsBatchUpdates(meta);
    dialectCode = DBUtil.discoverSQLDialect(meta);
    addInfo("Driver name=" + meta.getDriverName());
    addInfo("Driver version=" + meta.getDriverVersion());
    addInfo("supportsGetGeneratedKeys=" + supportsGetGeneratedKeys);
  } catch (SQLException se) {
    addWarn("Could not discover the dialect to use.", se);
  } finally {
    DBHelper.closeConnection(connection);
  }
}
origin: ch.qos.logback/core

@Override
public void start() {
 if (dataSource == null) {
  addWarn("WARNING: No data source specified");
 } else {
  Connection connection = null;
  try {
   connection = getConnection();
  } catch (SQLException se) {
   addWarn("Could not get a connection to discover the dialect to use.",
     se);
  }
  if (connection != null) {
   discoverConnectionProperties();
  }
  if (!supportsGetGeneratedKeys()
    && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
   addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
  }
 }
 super.start();
}
origin: com.alibaba.citrus.tool/antx-autoexpand

@Override
public void start() {
 if (dataSource == null) {
  addWarn("WARNING: No data source specified");
 } else {
  Connection connection = null;
  try {
   connection = getConnection();
  } catch (SQLException se) {
   addWarn("Could not get a connection to discover the dialect to use.",
     se);
  }
  if (connection != null) {
   discoverConnnectionProperties();
  }
  if (!supportsGetGeneratedKeys()
    && getSQLDialectCode() == SQLDialectCode.UNKNOWN_DIALECT) {
   addWarn("Connection does not support GetGeneratedKey method and could not discover the dialect.");
  }
 }
 super.start();
}
ch.qos.logback.core.dbConnectionSourceBase

Most used methods

  • addWarn
  • getConnection
  • getContext
  • start
  • addInfo

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • getContentResolver (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 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