Examples of DriverManagerConnectionSource


Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

    context = new AccessContext();
    context.setName("default");
    appender = new DBAppender();
    appender.setName("DB");
    appender.setContext(context);
    connectionSource = new DriverManagerConnectionSource();
    connectionSource.setContext(context);
    connectionSource.setDriverClass(DBAppenderHSQLTestFixture.DRIVER_CLASS);
    connectionSource.setUrl(DB_APPENDER_HSQL_TEST_FIXTURE.url);
    connectionSource.setUser(DB_APPENDER_HSQL_TEST_FIXTURE.user);
    connectionSource.setPassword(DB_APPENDER_HSQL_TEST_FIXTURE.password);
View Full Code Here

Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

    lc.setName("default");
    logger = lc.getLogger("root");
    appender = new DBAppender();
    appender.setName("DB");
    appender.setContext(lc);
    connectionSource = new DriverManagerConnectionSource();
    connectionSource.setContext(lc);
    connectionSource.setDriverClass(DBAppenderHSQLTestFixture.HSQLDB_DRIVER_CLASS);
    connectionSource.setUrl(DB_APPENDER_HSQL_TEST_FIXTURE.url);
    connectionSource.setUser(DB_APPENDER_HSQL_TEST_FIXTURE.user);
    connectionSource.setPassword(DB_APPENDER_HSQL_TEST_FIXTURE.password);
View Full Code Here

Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

    loggerContext.setName("default");
    logger = loggerContext.getLogger("root");
    appender = new DBAppender();
    appender.setName("DB");
    appender.setContext(loggerContext);
    connectionSource = new DriverManagerConnectionSource();
    connectionSource.setContext(loggerContext);
    connectionSource.setDriverClass(DBAppenderH2TestFixture.H2_DRIVER_CLASS);
    connectionSource.setUrl(dbAppenderH2TestFixture.url);
    System.out.println("cs.url=" + dbAppenderH2TestFixture.url);
    connectionSource.setUser(dbAppenderH2TestFixture.user);
View Full Code Here

Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

    StatusChecker checker = new StatusChecker(lc);
    checker.assertIsErrorFree();
  }

  long getLastEventId() throws SQLException {
    DriverManagerConnectionSource cs = getConnectionSource();

    Connection con = cs.getConnection();
    Statement statement = con.createStatement();
    statement.setMaxRows(1);
    ResultSet rs = statement
        .executeQuery("select event_id from logging_event order by event_id desc");
    rs.next();
View Full Code Here

Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

    verifyProperty(lastEventId);

  }

  void verifyDebugMsg(long lastEventId) throws SQLException {
    DriverManagerConnectionSource cs = getConnectionSource();
    Connection con = cs.getConnection();
    Statement statement = con.createStatement();
    ResultSet rs = statement
        .executeQuery("select formatted_message from logging_event where event_id='"
            + (lastEventId - 1) + "'");
    rs.next();
View Full Code Here

Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

    assertEquals("This is a debug message. Message number: " + (diff + 5), msg);
  }

  @SuppressWarnings("unchecked")
  void verifyProperty(long lastEventId) throws SQLException {
    DriverManagerConnectionSource cs = getConnectionSource();
    Connection con = cs.getConnection();
    Statement statement = con.createStatement();
    ResultSet rs = statement
        .executeQuery("select mapped_key, mapped_value from logging_event_property where event_id='"
            + (lastEventId - 1) + "'");
 
View Full Code Here

Examples of ch.qos.logback.core.db.DriverManagerConnectionSource

   
    assertEquals(witness, map);
  }

  void verifyException(long lastEventId) throws SQLException {
    DriverManagerConnectionSource cs = getConnectionSource();
    Connection con = cs.getConnection();
    Statement statement = con.createStatement();
    ResultSet rs = statement
        .executeQuery("select trace_line from logging_event_exception where event_id='"
            + (lastEventId) + "' AND I='0'");
    rs.next();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.