itVincent Blog - Java Working Fun!

          技術(shù)引領(lǐng)時代!
          posts - 117, comments - 181, trackbacks - 0, articles - 12
          BoneCP 是一個開源的快速的 JDBC 連接池

          有以下特性:
          Highly scalable, fast connection pool
          Callback (hook interceptor) mechanisms on a change of connection state.
          Partitioning capability to increase performance
          Allows direct access to a connection
          Automatic resizing of pool
          Statement caching support
          Support for obtaining a connection asynchronously (by returning a Future<Connection>)
          Release helper threads to release a connection in an asynchronous fashion for higher performance.
          Easy mechanism to execute a custom statement on each newly obtained connection (initSQL).
          Support to switch to a new database at runtime without shutting down an application
          Ability to replay any failed transaction automatically (for the case where database/network goes down etc)
          JMX support
          Lazy initialization capable
          Automatic validation of connections (keep-alives etc)
          Allow obtaining of new connections via a datasource rather than via a Driver
          Datasource/Hibernate support capable
          Debugging hooks to highlight the exact place where a connection was obtained but not closed
          Debugging support to show stack locations of connections that were closed twice.
          Custom pool name support.
          100% unit test code coverage (over 100 JUnit tests).
          Free, open source and written in 100% pure Java with very extensive and complete Javadocs

          =============================================================

          在maven導(dǎo)入jar:
          <dependency>
              <groupId>com.jolbox</groupId>
              <artifactId>bonecp</artifactId>
              <version>0.6.5-rc2</version>
             </dependency>

          此包沒有在官方網(wǎng)站上發(fā)布,因此在再加入
          <repository>
             <releases>
              <enabled>true</enabled>
             </releases>
             <id>bonecp-repo</id>
             <name>BoneCP Repository</name>
             <url>http://jolbox.com/bonecp/downloads/maven</url>
            </repository>

          =================================================================

          在spring配置數(shù)據(jù)源:
          <bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
              <property name="driverClass" value="${jdbc.driverClassName}" />
              <property name="jdbcUrl" value="${jdbc.url}" />
              <property name="username" value="${jdbc.username}"/>
              <property name="password" value="${jdbc.password}"/>
           </bean>


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 汉中市| 潞西市| 杭锦后旗| 玉屏| 黄大仙区| 渭源县| 安岳县| 盖州市| 东辽县| 隆昌县| 雅江县| 宁南县| 施秉县| 嘉禾县| 云梦县| 即墨市| 四平市| 北票市| 都安| 拉萨市| 河池市| 舞阳县| 西平县| 甘孜| 富平县| 卢氏县| 鸡泽县| 威远县| 建瓯市| 疏附县| 盈江县| 探索| 冕宁县| 积石山| 开鲁县| 古田县| 兴义市| 察雅县| 阜城县| 故城县| 买车|