connectionpooldatasource.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 308 行
HTML
308 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jan 17 03:51:39 PST 2002 -->
<TITLE>
Java 2 Platform EE v1.3: Interface ConnectionPoolDataSource
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../javax/sql/ConnectionEventListener.html"><B>PREV CLASS</B></A>
<A HREF="../../javax/sql/DataSource.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="ConnectionPoolDataSource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.sql</FONT>
<BR>
Interface ConnectionPoolDataSource</H2>
<HR>
<DL>
<DT>public interface <B>ConnectionPoolDataSource</B></DL>
<P>
A ConnectionPoolDataSource object is a factory for PooledConnection
objects. An object that implements this interface will typically be
registered with a JNDI service.
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sql/ConnectionPoolDataSource.html#getLoginTimeout()">getLoginTimeout</A></B>()</CODE>
<BR>
Gets the maximum time in seconds that this data source can wait
while attempting to connect to a database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.io.PrintWriter</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sql/ConnectionPoolDataSource.html#getLogWriter()">getLogWriter</A></B>()</CODE>
<BR>
Get the log writer for this data source.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../javax/sql/PooledConnection.html">PooledConnection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sql/ConnectionPoolDataSource.html#getPooledConnection()">getPooledConnection</A></B>()</CODE>
<BR>
Attempt to establish a database connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../javax/sql/PooledConnection.html">PooledConnection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sql/ConnectionPoolDataSource.html#getPooledConnection(java.lang.String, java.lang.String)">getPooledConnection</A></B>(java.lang.String user,
java.lang.String password)</CODE>
<BR>
Attempt to establish a database connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sql/ConnectionPoolDataSource.html#setLoginTimeout(int)">setLoginTimeout</A></B>(int seconds)</CODE>
<BR>
Sets the maximum time in seconds that this data source will wait
while attempting to connect to a database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sql/ConnectionPoolDataSource.html#setLogWriter(java.io.PrintWriter)">setLogWriter</A></B>(java.io.PrintWriter out)</CODE>
<BR>
Set the log writer for this data source.</TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getPooledConnection()"><!-- --></A><H3>
getPooledConnection</H3>
<PRE>
public <A HREF="../../javax/sql/PooledConnection.html">PooledConnection</A> <B>getPooledConnection</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD><p>Attempt to establish a database connection.<DD><DL>
<DT><B>Returns:</B><DD>a Connection to the database<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="getPooledConnection(java.lang.String, java.lang.String)"><!-- --></A><H3>
getPooledConnection</H3>
<PRE>
public <A HREF="../../javax/sql/PooledConnection.html">PooledConnection</A> <B>getPooledConnection</B>(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException</PRE>
<DL>
<DD><p>Attempt to establish a database connection.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>user</CODE> - the database user on whose behalf the Connection is being made<DD><CODE>password</CODE> - the user's password<DT><B>Returns:</B><DD>a Connection to the database<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="getLogWriter()"><!-- --></A><H3>
getLogWriter</H3>
<PRE>
public java.io.PrintWriter <B>getLogWriter</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD><p>Get the log writer for this data source.
<p>The log writer is a character output stream to which all logging
and tracing messages for this data source object instance will be
printed. This includes messages printed by the methods of this
object, messages printed by methods of other objects manufactured
by this object, and so on. Messages printed to a data source
specific log writer are not printed to the log writer associated
with the java.sql.Drivermanager class. When a data source object is
created the log writer is initially null, in other words, logging
is disabled.<DD><DL>
<DT><B>Returns:</B><DD>the log writer for this data source, null if disabled<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="setLogWriter(java.io.PrintWriter)"><!-- --></A><H3>
setLogWriter</H3>
<PRE>
public void <B>setLogWriter</B>(java.io.PrintWriter out)
throws java.sql.SQLException</PRE>
<DL>
<DD><p>Set the log writer for this data source.
<p>The log writer is a character output stream to which all logging
and tracing messages for this data source object instance will be
printed. This includes messages printed by the methods of this
object, messages printed by methods of other objects manufactured
by this object, and so on. Messages printed to a data source
specific log writer are not printed to the log writer associated
with the java.sql.Drivermanager class. When a data source object is
created the log writer is initially null, in other words, logging
is disabled.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the new log writer; to disable, set to null<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="setLoginTimeout(int)"><!-- --></A><H3>
setLoginTimeout</H3>
<PRE>
public void <B>setLoginTimeout</B>(int seconds)
throws java.sql.SQLException</PRE>
<DL>
<DD><p>Sets the maximum time in seconds that this data source will wait
while attempting to connect to a database. A value of zero
specifies that the timeout is the default system timeout
if there is one; otherwise it specifies that there is no timeout.
When a data source object is created the login timeout is
initially zero.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>seconds</CODE> - the data source login time limit<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database access error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="getLoginTimeout()"><!-- --></A><H3>
getLoginTimeout</H3>
<PRE>
public int <B>getLoginTimeout</B>()
throws java.sql.SQLException</PRE>
<DL>
<DD>Gets the maximum time in seconds that this data source can wait
while attempting to connect to a database. A value of zero
means that the timeout is the default system timeout
if there is one; otherwise it means that there is no timeout.
When a data source object is created the login timeout is
initially zero.<DD><DL>
<DT><B>Returns:</B><DD>the data source login time limit<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database access error occurs.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../javax/sql/ConnectionEventListener.html"><B>PREV CLASS</B></A>
<A HREF="../../javax/sql/DataSource.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="ConnectionPoolDataSource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?