亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dbpool.html

?? 數據庫連接池dbpool_v4.8.3.zip
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
<html>
<head>
<title>Database Connection Pooling</title>
<meta name="Author" content="Giles Winstanley">
<meta name="keywords" content="DBPool, dbpool, database, jdbc, connection, pool, Pool, pooling, Pooling, connection pool, java, oracle, mysql">
<link rel="stylesheet" href="style.css" type="text/css">
</head>

<body bgcolor="#D0D0D0">
<div align="center">
<table border="0" width="85%"><tr><td>

<!-- Start main page here  -->


<div align="center">
<h1>DBPool - Java Database Connection Pooling</h1>
<p>Copyright &copy; Giles Winstanley<br>
Last updated: 21st July 2006<br>
Latest version: 4.8.3</p>
</div>


<hr size="1">


<h2>What is DBPool?</h2>

<p>A Java-based database connection pooling utility, which supports time-based expiry and statement caching, connection validation, and easy configuration using a pool manager. Also included is a generic object pool which can be extended to create your own pools of custom types.</p>

<p><b>Licence Agreement</b><br>
Currently you may freely use DBPool in all applications, both commercial and non-commercial, provided it is used for the purpose intended as stated in this document. The source code is provided for reference, but you are not permitted in any way to use the code for purposes other than that which is intended. You are permitted to redistribute the original code on the condition that it is also distributed with the original documentation. If the code is changed in any way and then redistributed an acknowledgment to the source of the material must be made along with a link to the website (<a href="http://www.snaq.net">www.snaq.net</a>), <em>and it must be made plainly clear that the code has been modified from the original</em>. It is not permitted to distribute a modified version of DBPool for commercial purposes without explicit permission from the author.</p>
<p><b>Disclaimer</b><br>
Whilst the product has been developed with the utmost care, the author takes no responsibility for the failure of DBPool in either commercial or non-commercial operation.</p>

<h2>Why would I use it?</h2>

<p>Applications that make use of databases often need to frequently obtain connections to the database. For example, a popular website that is serving out information from a back-end database may need to obtain a database connection for each client who is requesting a page with their browser. To ensure the application is capable of responding to each client fast enough we need to profile the time spent performing each of it's tasks. One of the most expensive tasks involving accessing databases is the initial creation of the connection. Once the connection has been made the transaction often takes place very quickly. This is where the connection pool comes in, by retaining a pool of already-opened connections so the application can simply grab one when it needs to, use it, and then hand it back, without the long wait for the initial creation of the connection.</p>


<h2>Where can I get it?</h2>

<p>Select one of the links below to download the version you require.</p>
<ul>
	<li><a href="DBPool_v4.8.3.zip">Download DBPool as ZIP</a> - contains JAR file &amp; all documentation
	<li><a href="DBPool_v4.8.3.jar">Download DBPool as JAR</a> and <a href="DBPool_v4.8.3_javadoc.zip">DBPool_javadoc.zip</a>
	<li><a href="DBPool_v4.8.3_src.zip">Download DBPool source</a>
</ul>


<a name="Requirements"></a><h2>What do I need to use it?</h2>

<p>The latest version requires Java 1.4 or greater, supporting the JDBC 3.0 specification. Versions 4.x have been updated to support the JDBC 3.0 specification and are not JDBC 2.0 compatible. Version 5.0 is in progress which aims to provide support for both specifications, and will hopefully be released soon once final changes are finalised and the testing is completed.</p>


<a name="Support"></a><h2>What about support?</h2>

<p><b>Please make sure you have read this documentation before sending a support email.</b> I frequently receive support emails from people who seem to have simply been too lazy to read the documentation and find which bits are relevant to them. Unsurprisingly I am not overly helpful to those people, and point them back to the documentation. Please remember to check here first, as you may find an updated version of the library. If you still need to ask for help, <b>please send all support emails concerning DBPool to <a href="mailto:support@snaq.net">this address</a></b>, and include as much information as possible to help diagnose the problem, including log file, stack traces, and source code, and properties file where appropriate. I will endeavour to reply as soon as possible, but due to the nature of my work (a lot of travel) it is possible that I won't be able to reply quickly.</p>

<p>If you would like to be added to the DBPool mailing list list to receive notification of new versions when they are released, send an email to the <a href="mailto:support@snaq.net?subject=Mailing List Subscription">support address</a> with your email contact details, asking to be added to the list.</p>


<hr size="1">


<h2>How do I use it?</h2>

<p>To use DBPool you need to have the JAR file (inside the ZIP file if you downloaded that) in a location where it's available for use by the host system you are using. For standalone applications this is usually simply within the CLASSPATH, but with many application servers a specific directory is recommended for JAR libraries. (For example, when used with Apache Tomcat it can be placed in the &lt;webapp&gt;/WEB-INF/lib directory.)</p>

<p>Usually DBPool is used in two different ways:</p>
<ol>
<li>Direct use of individual connection pools.
<li>Using the ConnectionPoolManager to manage multiple connection pools.
</ol>

<p>If you have never used DBPool before it's recommended that you start by simply integrating a <a href="#ConnectionPool">single connection pool</a> into your application/applet to see how it works and performs. This provides the simplest direct support for pooled database connections and will get you up and running quickly. Once you learn exactly how it behaves and the benefits it can give you can try the <a href="#ConnectionPoolManager">pool manager</a> approach to manage multiple pools if necessary.</p>

<p>If you require connection pooling for an application server hosted project such as a web application it is recommended that you use the <a href="#ConnectionPoolManager">pool manager</a>. This allows you to define the pooling parameters in an external file which allows you to change the parameters without recompilation of a possibly large project.</p>


<hr size="1">


<a name="ConnectionPool"></a><h3>Using a ConnectionPool</h3>

<p>Direct use of ConnectionPool objects can provide substantial performance gains for applications with minimum changes to the previous non-pooling code. A single ConnectionPool object provides a centralized location for access to connections to a single database with specific authentication credentials and parameters.</p>

<p>To create a single connection pool use a line like the following:</p>
<pre>
	ConnectionPool pool = new ConnectionPool(&lt;poolname&gt;,
 	                                         &lt;maxpool&gt;,
	                                         &lt;maxconn&gt;,
	                                         &lt;expiry&gt;,
	                                         &lt;url&gt;,
	                                         &lt;username&gt;,
	                                         &lt;password&gt;);
</pre>
<p>or...</p>
<pre>
	ConnectionPool pool = new ConnectionPool(&lt;poolname&gt;,
	                                         &lt;maxpool&gt;,
	                                         &lt;maxconn&gt;,
	                                         &lt;expiry&gt;,
	                                         &lt;url&gt;,
	                                         &lt;properties&gt;);
</pre>

<p>For example, to create a connection pool to access a database using the Oracle &quot;thin&quot; driver you could do something similar to this:</p>
<pre>
	String url = &quot;jdbc:oracle:thin:@myDB.myISP.com:1521:test&quot;;
	ConnectionPool pool = new ConnectionPool(&quot;local&quot;,
	                                         10,
	                                         30,
	                                         180000,  // milliseconds
	                                         url,
	                                         &quot;b_lightyear&quot;,
	                                         &quot;BeyondInfinity&quot;);
</pre>

<p>To obtain a Connection object from the pool and use it you can now do this:</p>
<pre>
	Connection con = null;
	long timeout = 2000;  // 2 second timeout
	try
	{
	  con = pool.getConnection(timeout);
	  if (con != null)
	    <i>...use the connection...</i>
	  else
	    <i>...do something else (timeout occurred)...</i>
	}
	catch (SQLException sqle)
	{
	  <i>...deal with exception...</i>
	}
	finally
	{
	  try { con.close(); }
	  catch (SQLException e) { ... }
	}
</pre>

<p>Once you are finished with the entire connection pool you should release the resources held by the pool:</p>
<pre>
	pool.release();
</pre>

<p>In addition to this basic use, you can initialize a number of connections within the pool. This is useful on applications startup, for instance, when you would like to create the connections so the first users to access the database don't have to wait for a connection to be created. It is advisable, and it makes the most sense, to do this just after creation of the ConnectionPool object:</p>
<pre>
	String url = &quot;jdbc:mysql://localhost:3306/homeDB&quot;;
	ConnectionPool pool = new ConnectionPool(&quot;local&quot;, 10, 20, 0, url, &quot;Nemo&quot;, &quot;LuckyFin&quot;);
	pool.init(10);
</pre>

<p>The example above will initialize all the available connections in the pool. The connections are created in a seperate thread, so that the application can get on with other things while the initialization is performed in the background.</p>


<hr size="1">


<a name="ConnectionPoolManager"></a><h3>Using the ConnectionPoolManager</h3>

<p>The ConnectionPoolManager provides comprehensive support for external definition of the behaviour of each connection pool, and additionally can manage multiple pools easily. (Better still, it even has integral support for multiple pool managers, allowing you to define pools from multiple sources, but this is seldom required.)</p>

<p>Conceptually a single pool manager provides access to a number of ConnectionPool objects, each of which provides access to a user-specified database source. For each pool manager the user specifies the JDBC drivers required, the log file for output, and the parameters for each connection pool. With this information the pool manager registers the necessary JDBC drivers and creates the pools ready for use. The log file shows a trace of the manager's activity, along with the activity of each of it's pools.</p>

<p>To use a pool manager you first need to obtain an instance of ConnectionPoolManager. This can be done in several different ways depending on your exact requirements, but the two easiest options are:</p>
<pre>
	ConnectionPoolManager.getInstance();
	ConnectionPoolManager.getInstance(File);
</pre>

<p>The <code>getInstance()</code> method returns an instance defined by the default properties file, which needs to be within the CLASSPATH (or equivalent location for specific host system). The <code>getInstance(File)</code> method returns an instance defined by the file specified. When either of these methods is called it either returns the requested instance immediately (if it already exists), or first creates the pools required and then returns the instance.</p>

<p>It is also possible to define properties using a user-specified file within the CLASSPATH, or even using a Properties object. Each option is explained in the following table:</p>
<blockquote>
<table border="1" cellspacing="0" cellpadding="3">
<tr>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
开心九九激情九九欧美日韩精美视频电影| 国产精品12区| 亚洲图片欧美色图| 午夜精品123| 国产一区不卡在线| gogo大胆日本视频一区| av一区二区三区四区| 国产 日韩 欧美大片| 99精品国产视频| 精品剧情v国产在线观看在线| 精品美女一区二区| 日本美女一区二区三区| 不卡av在线网| 久久久久久麻豆| 亚洲综合无码一区二区| 波多野结衣一区二区三区| 日韩欧美国产一区二区三区| 日韩av电影一区| 高清不卡一区二区| 欧美精品亚洲二区| 亚洲欧美日本韩国| 国产乱理伦片在线观看夜一区| 色激情天天射综合网| 国产欧美一区二区三区沐欲| 免费三级欧美电影| 欧洲一区在线电影| 日韩欧美一区中文| 久久国产精品区| 精品国产乱码久久久久久蜜臀 | 欧美成人精品1314www| 亚洲美女电影在线| 色婷婷国产精品| 亚洲乱码国产乱码精品精小说| 国产91清纯白嫩初高中在线观看| 日韩欧美亚洲另类制服综合在线| 亚洲午夜精品在线| 欧美午夜理伦三级在线观看| 亚洲少妇最新在线视频| 一本久道久久综合中文字幕 | 欧美日韩一区在线观看| 伊人开心综合网| 91丨porny丨最新| 亚洲一区二三区| 欧美日韩一级二级| 久久99精品久久久久久动态图| 欧美一区二区视频网站| 免费av网站大全久久| 久久夜色精品国产噜噜av| 韩国精品久久久| 中文字幕成人网| 欧美午夜在线观看| 极品美女销魂一区二区三区免费| 亚洲国产激情av| 色综合天天狠狠| 久久精工是国产品牌吗| 国产精品少妇自拍| 91精品国产综合久久久久久漫画| 国产毛片精品视频| 亚洲一区二区高清| 欧美国产精品中文字幕| 欧美日产国产精品| www.日韩大片| 精品一区二区影视| 亚洲国产一区在线观看| 久久久国际精品| 欧美顶级少妇做爰| 色一情一乱一乱一91av| 国产一区久久久| 青草av.久久免费一区| 久久99精品久久久久久动态图 | 91美女精品福利| 成人免费高清在线观看| 国产成人免费在线| 国产成人av电影在线播放| 日产国产高清一区二区三区| 亚洲人精品午夜| 国产精品大尺度| 国产精品青草久久| 国产精品不卡一区二区三区| 国产亚洲女人久久久久毛片| 亚洲精品一线二线三线无人区| 欧美一级理论片| 日韩一区二区不卡| 日韩精品一区二区三区在线观看| 欧美一区二区黄色| 精品国产sm最大网站| 精品99999| 国产精品第五页| 婷婷成人综合网| 另类小说欧美激情| 国产在线不卡一卡二卡三卡四卡| 国产一区视频在线看| 97精品久久久午夜一区二区三区 | 国产精品久久久久婷婷| 日韩精品1区2区3区| 国产精品18久久久久| 97久久人人超碰| 欧美成人aa大片| 一区二区三区国产| 免费一级欧美片在线观看| 成人一级片网址| 91精品婷婷国产综合久久 | 国产精品一品二品| 欧美日韩国产一级片| 欧美韩国日本不卡| 日本视频中文字幕一区二区三区| 久久国产精品露脸对白| 精品视频资源站| 一色桃子久久精品亚洲| 久久99久久精品欧美| 欧美日本韩国一区二区三区视频| 国产欧美一区二区精品性色超碰 | 欧美自拍偷拍午夜视频| 久久精品水蜜桃av综合天堂| 午夜视频一区在线观看| 91麻豆蜜桃一区二区三区| 欧美精品一区二区三区在线| 五月婷婷综合网| 在线观看av一区| 麻豆精品视频在线观看免费 | 亚洲一区二区在线观看视频| 国产91丝袜在线播放九色| 欧美tk—视频vk| 蜜芽一区二区三区| 日韩一区二区三区精品视频| 天堂av在线一区| 欧美成人精精品一区二区频| 久久超级碰视频| 精品久久久久久亚洲综合网| 久久国产欧美日韩精品| 中文字幕乱码亚洲精品一区| 国产不卡在线播放| 自拍偷拍亚洲欧美日韩| 欧美网站一区二区| 日韩av在线免费观看不卡| 日韩欧美中文字幕精品| 国产一区美女在线| 综合色天天鬼久久鬼色| 精品污污网站免费看| 久久精品国产99国产精品| 欧美激情一区二区三区不卡 | 成人欧美一区二区三区黑人麻豆| 91麻豆精品秘密| 青青青伊人色综合久久| 亚洲国产精品av| 777色狠狠一区二区三区| 99久久久久久| 国产乱码精品一区二区三区忘忧草| 国产精品拍天天在线| 日韩午夜精品电影| 日本高清免费不卡视频| 国产高清精品网站| 奇米影视一区二区三区小说| 亚洲一区二区欧美日韩| 国产精品亲子乱子伦xxxx裸| 欧美一区二区三级| 欧美色男人天堂| 91丨porny丨在线| 国产精一区二区三区| 午夜婷婷国产麻豆精品| 欧美中文字幕一区| 理论电影国产精品| 日韩毛片高清在线播放| 日韩欧美二区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 美女在线观看视频一区二区| 亚洲欧美激情插| 国产清纯白嫩初高生在线观看91 | 欧美日韩国产大片| 91丨九色丨尤物| www.欧美亚洲| 成人av网在线| 国产成人亚洲精品狼色在线| 蜜臀av性久久久久蜜臀aⅴ| 午夜久久久久久电影| 国产精品久久午夜夜伦鲁鲁| 久久九九久精品国产免费直播| 日韩欧美123| 久久亚区不卡日本| 国产精品久久久久久久久免费樱桃| www久久精品| 中文字幕欧美区| 国产精品青草久久| 亚洲手机成人高清视频| 亚洲一区二三区| 日本强好片久久久久久aaa| 亚洲色图另类专区| 亚洲国产欧美日韩另类综合| 亚洲国产精品一区二区www| 亚洲一二三级电影| 青娱乐精品在线视频| 国产精品一区二区在线播放| 日本中文一区二区三区| 国产在线日韩欧美| 91在线看国产| 欧美三片在线视频观看| 欧美一区2区视频在线观看| 精品久久久久久久久久久久久久久 | 中文字幕不卡在线播放| 亚洲精品精品亚洲|