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

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

?? dbpool.html

?? 數據庫連接池dbpool_v4.8.3.zip
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
	<th>Method of Access</th>
	<th>Explanation</th>
</tr>
<tr>
	<td><code>getInstance()</code>*</td>
	<td>Returns the pool manager instance as defined by the default properties file (dbpool.properties) which is located in the CLASSPATH (or equivalent location for specific host system)<sup>+</sup>.</td>
</tr>
<tr>
	<td><code>getInstance(String)</code>*</td>
	<td>Returns the pool manager instance as defined by the properties file with the filename specified, located in the CLASSPATH (or equivalent location for specific host system)<sup>+</sup>.</td>
</tr>
<tr>
	<td><code>getInstance(File)</code>*</td>
	<td>Returns the pool manager instance as defined by the properties file specified.</td>
</tr>
<tr>
	<td><code>createInstance(Properties)</code> followed by <code>getInstance()</code>*</td>
	<td>Creates a pool manager instance from the specified Properties object and makes it available via the <code>getInstance()</code> method.</td>
</tr>
<tr><td colspan="2">*<i>Note 1: Each of these methods can throw an IOException if there is a problem loading the properties from the file.</td></tr>
<tr><td colspan="2"><sup>+</sup><i>Note 2: Application servers often specify user-accessible areas differently from the CLASSPATH variable. For example, when used with Apache Tomcat it can be placed in the &lt;webapp&gt;/WEB-INF/classes directory.</td></tr>
</table>
</blockquote>

<p><i><b>Important:</b> It is not possible to use both a default properties file instance and a Properties object instance simulteneously. If the default properties file instance is obtained and not released, a call to createInstance(Properties) will fail with a RuntimeException. Aside from this limitation multiple instances of ConnectionPoolManagers can be obtained and used, each with it's own parameters.</i></p>

<p>Using these various instance accessors you have access to a theoretically unlimited number of different pool managers, although in reality using more than just one is rare.</p>

<p>So, to obtain the pool manager defined by the default properties file us:</p>
<pre>
	ConnectionPoolManager cpm = null;
	try
	{
		cpm = ConnectionPoolManager.getInstance();
	}
	catch (IOException ioe)
	{
		...
	}
</pre>

<p>This step would normally be done at the initialization stage of an application. For instance, in a web application the pool manager could be created and assigned to an application scope variable, where it could be accessed by other classes which require database access.</p>

<p>Once a reference to a pool manager has been obtained you can now checkout/checkin (obtain/return) connections from/to it's pools. To obtain a connection use the getConnection(&lt;poolname&gt;) method. This method will obtain a database connection if one is immediately available, or return null if not. If you would rather wait a certain amount of time in case a connection becomes available use the getConnection(&lt;poolname&gt;, timeout) instead, where <i>timeout</i> is specified in milliseconds. If a connection becomes available within the timeout the method will return with the connection, otherwise null is returned. Once you have finished with this connection you simply close it as you would a normal connection. On closing the connection it is cleaned up and then returned to the pool for re-use.</p>

<p>For example, the following code obtains a connection from the ConnectionPoolManager, performs some operations, then returns the connection.</p>
<blockquote><pre>
	Connection con = null;
	long timeout = 2000;  // 2 second timeout
	try
	{
	  con = cpm.getConnection(&lt;poolname&gt;, timeout);
	  if (con != null)
	    <i>...use the connection...</i>
	  else
	    <i>...do something else (timeout occurred)...</i>
	}
	catch (SQLException sqle)
	{
	  <i>...whatever...</i>
	}
	finally
	{
	  try { con.close(); }
	  catch (SQLException e) { ... }
	}
</pre></blockquote>

<p>Notice that when you have finished working with a connection you simply call it's close() method as you would normally. Instead of being closed the connection is actually recycled within the pool ready to be used again.</p>

<p>When you have completely finished with all the pools managed by a ConnectionPoolManager object you should release it to ensure all of the resources it is using are released. This is done using the call:</p>
<blockquote><pre>
	cpm.release();
</pre></blockquote>

<p>which if necessary shuts down the pools and releases the resources held by the pool manager.</p>

<h4>Important Notes about ConnectionPoolManager</h4>

<p>Every successful call to one of the getInstance() methods increases an internal counter of the number of clients which hold a reference to that pool manager. A call to release() decrements this client counter. If the counter hits zero then the pool manager shuts down all it's connection pools and cleans up all it's resources. Any database connections referred to by the underlying pools that are still open may be forcibly closed by this operation, which could have undesirable effects. Therefore is it recommended (and good programming practice) to ensure that all your connections are closed when no longer needed.</p>

<p>What this means is that you need to keep a careful track of the references to each pool manager created. Each call to getInstance() should be matched by a call to release() for that pool manager, but it is a good idea to keep a global reference within an application for as long as the database access is required, to avoid unnecessary destruction and new creation of the pool manager.</p>




<a name="properties"></a><h3>Defining the behaviour of the pool</h3>

<p>The behaviour of the pools used by the ConnectionPoolManager is governed by either a properties file (by default called <b>dbpool.properties</b>) or by a Properties object supplied by the user.</p>

<p>The format of the properties file is shown below. The same key/value pairs apply when specifying a pool manager using a Properties object.</p>
<blockquote><pre>
	 drivers=&lt;fully-qualified class name of driver&gt;
	 logfile=&lt;filename&gt;

	 &lt;poolname&gt;.url=&lt;JDBC connection URL for database&gt;
	 &lt;poolname&gt;.user=&lt;user name&gt;
	 &lt;poolname&gt;.password=&lt;password&gt;
	[&lt;poolname&gt;.maxpool=&lt;maximum pooled connections&gt;]
	[&lt;poolname&gt;.maxconn=&lt;maximum possible connections&gt;]
	[&lt;poolname&gt;.expiry=&lt;expiry time of connections (seconds)&gt;]
	[&lt;poolname&gt;.init=&lt;initial number of connections&gt;]
	[&lt;poolname&gt;.validator=&lt;fully-qualified classname of ConnectionValidator&gt;]
	[&lt;poolname&gt;.decoder=&lt;fully-qualified classname of PasswordDecoder&gt;]
	[&lt;poolname&gt;.cache=true/false]
	[&lt;poolname&gt;.debug=true/false]
	[&lt;poolname&gt;.prop.<i>property</i>=<i>value</i>]
</pre></blockquote>

<p>Those properties in [brackets] are optional and take on default values when not supplied as described in the table below. Inevitably is is worthwhile supplying values for at least <code>maxpool</code> and <code>maxconn</code>, or you will get no benefit from the pooling system.</p>

<blockquote>
<table border="1" cellspacing="0" cellpadding="3" width="100%">
<tr>
	<th>Property</th>
	<th>Purpose</th>
	<th>Possible values</th>
	<th>Default value</th>
</tr>
<tr>
	<td>maxpool</td>
	<td>Determines the maximum number of connections that are held in the pool</td>
	<td>integer, &gt;=0<br>(&gt;=minpool)</td>
	<td>0</td>
</tr>
<tr>
	<td>maxconn</td>
	<td>Determines the absolute maximum number of connections that can be created for use</td>
	<td>integer, &gt;=0<br>(&gt;=maxpool)</td>
	<td>0 - unlimited</td>
</tr>
<tr>
	<td>expiry</td>
	<td>The expiry time for individual connections that are unused (seconds)</td>
	<td>integer, &gt;=0</td>
	<td>0 - no expiry</td>
</tr>
<tr>
	<td>init</td>
	<td>Initial a number of connections on startup (if more than minpool required)</td>
	<td>integer, &gt;=0<br>(&lt;=maxpool)</td>
	<td>0 - none</td>
</tr>
<tr>
	<td>validator</td>
	<td>Determines how to ensure that connections are valid</td>
	<td>Java class name<br>(must implement ConnectionValidator)</td>
	<td>none - validates with <code>Connection.isClosed()</code></td>
</tr>
<tr>
	<td>decoder</td>
	<td>Allows use of a custom password decoder class</td>
	<td>Java class name<br>(must implement PasswordDecoder)</td>
	<td>none - no password encoding supported</td>
</tr>
<tr>
	<td>cache</td>
	<td>Option to turn off caching of statements</td>
	<td>true/false</td>
	<td>true</td>
</tr>
<tr>
	<td>debug</td>
	<td>Option to turn on debug information in the log file</td>
	<td>true/false</td>
	<td>false</td>
</tr>
<tr>
	<td>prop.<i>property</i></td>
	<td>Optional properties to be passed to the JDBC driver</td>
	<td>string</td>
	<td>&nbsp;</td>
</tr>
<tr><th colspan="4" align="left">In addition there are a few properties which control advanced features for each pool:</th></tr>
<tr>
	<td>async</td>
	<td>Option to turn on asynchronous destruction of invalid/dead connections</td>
	<td>true/false</td>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩夫妻久久| 亚洲超丰满肉感bbw| 国产精品免费视频网站| 欧美精品久久一区二区三区| 欧美日韩国产高清一区二区三区 | 91久久精品网| 91久久精品日日躁夜夜躁欧美| 欧美性生活影院| 欧美一级精品大片| 国产农村妇女精品| 一区二区三区四区国产精品| 亚洲成av人**亚洲成av**| 免费一区二区视频| jlzzjlzz亚洲日本少妇| 欧美猛男男办公室激情| 欧美激情综合在线| 日韩av一级片| 99久久国产综合色|国产精品| 日韩一区二区免费高清| 亚洲人成网站色在线观看| 秋霞午夜av一区二区三区| av日韩在线网站| 欧美一区二区二区| 亚洲精品中文在线观看| 国产一区二区伦理片| 日本精品一区二区三区四区的功能| 日韩一区二区麻豆国产| 亚洲美女屁股眼交3| 精品一区二区三区在线观看 | 一区二区三区在线播| 国产一区三区三区| 67194成人在线观看| 亚洲女同一区二区| 国产一区不卡视频| 91精品国产全国免费观看| 1024精品合集| 国产伦精品一区二区三区免费| 欧美片在线播放| 一区二区在线观看av| 国产成人在线观看免费网站| 制服视频三区第一页精品| 亚洲三级免费观看| 丁香婷婷综合激情五月色| 日韩一级高清毛片| 天天做天天摸天天爽国产一区| 99re8在线精品视频免费播放| www成人在线观看| 日本亚洲免费观看| 欧美在线不卡一区| 中文字幕一区二区视频| 国产精品系列在线播放| 日韩天堂在线观看| 天天综合色天天综合色h| 色哦色哦哦色天天综合| 国产精品久线在线观看| 国产精品69毛片高清亚洲| 日韩午夜激情免费电影| 天天射综合影视| 精品视频一区三区九区| 一区二区三区在线播放| 99re视频精品| 亚洲人妖av一区二区| 成人激情综合网站| 国产精品全国免费观看高清 | 日本一区二区三区在线不卡| 精品一区二区三区影院在线午夜| 香蕉成人啪国产精品视频综合网| 久久精品国产成人一区二区三区| 91精品欧美久久久久久动漫| 午夜精品一区二区三区免费视频| 一本大道久久a久久综合| 椎名由奈av一区二区三区| 东方欧美亚洲色图在线| 国产精品美女久久福利网站| 风间由美中文字幕在线看视频国产欧美 | 欧美精品一区二区三区很污很色的| 日韩av电影天堂| 欧美一级二级三级蜜桃| 精品一区二区三区在线观看| 久久亚洲精品小早川怜子| 国产美女一区二区| 国产亚洲成年网址在线观看| 国产成人精品免费看| 国产婷婷精品av在线| 成人福利电影精品一区二区在线观看| 国产精品丝袜黑色高跟| caoporen国产精品视频| 亚洲乱码日产精品bd| 在线中文字幕不卡| 亚洲国产精品影院| 制服丝袜一区二区三区| 精品一区二区在线看| 国产亚洲美州欧州综合国| av一区二区久久| 亚洲午夜电影在线观看| 欧美日本在线视频| 麻豆成人久久精品二区三区红| 欧美精品一区二区三区四区| 国产91丝袜在线播放| 亚洲欧美日韩精品久久久久| 欧美午夜精品电影| 青青国产91久久久久久| 国产亚洲一二三区| 成人av在线资源网| 亚洲国产一区二区a毛片| 日韩三级av在线播放| 国产 日韩 欧美大片| 亚洲欧美日韩综合aⅴ视频| 制服丝袜在线91| 国产99久久久国产精品免费看| 亚洲人成网站色在线观看| 在线综合+亚洲+欧美中文字幕| 国产乱子轮精品视频| 亚洲精品成人悠悠色影视| 欧美一区二区久久| 99久久夜色精品国产网站| 日韩制服丝袜先锋影音| 久久久久久久久久久久久夜| 91女厕偷拍女厕偷拍高清| 日本成人在线看| 国产精品剧情在线亚洲| 欧美一区国产二区| www.日本不卡| 久久99久久精品欧美| 亚洲老妇xxxxxx| 欧美成人性战久久| 欧美专区日韩专区| 国产电影精品久久禁18| 亚洲国产一区在线观看| 国产偷国产偷精品高清尤物 | 日韩激情视频在线观看| 国产精品乱码一区二三区小蝌蚪| 欧美日韩成人一区二区| 成人白浆超碰人人人人| 蜜臀精品久久久久久蜜臀 | 欧美日韩一区二区三区四区五区 | 国产日产欧美一区二区视频| 欧美另类videos死尸| 不卡av在线免费观看| 久久av老司机精品网站导航| 亚洲一区免费在线观看| 国产欧美综合色| 日韩欧美一区二区免费| 91视视频在线观看入口直接观看www | 91免费版在线| 国产精品伊人色| 欧美aⅴ一区二区三区视频| 一区二区三区欧美日| 国产午夜一区二区三区| 日韩美女一区二区三区| 91免费版pro下载短视频| 国产v日产∨综合v精品视频| 美腿丝袜亚洲综合| 亚洲高清三级视频| 亚洲天堂福利av| 国产欧美一区二区精品秋霞影院| 日韩欧美一级精品久久| 欧美日韩视频专区在线播放| 99久久精品情趣| 国产盗摄女厕一区二区三区| 久久国产精品色婷婷| 午夜a成v人精品| 亚洲一区二区av在线| 悠悠色在线精品| 亚洲欧美在线观看| 国产精品久久久久影视| 国产日韩精品视频一区| 精品国产一区二区三区不卡 | 久久99精品国产| 首页国产欧美久久| 午夜视黄欧洲亚洲| 亚洲观看高清完整版在线观看 | 欧美日韩国产不卡| 91福利视频在线| 色哟哟一区二区| 97精品视频在线观看自产线路二 | 亚洲免费观看高清| 亚洲精品亚洲人成人网在线播放| 亚洲欧美在线观看| 综合分类小说区另类春色亚洲小说欧美| 国产精品天美传媒| 国产精品视频免费看| 国产精品网站导航| 国产欧美日韩精品a在线观看| 久久久激情视频| 国产欧美久久久精品影院 | 色综合久久中文综合久久97| 成人国产亚洲欧美成人综合网| 国产精品99久久久久久久vr| 国产一区二区电影| 成人小视频在线| 99精品一区二区三区| 91麻豆免费观看| 在线观看精品一区| 欧美日韩日日摸| 欧美一卡二卡三卡| 欧美精品一区二区在线观看| 欧美国产日产图区| 亚洲视频精选在线| 亚洲成人av一区|