JavaÊý¾Ý¿âÁ¬½Ó³Ø
javaÊý¾Ý¿âÁ¬½Ó³Ø
javaÊý¾Ý¿âÁ¬½Ó³Ø
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Enumeration;
import java.util.Vector;
/*ËäÈ»ÏÖÔÚÓÃAPACHE COMMONS DBCP¿ÉÒԷdz£·½±ãµÄ½¨Á¢Êý¾Ý¿âÁ¬½Ó³Ø£¬
µ«ÊÇÏñÕâÆªÎÄÕ°ÑÊý¾Ý¿âÁ¬½Ó³ØµÄÄÚ²¿ÔÀíдµÄÕâô͸³¹£¬×¢ÊÓÕâôÍêÕû£¬
ÕæÊǷdz£Äѵã¬Èÿª·¢ÈËÔ±¿ÉÒÔ¸üÉî²ã´ÎµÄÀí½âÊý¾Ý¿âÁ¬½Ó³Ø£¬ÕæÊǷdz£¸Ð
лÕâÆªÎÄÕµÄ×÷Õß¡£*/
public class ConnectionPool {
private String jdbcDriver = ""; // Êý¾Ý¿âÇý¶¯
private String dbUrl = ""; // Êý¾Ý URL
private String dbUsername = ""; // Êý¾Ý¿âÓû§Ãû
private String dbPassword = ""; // Êý¾Ý¿âÓû§ÃÜÂë
private String testTable = ""; // ²âÊÔÁ¬½ÓÊÇ·ñ¿ÉÓõIJâÊÔ±íÃû£¬Ä¬ÈÏûÓвâÊÔ±í
private int initialConnections = 10; // Á¬½Ó³ØµÄ³õʼ´óС
private int incrementalConnections = 5;// Á¬½Ó³Ø×Ô¶¯Ôö¼ÓµÄ´óС
private int maxConnections = 50; // Á¬½Ó³Ø×î´óµÄ´óС
private Vector connections = null; // ´æ·ÅÁ¬½Ó³ØÖÐÊý¾Ý¿âÁ¬½ÓµÄÏòÁ¿ , ³õʼʱΪ null
// ËüÖдæ·ÅµÄ¶ÔÏóΪ PooledConnection ÐÍ
/**
* ¹¹Ô캯Êý
*
* @param jdbcDriver String JDBC Çý¶¯Àà´®
* @param dbUrl String Êý¾Ý¿â URL
* @param dbUsername String Á¬½ÓÊý¾Ý¿âÓû§Ãû
* @param dbPassword String Á¬½ÓÊý¾Ý¿âÓû§µÄÃÜÂë
*
*/
public ConnectionPool(String jdbcDriver, String dbUrl, String dbUsername,
String dbPassword) {
this.jdbcDriver = jdbcDriver;
this.dbUrl = dbUrl;
this.dbUsername = dbUsername;
this.dbPassword = dbPassword;
try {
createPool();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* ·µ»ØÁ¬½Ó³ØµÄ³õʼ´óС
*
* @return ³õʼÁ¬½Ó³ØÖпɻñµÃµÄÁ¬½ÓÊýÁ¿
*/
public int getInitialConnections() {
return this.initialConnections;
}
/**
* ÉèÖÃÁ¬½Ó³ØµÄ³õʼ´óС
*
* @param ÓÃÓÚÉèÖóõʼÁ¬½Ó³ØÖÐÁ¬½ÓµÄÊýÁ¿
*/
public void setInitialConnections(int initialConnections) {
this.init
Ïà¹ØÎĵµ£º
1£®Ç°ÑÔ
×î½ü£¬P2P£¨Peer-to-Peer£©ÓÖ³ÉΪÁËÒòÌØÍøÉϵÄÒ»¸öÈȵ㡣P2PÊÇÒòÌØÍøµÄÒ»ÖÖÓ¦ÓÃģʽ£¬ÆäÒâ˼ÊÇÖ¸ÍøÂçÉϵÄÈκÎÉ豸£¨°üÀ¨´óÐÍ»ú¡¢PC»ú¡¢PDA¡¢ÊÖ»ú¡¢»ú¶¥ºÐµÈµÈ£©¶¼¿ÉÒÔÆ½µÈµØÖ±½Ó½øÐÐÁ¬½Ó²¢½øÐÐÐ×÷¡£Ïë±Èµ±Ç°ÒòÌØÍøÉÏÖ÷Á÷µÄÓ¦ÓÃģʽClient/Server»òÕßClient/Service¶ø ......
JMF:(JavaTM Media Framework)ÊÇ´¦Àí¶àýÌåµÄ³ÌÐò½Ó¿Ú¡£
JMF¿ò¼ÜÖ÷ÒªÓÐÈýÖÖÄ£ÐÍ£¬·Ö±ðÊÇʱ¼äÄ£ÐÍ£¬Ê¼þÄ£ÐÍÒÔ¼°Êý¾ÝÄ£ÐÍ¡£Ê±¼äÄ£ÐͶ¨ÒåÁËJMFµÄ´¦ÀíýÌåÁ÷µÄʱ¼äÊý¾ÝµÄ½á¹¹¡£Ê¼þÄ£ÐͶ¨ÒåÁËJMF¿ò¼ÜµÄʼþÀàÐÍÒÔ¼°¸÷¸öʼþÀàÐÍÖ®¼äµÄ¹ØÏµ¡£Êý¾ÝÀàÐͶ¨ÒåÁËJMF´¦ÀíµÄýÌåÁ÷Êý¾ÝµÄÀàÐÍ¡£
ʱ¼äÄ£ÐÍ
......
Ò»¡¢·´ÉäµÄ¸ÅÄî £º
·´ÉäµÄ¸ÅÄîÊÇÓÉSmithÔÚ1982ÄêÊ×´ÎÌá³öµÄ£¬Ö÷ÒªÊÇÖ¸³ÌÐò¿ÉÒÔ·ÃÎÊ¡¢¼ì²âºÍÐÞ¸ÄËü±¾Éí״̬»òÐÐΪµÄÒ»ÖÖÄÜÁ¦¡£ÕâÒ»¸ÅÄîµÄÌá³öºÜ¿ìÒý·¢Á˼ÆËã»ú¿ÆÑ§ÁìÓò¹ØÓÚÓ¦Ó÷´ÉäÐÔµÄÑо¿¡£ËüÊ×Ïȱ»³ÌÐòÓïÑÔµÄÉè¼ÆÁìÓòËù²ÉÓÃ,²¢ÔÚLispºÍÃæÏò¶ÔÏó·½ÃæÈ¡µÃÁ˳ɼ¨¡£ÆäÖÐLEAD/LEAD++ ¡¢OpenC++ ¡¢MetaXaºÍOpenJavaµÈ¾ÍÊ ......
ÈçºÎ×ÔѧjavaѸËÙ³ÉΪjava¸ßÊÖ
ÒªÏëѧºÃJava£¬Ê×ÏÈÒªÖªµÀJavaµÄ´óÖ·ÖÀà¡£ÎÒÃÇÖªµÀ£¬×Ô´ÓSunÍÆ³öJavaÒÔÀ´£¬¾ÍÁ¦Í¼Ê¹Ö®ÎÞËù²»°ü£¬ËùÒÔJava·¢Õ¹µ½ÏÖÔÚ£¬°´Ó¦ÓÃÀ´·ÖÖ÷Òª·ÖΪÈý´ó¿é£ºJ2SE,J2MEºÍJ2EE,ÕâÒ²¾ÍÊÇSunONE(Open NetEnvironment)Ìåϵ¡£J2SE¾ÍÊÇJava2µÄ±ê× ......
(Windows)
%AXIS2_HOME%\bin\WSDL2Java -uri resources\META-INF\StockQuoteService.wsdl -p samples.quickstart.service.adb -d adb -s -ss -sd -ssi -o build\service
(Linux)
$AXIS2_HOME/bin/WSDL2Java -uri resources/META-INF/StockQuoteService.wsdl -p samples.quickstart.service.adb -d adb -s -ss -sd ......