Ejemplo n.º 1
0
  public void addStatementEventListener(StatementEventListener sel) {
    if (logger.isLoggable(MLevel.INFO))
      logger.info(
          "Per the JDBC4 spec, "
              + this.getClass().getName()
              + " accepts StatementListeners, but for now there is no circumstance under which they are notified!");

    ses.addStatementEventListener(sel);
  }
 static {
   String excludeStr =
       C3P0Config.getMultiPropertiesConfig().getProperty(EXCLUDE_IDENTITY_TOKEN_KEY);
   if (excludeStr == null) EXCLUDE_IDENTITY_TOKEN = false;
   else EXCLUDE_IDENTITY_TOKEN = Boolean.parseBoolean(excludeStr.trim().toLowerCase());
   if (EXCLUDE_IDENTITY_TOKEN)
     logger.info(
         EXCLUDE_IDENTITY_TOKEN_KEY
             + " set to true; please ensure unique dataSourceName values are set for all PooledDataSources.");
 }
 private synchronized C3P0PooledConnectionPoolManager getPoolManager() throws SQLException {
   if (poolManager == null) {
     ConnectionPoolDataSource cpds = assertCpds();
     poolManager =
         new C3P0PooledConnectionPoolManager(
             cpds, null, null, this.getNumHelperThreads(), this.getIdentityToken());
     if (logger.isLoggable(MLevel.INFO))
       logger.info(
           "Initializing c3p0 pool... "
               + this.toString() /* + "; using pool manager: " + poolManager */);
   }
   return poolManager;
 }
Ejemplo n.º 4
0
 // must be called from a static sync'ed method
 private static void banner() {
   if (!banner_printed) {
     if (logger.isLoggable(MLevel.INFO))
       logger.info(
           "Initializing c3p0-"
               + C3P0Substitutions.VERSION
               + " [built "
               + C3P0Substitutions.TIMESTAMP
               + "; debug? "
               + C3P0Substitutions.DEBUG
               + "; trace: "
               + C3P0Substitutions.TRACE
               + ']');
     banner_printed = true;
   }
 }