<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_40) on Mon Oct 21 11:07:38 UTC 2013 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>JDBCPool (HSQLDB 2.2.9 API)</title> <meta name="date" content="2013-10-21"> <link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="JDBCPool (HSQLDB 2.2.9 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/JDBCPool.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/hsqldb/jdbc/JDBCParameterMetaData.html" title="class in org.hsqldb.jdbc"><span class="strong">Prev Class</span></a></li> <li><a href="../../../org/hsqldb/jdbc/JDBCPreparedStatement.html" title="class in org.hsqldb.jdbc"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/hsqldb/jdbc/JDBCPool.html" target="_top">Frames</a></li> <li><a href="JDBCPool.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li><a href="#constructor_summary">Constr</a> | </li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor_detail">Constr</a> | </li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.hsqldb.jdbc</div> <h2 title="Class JDBCPool" class="title">Class JDBCPool</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.hsqldb.jdbc.JDBCPool</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Serializable, java.sql.Wrapper, java.util.EventListener, javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.ConnectionEventListener, javax.sql.DataSource, javax.sql.StatementEventListener</dd> </dl> <hr> <br> <pre>public class <span class="strong">JDBCPool</span> extends java.lang.Object implements javax.sql.DataSource, java.io.Serializable, javax.naming.Referenceable, javax.sql.ConnectionEventListener, javax.sql.StatementEventListener, java.sql.Wrapper</pre> <div class="block"><!-- start Release-specific documentation --> <div class="ReleaseSpecificDocumentation"> <h3>HSQLDB-Specific Information:</h3> <p> A connection pool for HyperSQL connections. This implementation of <code>DataSource</code> is dedicated to HyperSQL and guarantees all connection states are automatically reset when a connection is reused.<p> The methods of the parent class, <a href="../../../org/hsqldb/jdbc/JDBCCommonDataSource.html" title="class in org.hsqldb.jdbc"><code>JDBCCommonDataSource</code></a> are used to specify the database URL, user, password, and / or connection properties.<p> </div> <!-- end Release-specific documentation --></div> <dl><dt><span class="strong">Since:</span></dt> <dd>2.2.9</dd> <dt><span class="strong">Author:</span></dt> <dd>Fred Toussi (fredt@users dot sourceforge.net)</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../serialized-form.html#org.hsqldb.jdbc.JDBCPool">Serialized Form</a></dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#JDBCPool()">JDBCPool</a></strong>()</code> <div class="block">Creates a connection pool with the maximum size of 8.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#JDBCPool(int)">JDBCPool</a></strong>(int size)</code> <div class="block">Creates a connection pool with the given maximum size.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#close(int)">close</a></strong>(int wait)</code> <div class="block">Closes the pool immediately.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#connectionClosed(javax.sql.ConnectionEvent)">connectionClosed</a></strong>(javax.sql.ConnectionEvent event)</code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#connectionErrorOccurred(javax.sql.ConnectionEvent)">connectionErrorOccurred</a></strong>(javax.sql.ConnectionEvent event)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.sql.Connection</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getConnection()">getConnection</a></strong>()</code> <div class="block">Retrieves a new connection using the properties that have already been set.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.sql.Connection</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getConnection(java.lang.String, java.lang.String)">getConnection</a></strong>(java.lang.String username, java.lang.String password)</code> <div class="block">Retrieves a new connection using the given username and password, and the database url that has been set.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getDatabase()">getDatabase</a></strong>()</code> <div class="block">Synonym for getUrl().</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getDatabaseName()">getDatabaseName</a></strong>()</code> <div class="block">Synonym for getUrl().</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getDataSourceName()">getDataSourceName</a></strong>()</code> <div class="block">Retrieves the name of the data source.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getDescription()">getDescription</a></strong>()</code> <div class="block">Retrieves the description of the data source.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getLoginTimeout()">getLoginTimeout</a></strong>()</code> <div class="block">Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.io.PrintWriter</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getLogWriter()">getLogWriter</a></strong>()</code> <div class="block">Retrieves the log writer for this <code>DataSource</code> object.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.util.logging.Logger</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getParentLogger()">getParentLogger</a></strong>()</code> <div class="block">Return the parent Logger of all the Loggers used by this data source.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>javax.naming.Reference</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getReference()">getReference</a></strong>()</code> <div class="block">Retrieves the Reference of this object.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getUrl()">getUrl</a></strong>()</code> <div class="block">Retrieves the jdbc database connection url attribute.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getUser()">getUser</a></strong>()</code> <div class="block">Retrieves the user name for the connection.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#isWrapperFor(java.lang.Class)">isWrapperFor</a></strong>(java.lang.Class<?> iface)</code> <div class="block">Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setDatabase(java.lang.String)">setDatabase</a></strong>(java.lang.String database)</code> <div class="block">Synonym for setUrl(String).</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setDatabaseName(java.lang.String)">setDatabaseName</a></strong>(java.lang.String databaseName)</code> <div class="block">Synonym for setUrl(String).</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setLoginTimeout(int)">setLoginTimeout</a></strong>(int seconds)</code> <div class="block">Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setLogWriter(java.io.PrintWriter)">setLogWriter</a></strong>(java.io.PrintWriter out)</code> <div class="block">Sets the log writer for this <code>DataSource</code> object to the given <code>java.io.PrintWriter</code> object.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setPassword(java.lang.String)">setPassword</a></strong>(java.lang.String password)</code> <div class="block">Sets the password for the user name.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setProperties(java.util.Properties)">setProperties</a></strong>(java.util.Properties props)</code> <div class="block">Sets connection properties.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setUrl(java.lang.String)">setUrl</a></strong>(java.lang.String url)</code> <div class="block">Sets the jdbc database URL.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setUser(java.lang.String)">setUser</a></strong>(java.lang.String user)</code> <div class="block">Sets the user name.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#statementClosed(javax.sql.StatementEvent)">statementClosed</a></strong>(javax.sql.StatementEvent event)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#statementErrorOccurred(javax.sql.StatementEvent)">statementErrorOccurred</a></strong>(javax.sql.StatementEvent event)</code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><T> T</code></td> <td class="colLast"><code><strong><a href="../../../org/hsqldb/jdbc/JDBCPool.html#unwrap(java.lang.Class)">unwrap</a></strong>(java.lang.Class<T> iface)</code> <div class="block">Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="JDBCPool()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>JDBCPool</h4> <pre>public JDBCPool()</pre> <div class="block">Creates a connection pool with the maximum size of 8. The database and connection settings are made before the <a href="../../../org/hsqldb/jdbc/JDBCPool.html#getConnection()"><code>getConnection()</code></a> is called.</div> </li> </ul> <a name="JDBCPool(int)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>JDBCPool</h4> <pre>public JDBCPool(int size)</pre> <div class="block">Creates a connection pool with the given maximum size. The database and connection settings are made before the <a href="../../../org/hsqldb/jdbc/JDBCPool.html#getConnection()"><code>getConnection()</code></a> is called.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>size</code> - int maximum size of the pool</dd></dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getConnection()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getConnection</h4> <pre>public java.sql.Connection getConnection() throws java.sql.SQLException</pre> <div class="block">Retrieves a new connection using the properties that have already been set.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>getConnection</code> in interface <code>javax.sql.DataSource</code></dd> <dt><span class="strong">Returns:</span></dt><dd>a connection to the data source</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if a database access error occurs</dd></dl> </li> </ul> <a name="getConnection(java.lang.String, java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getConnection</h4> <pre>public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException</pre> <div class="block">Retrieves a new connection using the given username and password, and the database url that has been set. No other properties are used for the connection</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>getConnection</code> in interface <code>javax.sql.DataSource</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>username</code> - the database user on whose behalf the connection is being made</dd><dd><code>password</code> - the user's password</dd> <dt><span class="strong">Returns:</span></dt><dd>a connection to the data source</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if a database access error occurs</dd></dl> </li> </ul> <a name="unwrap(java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>unwrap</h4> <pre>public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException</pre> <div class="block">Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling <code>unwrap</code> recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an <code>SQLException</code> is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>unwrap</code> in interface <code>java.sql.Wrapper</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>iface</code> - A Class defining an interface that the result must implement.</dd> <dt><span class="strong">Returns:</span></dt><dd>an object that implements the interface. May be a proxy for the actual implementing object.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - If no object found that implements the interface</dd><dt><span class="strong">Since:</span></dt> <dd>JDK 1.6, HSQLDB 2.0</dd></dl> </li> </ul> <a name="isWrapperFor(java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isWrapperFor</h4> <pre>public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException</pre> <div class="block">Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively calling <code>isWrapperFor</code> on the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared to <code>unwrap</code> so that callers can use this method to avoid expensive <code>unwrap</code> calls that may fail. If this method returns true then calling <code>unwrap</code> with the same argument should succeed.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>isWrapperFor</code> in interface <code>java.sql.Wrapper</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>iface</code> - a Class defining an interface.</dd> <dt><span class="strong">Returns:</span></dt><dd>true if this implements the interface or directly or indirectly wraps an object that does.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if an error occurs while determining whether this is a wrapper for an object with the given interface.</dd><dt><span class="strong">Since:</span></dt> <dd>JDK 1.6, HSQLDB 2.0</dd></dl> </li> </ul> <a name="getReference()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getReference</h4> <pre>public javax.naming.Reference getReference() throws javax.naming.NamingException</pre> <div class="block">Retrieves the Reference of this object.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>getReference</code> in interface <code>javax.naming.Referenceable</code></dd> <dt><span class="strong">Returns:</span></dt><dd>The non-null Reference of this object.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>javax.naming.NamingException</code> - If a naming exception was encountered while retrieving the reference.</dd></dl> </li> </ul> <a name="connectionClosed(javax.sql.ConnectionEvent)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>connectionClosed</h4> <pre>public void connectionClosed(javax.sql.ConnectionEvent event)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>connectionClosed</code> in interface <code>javax.sql.ConnectionEventListener</code></dd> </dl> </li> </ul> <a name="connectionErrorOccurred(javax.sql.ConnectionEvent)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>connectionErrorOccurred</h4> <pre>public void connectionErrorOccurred(javax.sql.ConnectionEvent event)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>connectionErrorOccurred</code> in interface <code>javax.sql.ConnectionEventListener</code></dd> </dl> </li> </ul> <a name="statementClosed(javax.sql.StatementEvent)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>statementClosed</h4> <pre>public void statementClosed(javax.sql.StatementEvent event)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>statementClosed</code> in interface <code>javax.sql.StatementEventListener</code></dd> </dl> </li> </ul> <a name="statementErrorOccurred(javax.sql.StatementEvent)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>statementErrorOccurred</h4> <pre>public void statementErrorOccurred(javax.sql.StatementEvent event)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>statementErrorOccurred</code> in interface <code>javax.sql.StatementEventListener</code></dd> </dl> </li> </ul> <a name="getLogWriter()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getLogWriter</h4> <pre>public java.io.PrintWriter getLogWriter() throws java.sql.SQLException</pre> <div class="block"><p>Retrieves the log writer for this <code>DataSource</code> object. <p>The log writer is a character output stream to which all logging and tracing messages for this data source 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 <code>java.sql.DriverManager</code> class. When a <code>DataSource</code> object is created, the log writer is initially null; in other words, the default is for logging to be disabled.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>getLogWriter</code> in interface <code>javax.sql.CommonDataSource</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the log writer for this data source or null if logging is disabled</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt> <dd>1.4</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setLogWriter(java.io.PrintWriter)"><code>setLogWriter(java.io.PrintWriter)</code></a></dd></dl> </li> </ul> <a name="setLogWriter(java.io.PrintWriter)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setLogWriter</h4> <pre>public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException</pre> <div class="block"><p>Sets the log writer for this <code>DataSource</code> object to the given <code>java.io.PrintWriter</code> object. <p>The log writer is a character output stream to which all logging and tracing messages for this data source 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 <code>java.sql.DriverManager</code> class. When a <code>DataSource</code> object is created the log writer is initially null; in other words, the default is for logging to be disabled.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>setLogWriter</code> in interface <code>javax.sql.CommonDataSource</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - the new log writer; to disable logging, set to null</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if a database access error occurs</dd><dt><span class="strong">Since:</span></dt> <dd>1.4</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getLogWriter()"><code>getLogWriter()</code></a></dd></dl> </li> </ul> <a name="setLoginTimeout(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setLoginTimeout</h4> <pre>public void setLoginTimeout(int seconds) throws java.sql.SQLException</pre> <div class="block"><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 <code>DataSource</code> object is created, the login timeout is initially zero.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>setLoginTimeout</code> in interface <code>javax.sql.CommonDataSource</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>seconds</code> - the data source login time limit</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if a database access error occurs.</dd><dt><span class="strong">Since:</span></dt> <dd>1.4</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/hsqldb/jdbc/JDBCPool.html#getLoginTimeout()"><code>getLoginTimeout()</code></a></dd></dl> </li> </ul> <a name="getLoginTimeout()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getLoginTimeout</h4> <pre>public int getLoginTimeout() throws java.sql.SQLException</pre> <div class="block">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 <code>DataSource</code> object is created, the login timeout is initially zero.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>getLoginTimeout</code> in interface <code>javax.sql.CommonDataSource</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the data source login time limit</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code> - if a database access error occurs.</dd><dt><span class="strong">Since:</span></dt> <dd>1.4</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/hsqldb/jdbc/JDBCPool.html#setLoginTimeout(int)"><code>setLoginTimeout(int)</code></a></dd></dl> </li> </ul> <a name="getDescription()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDescription</h4> <pre>public java.lang.String getDescription()</pre> <div class="block">Retrieves the description of the data source. <p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>the description</dd></dl> </li> </ul> <a name="getDataSourceName()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDataSourceName</h4> <pre>public java.lang.String getDataSourceName()</pre> <div class="block">Retrieves the name of the data source. <p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>the description</dd></dl> </li> </ul> <a name="getDatabaseName()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDatabaseName</h4> <pre>public java.lang.String getDatabaseName()</pre> <div class="block">Synonym for getUrl().</div> <dl><dt><span class="strong">Returns:</span></dt><dd>the jdbc database connection url attribute</dd></dl> </li> </ul> <a name="getDatabase()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDatabase</h4> <pre>public java.lang.String getDatabase()</pre> <div class="block">Synonym for getUrl().</div> <dl><dt><span class="strong">Returns:</span></dt><dd>the jdbc database connection url attribute</dd></dl> </li> </ul> <a name="getUrl()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getUrl</h4> <pre>public java.lang.String getUrl()</pre> <div class="block">Retrieves the jdbc database connection url attribute. <p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>the jdbc database connection url attribute</dd></dl> </li> </ul> <a name="getUser()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getUser</h4> <pre>public java.lang.String getUser()</pre> <div class="block">Retrieves the user name for the connection. <p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>the username for the connection</dd></dl> </li> </ul> <a name="setDatabaseName(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setDatabaseName</h4> <pre>public void setDatabaseName(java.lang.String databaseName)</pre> <div class="block">Synonym for setUrl(String). <p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>databaseName</code> - the new value for the attribute</dd></dl> </li> </ul> <a name="setDatabase(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setDatabase</h4> <pre>public void setDatabase(java.lang.String database)</pre> <div class="block">Synonym for setUrl(String). <p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>database</code> - the new value for the attribute</dd></dl> </li> </ul> <a name="setUrl(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setUrl</h4> <pre>public void setUrl(java.lang.String url)</pre> <div class="block">Sets the jdbc database URL. <p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>url</code> - the new value of this object's jdbc database connection url attribute</dd></dl> </li> </ul> <a name="setPassword(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setPassword</h4> <pre>public void setPassword(java.lang.String password)</pre> <div class="block">Sets the password for the user name.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>password</code> - the password</dd></dl> </li> </ul> <a name="setUser(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setUser</h4> <pre>public void setUser(java.lang.String user)</pre> <div class="block">Sets the user name.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>user</code> - the user id</dd></dl> </li> </ul> <a name="setProperties(java.util.Properties)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setProperties</h4> <pre>public void setProperties(java.util.Properties props)</pre> <div class="block">Sets connection properties. If user / password / logginTimeout has been set with one of the setXXX() methods it will be added to the Properties object.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>props</code> - properties. If null, then existing properties will be cleared/replaced.</dd></dl> </li> </ul> <a name="getParentLogger()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getParentLogger</h4> <pre>public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException</pre> <div class="block">Return the parent Logger of all the Loggers used by this data source. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source. Configuring this Logger will affect all of the log messages generated by the data source. In the worst case, this may be the root Logger.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>getParentLogger</code> in interface <code>javax.sql.CommonDataSource</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the parent Logger for this data source</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>SQLFeatureNotSupportedException</code> - if the data source does not use <code>java.util.logging<code>.</dd><dt><span class="strong">Since:</span></dt> <dd>JDK 1.7 M11 2010/09/10 (b123), HSQLDB 2.2.9</dd></dl> </li> </ul> <a name="close(int)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>close</h4> <pre>public void close(int wait) throws java.sql.SQLException</pre> <div class="block">Closes the pool immediately. Waits the given number of seconds before closing all existing connections in the pool.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>wait</code> - int number of seconds to wait before closing the connections, maximum 60 seconds</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.sql.SQLException</code></dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/JDBCPool.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/hsqldb/jdbc/JDBCParameterMetaData.html" title="class in org.hsqldb.jdbc"><span class="strong">Prev Class</span></a></li> <li><a href="../../../org/hsqldb/jdbc/JDBCPreparedStatement.html" title="class in org.hsqldb.jdbc"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/hsqldb/jdbc/JDBCPool.html" target="_top">Frames</a></li> <li><a href="JDBCPool.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li><a href="#constructor_summary">Constr</a> | </li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor_detail">Constr</a> | </li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><i>Copyright �� 2001 - 2010 HSQL Development Group.</i></small></p> </body> </html>