锘??xml version="1.0" encoding="utf-8" standalone="yes"?>成人性生交大片免费看午夜
,亚洲第一福利在线观看,91国内免费在线视频http://www.aygfsteel.com/liujw/category/9479.htmlzh-cnThu, 01 Mar 2007 15:35:29 GMTThu, 01 Mar 2007 15:35:29 GMT60- Tomcat 鐨勬暟鎹簱榪炴帴姹犺緗笌搴旂敤(Mysql綃?涔?瀹炰緥璁茶В)http://www.aygfsteel.com/liujw/articles/39141.html鍒樺啗浼?/dc:creator>鍒樺啗浼?/author>Tue, 04 Apr 2006 05:40:00 GMThttp://www.aygfsteel.com/liujw/articles/39141.htmlhttp://www.aygfsteel.com/liujw/comments/39141.htmlhttp://www.aygfsteel.com/liujw/articles/39141.html#Feedback0http://www.aygfsteel.com/liujw/comments/commentRss/39141.htmlhttp://www.aygfsteel.com/liujw/services/trackbacks/39141.html
榪樻槸綆鍗曠殑璇翠竴璇存枃浠墮厤緗?
1:淇敼%tomcat%/conf/server.xml鍦?lt;GlobalNamingResources>鍚庡姞濡備笅鍐呭.
聽聽聽聽聽聽<Resource
聽聽聽聽聽聽name="jdbc/DBPool"聽//鏁版嵁婧愬悕縐?br />聽聽聽聽聽聽type="javax.sql.DataSource"
聽聽聽聽聽聽password="xxxxxxxx"
聽聽聽聽聽聽driverClassName="com.mysql.jdbc.Driver"
聽聽聽聽聽聽maxIdle="2"
聽聽聽聽聽聽maxWait="5000"
聽聽聽聽聽聽username="root"
聽聽聽聽聽聽url="jdbc:mysql://127.0.0.1:3306/hptest"
聽聽聽聽聽聽maxActive="4"/>
2.淇敼%tomcat%/conf/context.xm;鍦?lt;Context>鍚庡姞
聽聽聽<ResourceLink
聽聽聽name="jdbc/DBPool"聽
聽聽聽type="javax.sql.DataSource"聽
聽聽聽global="jdbc/DBPool"/>
3.淇敼%tomcat%/conf/web.xml聽
<resource-ref>
聽聽聽聽<description>MySQL聽DB聽Connection聽Pool</description>
聽聽聽聽<res-ref-name>jdbc/DBPool</res-ref-name>
聽聽聽聽<res-type>javax.sql.DataSource</res-type>
聽聽聽聽<res-auth>Container</res-auth>
聽聽聽聽<res-sharing-scope>Shareable</res-sharing-scope>
聽</resource-ref>
聽聽榪欐牱閰嶇疆灝辯畻宸笉澶氫簡.濡傛灉鍏蜂綋鐨勮繕涓嶆噦鍙涓婃鍙戠殑鏂囩珷.
4.鍐欎竴涓▼搴忔祴璇?(鍐欎竴涓猈EB紼嬪簭)
聽聽聽鎴戠殑鏄疢yeclipse聽鍐欑殑紼嬪簭,榪欓噷涓嶈兘浠庣數(shù)鑴戜笂璐村浘鐪熸湁鐐逛笉鏂逛究(鎴戞兂鍝?.
聽聽聽聽聽聽1:鍐欎竴涓繛鎺ョ被:聽聽聽聽
聽聽DBPool.java
聽package聽com.test;
import聽javax.naming.Context;
import聽javax.naming.InitialContext;
import聽javax.naming.NamingException;
import聽javax.sql.DataSource;
public聽class聽DBPool聽{
聽聽聽聽private聽static聽DataSource聽pool;
聽聽聽聽static聽{
聽聽聽聽聽聽聽聽聽Context聽env聽=聽null;
聽聽聽聽聽聽聽聽聽聽try聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽env聽=聽(Context)聽new聽InitialContext().lookup("java:comp/env");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽pool聽=聽(DataSource)env.lookup("jdbc/DBPool");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽if(pool==null)聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.err.println("'DBPool'聽is聽an聽unknown聽DataSource");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽catch(NamingException聽ne)聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ne.printStackTrace();
聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽}
聽聽聽聽public聽static聽DataSource聽getPool()聽{
聽聽聽聽聽聽聽聽return聽pool;
聽聽聽聽}
聽聽聽
}
聽聽聽聽2:鍐欎竴涓猄ervlet:聽聽
聽聽鍏朵腑鏈夋槸鐢ㄦ潵榪炴帴鏁版嵁搴撳拰鏄劇ず鏌ヨ緇撴灉.
聽聽Mytest.java
聽聽package聽com.test;
import聽java.io.IOException;
import聽java.io.PrintWriter;
import聽java.sql.*;
import聽javax.servlet.ServletException;
import聽javax.servlet.http.HttpServlet;
import聽javax.servlet.http.HttpServletRequest;
import聽javax.servlet.http.HttpServletResponse;
public聽class聽Mytest聽extends聽HttpServlet聽{
聽聽聽聽/**
聽聽聽聽聽*聽Constructor聽of聽the聽object.
聽聽聽聽聽*/
聽聽聽聽public聽Mytest()聽{
聽聽聽聽聽聽聽聽super();
聽聽聽聽}
聽聽聽聽/**
聽聽聽聽聽*聽Destruction聽of聽the聽servlet.聽<br>
聽聽聽聽聽*/
聽聽聽聽public聽void聽destroy()聽{
聽聽聽聽聽聽聽聽super.destroy();聽//聽Just聽puts聽"destroy"聽string聽in聽log
聽聽聽聽聽聽聽聽//聽Put聽your聽code聽here
聽聽聽聽}
聽聽聽聽/**
聽聽聽聽聽*聽The聽doGet聽method聽of聽the聽servlet.聽<br>
聽聽聽聽聽*
聽聽聽聽聽*聽This聽method聽is聽called聽when聽a聽form聽has聽its聽tag聽value聽method聽equals聽to聽get.
聽聽聽聽聽*聽
聽聽聽聽聽*聽@param聽request聽the聽request聽send聽by聽the聽client聽to聽the聽server
聽聽聽聽聽*聽@param聽response聽the聽response聽send聽by聽the聽server聽to聽the聽client
聽聽聽聽聽*聽@throws聽ServletException聽if聽an聽error聽occurred
聽聽聽聽聽*聽@throws聽IOException聽if聽an聽error聽occurred
聽聽聽聽聽*/
聽聽聽聽public聽void聽doGet(HttpServletRequest聽request,聽HttpServletResponse聽response)
聽聽聽聽聽聽聽聽聽聽聽聽throws聽ServletException,聽IOException聽{
聽聽聽聽聽聽聽聽response.setContentType("text/html;charset=gb2312");
聽聽聽聽聽聽聽聽PrintWriter聽out聽=聽response.getWriter();
聽聽聽聽聽聽聽聽String聽id=(String)request.getParameter("id");
聽聽聽聽聽聽聽聽Connection聽con=null;
聽聽聽聽聽聽聽聽try{
聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽con=DBPool.getPool().getConnection();
聽聽聽聽聽聽聽聽聽聽聽聽聽Statement聽stmt=con.createStatement();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ResultSet聽rst=stmt.executeQuery("select聽*聽from聽userinf聽where聽userid='"+id+"'");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽if(rst.next()){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽out.println("<br>ID鍙?"+rst.getInt("userid"));
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽out.println("<br>鐢ㄦ埛鍚?"+com.test.ASSICTOGBR2312.trans(rst.getString("name")));
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽out.println("<br>鍦板潃:"+rst.getString("address"聽));
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽out.println("<br>鐢熸棩"+rst.getDate("year"聽));
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽else{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽out.println("娌℃湁榪欎釜ID");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽stmt.close();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽catch(Exception聽e){
聽聽聽聽聽聽聽聽聽聽聽聽e.printStackTrace();
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽finally{聽聽//涓瀹氳娉ㄦ剰榪欓噷瀵規(guī)暟鎹簱鐨勫叧闂笉鐒?br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽//鑷繁鎯充簡
聽聽聽聽聽聽聽聽聽聽聽聽try{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽if(con!=null){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽con.close();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽catch(Exception聽e){
聽聽聽聽聽聽聽聽聽聽聽e.printStackTrace();
聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽}
聽聽聽聽
聽聽聽聽}
聽聽聽聽/**
聽聽聽聽聽*聽The聽doPost聽method聽of聽the聽servlet.聽<br>
聽聽聽聽聽*
聽聽聽聽聽*聽This聽method聽is聽called聽when聽a聽form聽has聽its聽tag聽value聽method聽equals聽to聽post.
聽聽聽聽聽*聽
聽聽聽聽聽*聽@param聽request聽the聽request聽send聽by聽the聽client聽to聽the聽server
聽聽聽聽聽*聽@param聽response聽the聽response聽send聽by聽the聽server聽to聽the聽client
聽聽聽聽聽*聽@throws聽ServletException聽if聽an聽error聽occurred
聽聽聽聽聽*聽@throws聽IOException聽if聽an聽error聽occurred
聽聽聽聽聽*/
聽聽聽聽public聽void聽doPost(HttpServletRequest聽request,聽HttpServletResponse聽response)
聽聽聽聽聽聽聽聽聽聽聽聽throws聽ServletException,聽IOException聽{
聽聽聽聽聽聽聽聽doGet(request,response);
聽聽聽聽聽聽聽聽
聽聽聽聽}
聽聽聽聽/**
聽聽聽聽聽*聽Initialization聽of聽the聽servlet.聽<br>
聽聽聽聽聽*
聽聽聽聽聽*聽@throws聽ServletException聽if聽an聽error聽occure
聽聽聽聽聽*/
聽聽聽聽public聽void聽init()聽throws聽ServletException聽{
聽聽聽聽聽聽聽聽//聽Put聽your聽code聽here
聽聽聽聽}
}
聽聽聽聽聽聽3:鍐欎竴涓狫SP欏甸潰:
聽聽聽聽聽聽聽聽聽Myjsp.jsp
聽聽聽聽聽
<%@聽page聽language="java"聽import="java.util.*"聽pageEncoding="gb2312"%>
<%
String聽path聽=聽request.getContextPath();
String聽basePath聽=聽request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE聽HTML聽PUBLIC聽"-//W3C//DTD聽HTML聽4.01聽Transitional//EN">
<html>
聽聽<head>
聽聽聽聽<base聽href="<%=basePath%>">
聽聽聽聽
聽聽聽聽<title>My聽JSP聽'MyJsp.jsp'聽starting聽page</title>
聽聽聽聽
聽聽聽聽<meta聽http-equiv="pragma"聽content="no-cache">
聽聽聽聽<meta聽http-equiv="cache-control"聽content="no-cache">
聽聽聽聽<meta聽http-equiv="expires"聽content="0">
聽聽聽聽<meta聽http-equiv="keywords"聽content="keyword1,keyword2,keyword3">
聽聽聽聽<meta聽http-equiv="description"聽content="This聽is聽my聽page">
聽聽聽聽
聽聽聽聽<!--
聽聽聽聽<link聽rel="stylesheet"聽type="text/css"聽href="styles.css">
聽聽聽聽-->
聽聽</head>
聽聽
聽聽<body>
聽聽
聽聽聽聽This聽is聽my聽JSP聽page.聽<br>
聽聽聽聽<FORM聽action="/MyWeb/servlet/Mytest"聽method="post">
聽聽聽聽print聽input聽search聽id:聽<INPUT聽type="text"聽name="id">
聽聽聽聽<INPUT聽type="submit"聽value="submit">
聽聽聽聽</FORM>
聽聽</body>
</html>
聽聽聽4:鍏朵腑鏈夎漿瀛?涓轟簡涓嶆樉紺轟貢鐮?br />聽聽聽聽package聽com.test;
import聽java.io.*;
public聽class聽ASSICTOGBR2312聽{
聽聽聽聽聽聽public聽static聽String聽trans(String聽ass){
聽聽聽聽聽聽聽聽聽聽String聽res=null;
聽聽聽聽聽聽聽聽聽聽byte聽temp[];
聽聽聽聽聽聽聽聽聽聽try{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽temp=ass.getBytes("iso-8859-1");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽res=new聽String(temp);
聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽catch(UnsupportedEncodingException聽en)聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(en.toString());
聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽return聽res;聽
聽聽聽聽
聽聽聽聽聽聽}
}
聽聽聽5:web.xml
聽聽聽<?xml聽version="1.0"聽encoding="UTF-8"?>
<web-app聽version="2.4"聽
聽聽聽聽xmlns="http://java.sun.com/xml/ns/j2ee"聽
聽聽聽聽xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"聽
聽聽聽聽xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee聽
聽聽聽聽http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
聽聽<servlet>
聽聽聽聽<description>This聽is聽the聽description聽of聽my聽J2EE聽component</description>
聽聽聽聽<display-name>This聽is聽the聽display聽name聽of聽my聽J2EE聽component</display-name>
聽聽聽聽<servlet-name>Mytest</servlet-name>
聽聽聽聽<servlet-class>com.test.Mytest</servlet-class>
聽聽</servlet>
聽聽<servlet-mapping>
聽聽聽聽<servlet-name>Mytest</servlet-name>
聽聽聽聽<url-pattern>/servlet/Mytest</url-pattern>
聽聽</servlet-mapping>
</web-app>
聽聽聽6:聽鍏朵腑鏁版嵁搴撶粨鏋勫涓?
聽聽聽聽聽聽鏁版嵁搴撳悕:hptest
聽聽聽聽聽聽琛?userinf
聽聽聽聽聽聽鐢ㄤ笅闈㈢殑鍛戒護寤轟竴涓暟鎹簱鍜岃〃
聽聽聽聽聽聽create聽database聽hptest;
聽聽聽聽聽聽create聽table聽聽userinf聽(
聽聽聽聽聽聽聽userid聽int(4)聽not聽null,
聽聽聽聽聽聽聽name聽char(10)聽not聽null,
聽聽聽聽聽聽聽address聽varchar(50),
聽聽聽聽聽聽聽year聽date,
聽聽聽聽聽聽聽constraint聽fk_userinf聽primary聽key(userid));
聽聽聽聽聽聽聽)
聽聽聽聽聽聽聽insert聽into聽userinf聽values(19,'hp','cq','1982-10-22');
聽聽聽聽聽
聽甯屾湜瀵規(guī)煇浜涗漢鑳芥湁鎵甯姪.璋㈣阿澶у鏀寔
]]> - Tomcat 鐨勬暟鎹簱榪炴帴姹犺緗笌搴旂敤(Mysql綃?http://www.aygfsteel.com/liujw/articles/39142.html鍒樺啗浼?/dc:creator>鍒樺啗浼?/author>Tue, 04 Apr 2006 05:40:00 GMThttp://www.aygfsteel.com/liujw/articles/39142.htmlhttp://www.aygfsteel.com/liujw/comments/39142.htmlhttp://www.aygfsteel.com/liujw/articles/39142.html#Feedback0http://www.aygfsteel.com/liujw/comments/commentRss/39142.htmlhttp://www.aygfsteel.com/liujw/services/trackbacks/39142.html涓嬭澆鍦板潃:http://dev.mysql.com/downloads/
2錛庡湪server.xml涓緗暟鎹簮錛屼互MySQL鏁版嵁搴撲負渚嬶紝濡備笅錛?br />鍦?lt;GlobalNamingResources>聽</GlobalNamingResources>鑺傜偣涓姞鍏ワ紝
聽聽聽聽聽聽<Resource
聽聽聽聽聽聽name="jdbc/DBPool"
聽聽聽聽聽聽type="javax.sql.DataSource"
聽聽聽聽聽聽password="xxxxxxxx"聽鎴戠殑瀵嗙爜鏄痻xxxxxxx
聽聽聽聽聽聽driverClassName="com.mysql.jdbc.Driver"
聽聽聽聽聽聽maxIdle="2"
聽聽聽聽聽聽maxWait="5000"
聽聽聽聽聽聽username="root"
聽聽聽聽聽聽url="jdbc:mysql://127.0.0.1:3306/test"
聽聽聽聽聽聽maxActive="4"/>
聽聽聽灞炴ц鏄庯細name錛屾暟鎹簮鍚嶇О錛岄氬父鍙栤漥dbc/XXX鈥濈殑鏍煎紡錛涘悕瀛椾竴瀹氳鏈夋剰鎬?濂借
聽聽聽聽聽聽聽聽聽聽聽聽type錛屸漥avax.sql.DataSource鈥?
聽聽聽聽聽聽聽聽聽聽聽聽password錛屾暟鎹簱鐢ㄦ埛瀵嗙爜錛?br />聽聽聽聽聽聽聽聽聽聽聽聽driveClassName錛屾暟鎹簱椹卞姩錛?br />聽聽聽聽聽聽聽聽聽聽聽聽maxIdle錛屾渶澶х┖闂叉暟錛屾暟鎹簱榪炴帴鐨勬渶澶х┖闂叉椂闂淬傝秴榪囩┖闂叉椂闂達紝鏁版嵁搴撹繛
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽鎺ュ皢琚爣璁頒負涓嶅彲鐢紝鐒跺悗琚噴鏀俱傝涓?琛ㄧず鏃犻檺鍒躲?br />聽聽聽聽聽聽聽聽聽聽聽聽MaxActive錛岃繛鎺ユ睜鐨勬渶澶ф暟鎹簱榪炴帴鏁般傝涓?琛ㄧず鏃犻檺鍒躲?br />聽聽聽聽聽聽聽聽聽聽聽聽maxWait聽錛屾渶澶у緩绔嬭繛鎺ョ瓑寰呮椂闂淬傚鏋滆秴榪囨鏃墮棿灝嗘帴鍒板紓甯搞傝涓?1琛ㄧず
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽鏃犻檺鍒躲?br />
3錛庡湪浣犵殑web搴旂敤紼嬪簭鐨剋eb.xml涓緗暟鎹簮鍙傝冿紝濡備笅錛?br />聽聽鍦?lt;web-app></web-app>鑺傜偣涓姞鍏ワ紝
聽聽<resource-ref>
聽聽聽聽<description>MySQL聽DB聽Connection聽Pool</description>
聽聽聽聽<res-ref-name>jdbc/DBPool</res-ref-name>
聽聽聽聽<res-type>javax.sql.DataSource</res-type>
聽聽聽聽<res-auth>Container</res-auth>
聽聽聽聽<res-sharing-scope>Shareable</res-sharing-scope>
聽</resource-ref>
聽聽瀛愯妭鐐硅鏄庯細聽description錛屾弿榪頒俊鎭紱
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽res-ref-name錛屽弬鑰冩暟鎹簮鍚嶅瓧錛屽悓涓婁竴姝ョ殑灞炴ame錛?br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽res-type錛岃祫婧愮被鍨嬶紝鈥漥avax.sql.DataSource鈥濓紱
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽res-auth錛屸滳ontainer鈥濓紱
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽res-sharing-scope錛屸漇hareable鈥濓紱
4錛庡湪web搴旂敤紼嬪簭鐨刢ontext.xml涓緗暟鎹簮閾炬帴錛屽涓嬶細
聽聽鍦?lt;Context></Context>鑺傜偣涓姞鍏ワ紝
聽聽<ResourceLink
聽聽聽name="jdbc/DBPool"聽
聽聽聽type="javax.sql.DataSource"聽
聽聽聽global="jdbc/DBPool"/>
聽聽聽灞炴ц鏄庯細name錛屽悓絎?姝ュ拰絎?姝ョ殑灞炴ame鍊鹼紝鍜屽瓙鑺傜偣res-ref-name鍊鹼紱
聽聽聽聽聽聽聽聽聽聽聽聽聽type錛屽悓鏍峰彇鈥漥avax.sql.DataSource鈥濓紱
聽聽聽聽聽聽聽聽聽聽聽聽聽global錛屽悓name鍊箋?br />聽
鑷蟲錛岃緗畬鎴愶紝涓嬮潰鏄浣曚嬌鐢ㄦ暟鎹簱榪炴帴姹犮?br />5錛庡緩绔嬩竴涓繛鎺ユ睜綾伙紝DBPool.java錛岀敤鏉ュ垱寤鴻繛鎺ユ睜錛屼唬鐮佸涓嬶細
import聽javax.naming.Context;
import聽javax.naming.InitialContext;
import聽javax.naming.NamingException;
import聽javax.sql.DataSource;
public聽class聽DBPool聽{
聽聽聽聽private聽static聽DataSource聽pool;
聽聽聽聽static聽{
聽聽聽聽聽聽聽聽聽Context聽env聽=聽null;
聽聽聽聽聽聽聽聽聽聽try聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽env聽=聽(Context)聽new聽InitialContext().lookup("java:comp/env");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽pool聽=聽(DataSource)env.lookup("jdbc/DBPool");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽if(pool==null)聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.err.println("'DBPool'聽is聽an聽unknown聽DataSource");
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽catch(NamingException聽e)聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽e.printStackTrace();
聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽}
聽聽聽聽public聽static聽DataSource聽getPool()聽{
聽聽聽聽聽聽聽聽return聽pool;
聽聽聽聽}
}

]]>
主站蜘蛛池模板:
怀来县|
鄂伦春自治旗|
辉南县|
简阳市|
崇信县|
晴隆县|
河曲县|
修水县|
平顶山市|
涿鹿县|
铁岭县|
平舆县|
保靖县|
邹平县|
平顶山市|
沾益县|
宜州市|
涟源市|
临颍县|
白山市|
康保县|
永仁县|
错那县|
静安区|
贵定县|
虞城县|
遵化市|
从化市|
龙陵县|
无棣县|
洱源县|
宜兴市|
耒阳市|
平陆县|
莱芜市|
廉江市|
灵山县|
新龙县|
汶川县|
红安县|
宜阳县|