当前位置: 首页>>代码示例>>Java>>正文


Java ConnectionPoolDataSource.getLogWriter方法代码示例

本文整理汇总了Java中javax.sql.ConnectionPoolDataSource.getLogWriter方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionPoolDataSource.getLogWriter方法的具体用法?Java ConnectionPoolDataSource.getLogWriter怎么用?Java ConnectionPoolDataSource.getLogWriter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.sql.ConnectionPoolDataSource的用法示例。


在下文中一共展示了ConnectionPoolDataSource.getLogWriter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MiniConnectionPoolManager

import javax.sql.ConnectionPoolDataSource; //导入方法依赖的package包/类
/**
 * Constructs a MiniConnectionPoolManager object.
 *
 * @param dataSource the data source for the connections.
 * @param maxConnections the maximum number of connections.
 * @param timeout the maximum time in seconds to wait for a free connection.
 */
public MiniConnectionPoolManager(ConnectionPoolDataSource dataSource, int maxConnections,
    int timeout) {
    this.dataSource = dataSource;
    this.maxConnections = maxConnections;
    this.timeoutMs = timeout * 1000L;
    try {
        logWriter = dataSource.getLogWriter();
    } catch (SQLException e) {
    }
    if (maxConnections < 1) {
        throw new IllegalArgumentException("Invalid maxConnections value.");
    }
    semaphore = new Semaphore(maxConnections, true);
    recycledConnections = new LinkedList<PooledConnection>();
    poolConnectionEventListener = new PoolConnectionEventListener();
}
 
开发者ID:stechy1,项目名称:drd,代码行数:24,代码来源:MiniConnectionPoolManager.java

示例2: MiniConnectionPoolManager

import javax.sql.ConnectionPoolDataSource; //导入方法依赖的package包/类
/**
 * Constructs a MiniConnectionPoolManager object.
 * 
 * @param dataSource
 *            the data source for the connections.
 * @param maxConnections
 *            the maximum number of connections.
 * @param timeout
 *            the maximum time in seconds to wait for a free connection.
 */
public MiniConnectionPoolManager(ConnectionPoolDataSource dataSource,
		int maxConnections, int timeout) {
	this.dataSource = dataSource;
	this.maxConnections = maxConnections;
	this.timeoutMs = timeout * 1000L;
	try {
		logWriter = dataSource.getLogWriter();
	} catch (SQLException e) {
	}
	if (maxConnections < 1) {
		throw new IllegalArgumentException("Invalid maxConnections value.");
	}
	semaphore = new Semaphore(maxConnections, true);
	recycledConnections = new LinkedList<PooledConnection>();
	poolConnectionEventListener = new PoolConnectionEventListener();
}
 
开发者ID:jbeetle,项目名称:BJAF3.x,代码行数:27,代码来源:MiniConnectionPoolManager.java

示例3: MiniConnectionPoolManager

import javax.sql.ConnectionPoolDataSource; //导入方法依赖的package包/类
/**
 * Constructs a MiniConnectionPoolManager object.
 * 
 * @param dataSource
 *            the data source for the connections.
 * @param maxConnections
 *            the maximum number of connections.
 * @param timeout
 *            the maximum time in seconds to wait for a free connection.
 */
public MiniConnectionPoolManager(ConnectionPoolDataSource dataSource, int maxConnections, int timeout) {
	this.dataSource = dataSource;
	this.maxConnections = maxConnections;
	this.timeoutMs = timeout * 1000L;
	try {
		logWriter = dataSource.getLogWriter();
	} catch (SQLException e) {
	}
	if (maxConnections < 1) {
		throw new IllegalArgumentException("Invalid maxConnections value.");
	}
	semaphore = new Semaphore(maxConnections, true);
	recycledConnections = new LinkedList<PooledConnection>();
	poolConnectionEventListener = new PoolConnectionEventListener();
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:26,代码来源:MiniConnectionPoolManager.java

示例4: JdbcConnectionPool

import javax.sql.ConnectionPoolDataSource; //导入方法依赖的package包/类
protected JdbcConnectionPool(ConnectionPoolDataSource dataSource) {
    this.dataSource = dataSource;
    if (dataSource != null) {
        try {
            logWriter = dataSource.getLogWriter();
        } catch (SQLException e) {
            // ignore
        }
    }
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:11,代码来源:JdbcConnectionPool.java

示例5: MiniConnectionPoolManager

import javax.sql.ConnectionPoolDataSource; //导入方法依赖的package包/类
/**
* Constructs a MiniConnectionPoolManager object.
*
* @param dataSource
*    the data source for the connections.
* @param maxConnections
*    the maximum number of connections.
* @param timeout
*    the maximum time in seconds to wait for a free connection.
*/
public MiniConnectionPoolManager (ConnectionPoolDataSource dataSource, int maxConnections, int timeout) {
    this.dataSource = dataSource;
    this.maxConnections = maxConnections;
    this.timeoutMs = timeout * 1000L;
    try {
       logWriter = dataSource.getLogWriter(); }
     catch (SQLException e) {}
    if (maxConnections < 1) {
       throw new IllegalArgumentException("Invalid maxConnections value."); }
    semaphore = new Semaphore(maxConnections,true);
    recycledConnections = new LinkedList<PooledConnection>();
    poolConnectionEventListener = new PoolConnectionEventListener(); }
 
开发者ID:mikkeliamk,项目名称:osa,代码行数:23,代码来源:MiniConnectionPoolManager.java

示例6: MiniConnectionPoolManager

import javax.sql.ConnectionPoolDataSource; //导入方法依赖的package包/类
/**
* Constructs a MiniConnectionPoolManager object.
*
* @param dataSource
*    the data source for the connections.
* @param maxConnections
*    the maximum number of connections.
* @param timeout
*    the maximum time in seconds to wait for a free connection.
*/
public MiniConnectionPoolManager (ConnectionPoolDataSource dataSource, int maxConnections, int timeout) {
   this.dataSource = dataSource;
   this.maxConnections = maxConnections;
   this.timeoutMs = timeout * 1000L;
   try {
      logWriter = dataSource.getLogWriter(); }
    catch (SQLException e) {}
   if (maxConnections < 1) {
      throw new IllegalArgumentException("Invalid maxConnections value."); }
   semaphore = new Semaphore(maxConnections,true);
   recycledConnections = new LinkedList<PooledConnection>();
   poolConnectionEventListener = new PoolConnectionEventListener(); }
 
开发者ID:lathil,项目名称:Ptoceti,代码行数:23,代码来源:MiniConnectionPoolManager.java


注:本文中的javax.sql.ConnectionPoolDataSource.getLogWriter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。