itVincent Blog - Java Working Fun!

          技術引領時代!
          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導入jar:
          <dependency>
              <groupId>com.jolbox</groupId>
              <artifactId>bonecp</artifactId>
              <version>0.6.5-rc2</version>
             </dependency>

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

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

          在spring配置數據源:
          <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>


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


          網站導航:
           
          主站蜘蛛池模板: 高邮市| 沁源县| 天长市| 永城市| 郓城县| 武乡县| 英山县| 赤城县| 安化县| 洛南县| 吴忠市| 斗六市| 伊春市| 鹤山市| 邹平县| 紫阳县| 息烽县| 石门县| 莱阳市| 襄垣县| 吐鲁番市| 辽阳市| 东丽区| 绵竹市| 江山市| 马山县| 武义县| 宜良县| 濉溪县| 资阳市| 杭锦后旗| 洛扎县| 阿拉善盟| 望城县| 曲麻莱县| 石台县| 咸宁市| 佛冈县| 浪卡子县| 朝阳县| 通河县|