<!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 Wed Apr 24 09:14:51 MDT 2002 -->
<TITLE>
Omnidex JDBC Driver API Specification: Class  OdxJDBCConnectionMgrDataSource
</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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../omnidex/jdbc/OdxJDBCConnectionEventListener.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.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>  &nbsp;
&nbsp;<A HREF="OdxJDBCConnectionMgrDataSource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
omnidex.jdbc</FONT>
<BR>
Class  OdxJDBCConnectionMgrDataSource</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html">omnidex.jdbc.OdxJDBCDataSource</A>
        |
        +--<B>omnidex.jdbc.OdxJDBCConnectionMgrDataSource</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT>public final class <B>OdxJDBCConnectionMgrDataSource</B><DT>extends <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html">OdxJDBCDataSource</A><DT>implements javax.naming.Referenceable, java.io.Serializable</DL>

<P>
<code>OdxJDBCConnectionMgrDataSource</code> is a JDBC DataSource that implements
 both the DataSource interface and the connection pooling.
 Since this object implements the DataSource interface, it has to be
 registered with a JNDI service provider.

 <P>Given a JNDI-accessible naming and directory service and a registered
 <code>OdxJDBCConnectionMgrDataSource</code> object, client code can access that data source using
 JNDI calls.  

 <P><code>OdxJDBCConnectionMgrDataSource</code> will re-use Connection object after it is
 closed by the application. Calling close() method will close and remove all the 
 Connection object created by this object.

 <P>In addition to the attributes specified in <code>OdxJDBCDataSource</code>, there are
 additional attributes only applicable to this object. 
 You can specify the following additional attributes in your JNDI directory:
 <DL>
 <DT> <CODE>maxPoolSize</CODE>
 <DD> Maximum number of <code>OdxJDBCConnection</code> this object will keep open. Specify 0 for unlimited number.
 <DT> <CODE>poolType</CODE>
 <DD> The type of pooling this object will perform.
 <BR>Valid values:
 <DL>
 <DT> <CODE>WAIT_CONNECTION_POOL</CODE>
 <DD> <code>OdxJDBCConnectionMgrDataSource</code> will wait for available Connection object
 when the limit on maxPoolSize is reached.
 <DT> <CODE>NOWAIT_CONNECTION_POOL</CODE>
 <DD> <code>OdxJDBCConnectionMgrDataSource</code> will not wait for available Connection 
 object when the limit on maxPoolSize is reached. It will return <CODE>null</CODE>
 instead.
 </DL>
 </DL>
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html"><CODE>OdxJDBCDataSource</CODE></A>, 
<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.html"><CODE>OdxJDBCConnectionPoolDataSource</CODE></A>, 
<A HREF="../../omnidex/jdbc/OdxJDBCPooledConnection.html"><CODE>OdxJDBCPooledConnection</CODE></A>, <A HREF="../../serialized-form.html#omnidex.jdbc.OdxJDBCConnectionMgrDataSource">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#NOWAIT_CONNECTION_POOL">NOWAIT_CONNECTION_POOL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getConnection()"><CODE>getConnection()</CODE></A> method will not wait for available Connection object when
 the maximum number of open Connection object 
 (set using <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setMaxPoolSize(int)"><CODE>maxPoolSize()</CODE></A> method) has been
 reached and there is no available/free Connection object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#WAIT_CONNECTION_POOL">WAIT_CONNECTION_POOL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getConnection()"><CODE>getConnection()</CODE></A> method will wait for available Connection object when the
 maximum number of open Connection object 
 (set using <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setMaxPoolSize(int)"><CODE>maxPoolSize()</CODE></A> method) has been
 reached and there is no available/free Connection object.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#OdxJDBCConnectionMgrDataSource()">OdxJDBCConnectionMgrDataSource</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#OdxJDBCConnectionMgrDataSource(omnidex.jdbc.OdxJDBCConnectionPoolDataSource)">OdxJDBCConnectionMgrDataSource</A></B>(<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.html">OdxJDBCConnectionPoolDataSource</A>&nbsp;dataSource)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct an <code>OdxJDBCConnectionMgrDataSource</code> with a specified
 <code>OdxJDBCConnectionPoolDataSource</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#close()">close</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close all <code>Connection</code> objects on this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#closePooledConnection(javax.sql.PooledConnection)">closePooledConnection</A></B>(javax.sql.PooledConnection&nbsp;connection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked by <code>OdxJDBCConnectionEventListener</code> instance when an error occurred
 on the <code>Connection</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getActiveCount()">getActiveCount</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the count of <code>Connection</code> objects that are active/used.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.sql.Connection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getConnection()">getConnection</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempt to get a logical connection from the <code>PooledConnection</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.sql.Connection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getConnection(java.lang.String, java.lang.String)">getConnection</A></B>(java.lang.String&nbsp;uid,
              java.lang.String&nbsp;pwd)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempt to get a logical connection from the <code>PooledConnection</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getMaxPoolSize()">getMaxPoolSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the maximum number of <code>Connection</code> that can be opened on this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getPoolCount()">getPoolCount</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the count of <code>Connection</code> objects in this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getPoolType()">getPoolType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the pooling type for this <code>OdxJDBCConnectionMgrDataSource</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;javax.naming.Reference</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getReference()">getReference</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Required method to support <code>OdxJDBCConnectionMgrDataSource</code> as a <CODE>Referenceable</CODE>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#reusePooledConnection(javax.sql.PooledConnection)">reusePooledConnection</A></B>(javax.sql.PooledConnection&nbsp;connection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked by <code>OdxJDBCConnectionEventListener</code> instance when the application
 close the <code>Connection</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setConnectionPoolDataSource(omnidex.jdbc.OdxJDBCConnectionPoolDataSource)">setConnectionPoolDataSource</A></B>(<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.html">OdxJDBCConnectionPoolDataSource</A>&nbsp;dataSource)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attach an <code>OdxJDBCConnectionPoolDataSource</code> to this 
 <code>OdxJDBCConnectionMgrDataSource</code>
 object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setMaxPoolSize(int)">setMaxPoolSize</A></B>(int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of <code>Connection</code> that can be opened on this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setPoolType(int)">setPoolType</A></B>(int&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the pooling type for this <code>OdxJDBCConnectionMgrDataSource</code>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_omnidex.jdbc.OdxJDBCDataSource"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class omnidex.jdbc.<A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html">OdxJDBCDataSource</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getDatabaseName()">getDatabaseName</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getDataSourceName()">getDataSourceName</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getDescription()">getDescription</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getLoginTimeout()">getLoginTimeout</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getLogWriter()">getLogWriter</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getUser()">getUser</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setDatabaseName(java.lang.String)">setDatabaseName</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setDataSourceName(java.lang.String)">setDataSourceName</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setLoginTimeout(int)">setLoginTimeout</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setLogWriter(java.io.PrintWriter)">setLogWriter</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setPassword(java.lang.String)">setPassword</A>, <A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#setUser(java.lang.String)">setUser</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="WAIT_CONNECTION_POOL"><!-- --></A><H3>
WAIT_CONNECTION_POOL</H3>
<PRE>
public static final int <B>WAIT_CONNECTION_POOL</B></PRE>
<DL>
<DD><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getConnection()"><CODE>getConnection()</CODE></A> method will wait for available Connection object when the
 maximum number of open Connection object 
 (set using <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setMaxPoolSize(int)"><CODE>maxPoolSize()</CODE></A> method) has been
 reached and there is no available/free Connection object. 
 
 <P>This is the default setting for poolType member of this object.</DL>
<HR>

<A NAME="NOWAIT_CONNECTION_POOL"><!-- --></A><H3>
NOWAIT_CONNECTION_POOL</H3>
<PRE>
public static final int <B>NOWAIT_CONNECTION_POOL</B></PRE>
<DL>
<DD><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#getConnection()"><CODE>getConnection()</CODE></A> method will not wait for available Connection object when
 the maximum number of open Connection object 
 (set using <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#setMaxPoolSize(int)"><CODE>maxPoolSize()</CODE></A> method) has been
 reached and there is no available/free Connection object.
 In this case, getConnection() will return null.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="OdxJDBCConnectionMgrDataSource()"><!-- --></A><H3>
OdxJDBCConnectionMgrDataSource</H3>
<PRE>
public <B>OdxJDBCConnectionMgrDataSource</B>()
                               throws java.sql.SQLException</PRE>
<DL>
<DD>Default constructor.
 You need to explicitly call setXXX to set the attributes before
 getting <code>Connection</code> object.

 <P><DD><DL>
<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="OdxJDBCConnectionMgrDataSource(omnidex.jdbc.OdxJDBCConnectionPoolDataSource)"><!-- --></A><H3>
OdxJDBCConnectionMgrDataSource</H3>
<PRE>
public <B>OdxJDBCConnectionMgrDataSource</B>(<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.html">OdxJDBCConnectionPoolDataSource</A>&nbsp;dataSource)
                               throws java.sql.SQLException</PRE>
<DL>
<DD>Construct an <code>OdxJDBCConnectionMgrDataSource</code> with a specified
 <code>OdxJDBCConnectionPoolDataSource</code>.

 <P>The currently specified attributes will be overridden by the 
 attributes specified in <code>OdxJDBCConnectionPoolDataSource</code>.

 <P><DD><DL>
<DT><B>Parameters:</B><DD><CODE>ds</CODE> - the <code>OdxJDBCConnectionPoolDataSource</code> object that will be used
 to generate <code>PooledConnection</code> and <code>Connection</code> objects.<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>

<!-- ============ 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="setConnectionPoolDataSource(omnidex.jdbc.OdxJDBCConnectionPoolDataSource)"><!-- --></A><H3>
setConnectionPoolDataSource</H3>
<PRE>
public void <B>setConnectionPoolDataSource</B>(<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.html">OdxJDBCConnectionPoolDataSource</A>&nbsp;dataSource)
                                 throws java.sql.SQLException</PRE>
<DL>
<DD>Attach an <code>OdxJDBCConnectionPoolDataSource</code> to this 
 <code>OdxJDBCConnectionMgrDataSource</code>
 object.
 
 <P>If this object has already open at least one <code>Connection</code> object, 
 it will throw an <code>SQLException</code>.
 If there is no open <code>Connection</code> object, the currently specified attributes
 will be overridden by the attributes specified in 
 <code>OdxJDBCConnectionPoolDataSource</code>.

 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ds</CODE> - the <code>OdxJDBCConnectionPoolDataSource</code> object that will be used
 to generate <code>PooledConnection</code> and <code>Connection</code> objects.<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="getConnection()"><!-- --></A><H3>
getConnection</H3>
<PRE>
public java.sql.Connection <B>getConnection</B>()
                                  throws java.sql.SQLException</PRE>
<DL>
<DD>Attempt to get a logical connection from the <code>PooledConnection</code>.
 You must set the required attributes in the JNI directory before
 attempting to call this method.

 <P>Depending upon the poolType, this object may return <CODE>null</CODE>.
 
 <P><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getConnection()">getConnection</A></CODE> in class <CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html">OdxJDBCDataSource</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a <code>Connection</code> to the database<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.<DT><B>See Also: </B><DD><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#WAIT_CONNECTION_POOL"><CODE>WAIT_CONNECTION_POOL</CODE></A>, 
<A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#NOWAIT_CONNECTION_POOL"><CODE>NOWAIT_CONNECTION_POOL</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getConnection(java.lang.String, java.lang.String)"><!-- --></A><H3>
getConnection</H3>
<PRE>
public java.sql.Connection <B>getConnection</B>(java.lang.String&nbsp;uid,
                                         java.lang.String&nbsp;pwd)
                                  throws java.sql.SQLException</PRE>
<DL>
<DD>Attempt to get a logical connection from the <code>PooledConnection</code>.
 You must set the required attributes in the JNI directory before
 attempting to call this method.

 <P><code>user</code> and <code>password</code> should match the ones in the JNDI directory.

 <P>Depending upon the poolType, this object may return <CODE>null</CODE>.
 
 <P><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getConnection(java.lang.String, java.lang.String)">getConnection</A></CODE> in class <CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html">OdxJDBCDataSource</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.<DT><B>See Also: </B><DD><A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#WAIT_CONNECTION_POOL"><CODE>WAIT_CONNECTION_POOL</CODE></A>, 
<A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#NOWAIT_CONNECTION_POOL"><CODE>NOWAIT_CONNECTION_POOL</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="reusePooledConnection(javax.sql.PooledConnection)"><!-- --></A><H3>
reusePooledConnection</H3>
<PRE>
public void <B>reusePooledConnection</B>(javax.sql.PooledConnection&nbsp;connection)
                           throws java.sql.SQLException</PRE>
<DL>
<DD>Invoked by <code>OdxJDBCConnectionEventListener</code> instance when the application
 close the <code>Connection</code> object.
 This means that the <code>Connection</code> can be placed into the pool
 for further use. The <code>Connection</code> object will not be closed physically.

 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>connection</CODE> - the <code>PooledConnection</code> object to be put back into the pool.<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="closePooledConnection(javax.sql.PooledConnection)"><!-- --></A><H3>
closePooledConnection</H3>
<PRE>
public void <B>closePooledConnection</B>(javax.sql.PooledConnection&nbsp;connection)
                           throws java.sql.SQLException</PRE>
<DL>
<DD>Invoked by <code>OdxJDBCConnectionEventListener</code> instance when an error occurred
 on the <code>Connection</code> object.
 The <code>Connection</code> will be marked for deletion and closed.

 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>connection</CODE> - the <code>PooledConnection</code> object that will be closed because
 of an error.<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()
           throws java.sql.SQLException</PRE>
<DL>
<DD>Close all <code>Connection</code> objects on this object.
 
 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if a database-access error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="getMaxPoolSize()"><!-- --></A><H3>
getMaxPoolSize</H3>
<PRE>
public int <B>getMaxPoolSize</B>()</PRE>
<DL>
<DD>Get the maximum number of <code>Connection</code> that can be opened on this object.

 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the maximum number of <code>Connection</code> that can be opened.</DL>
</DD>
</DL>
<HR>

<A NAME="setMaxPoolSize(int)"><!-- --></A><H3>
setMaxPoolSize</H3>
<PRE>
public void <B>setMaxPoolSize</B>(int&nbsp;size)</PRE>
<DL>
<DD>Set the maximum number of <code>Connection</code> that can be opened on this object.
 Set the number to 0 for unlimited number.
 
 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - the maximum number of <code>Connection</code> that can be opened.</DL>
</DD>
</DL>
<HR>

<A NAME="getPoolType()"><!-- --></A><H3>
getPoolType</H3>
<PRE>
public int <B>getPoolType</B>()</PRE>
<DL>
<DD>Get the pooling type for this <code>OdxJDBCConnectionMgrDataSource</code>.
 
 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>either <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#WAIT_CONNECTION_POOL"><CODE>WAIT_CONNECTION_POOL</CODE></A> or <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#NOWAIT_CONNECTION_POOL"><CODE>NOWAIT_CONNECTION_POOL</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setPoolType(int)"><!-- --></A><H3>
setPoolType</H3>
<PRE>
public void <B>setPoolType</B>(int&nbsp;type)</PRE>
<DL>
<DD>Set the pooling type for this <code>OdxJDBCConnectionMgrDataSource</code>.
 
 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - either <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#WAIT_CONNECTION_POOL"><CODE>WAIT_CONNECTION_POOL</CODE></A> or <A HREF="../../omnidex/jdbc/OdxJDBCConnectionMgrDataSource.html#NOWAIT_CONNECTION_POOL"><CODE>NOWAIT_CONNECTION_POOL</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getActiveCount()"><!-- --></A><H3>
getActiveCount</H3>
<PRE>
public int <B>getActiveCount</B>()</PRE>
<DL>
<DD>Get the count of <code>Connection</code> objects that are active/used.
 
 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>total number of active <code>Connection</code> objects.</DL>
</DD>
</DL>
<HR>

<A NAME="getPoolCount()"><!-- --></A><H3>
getPoolCount</H3>
<PRE>
public int <B>getPoolCount</B>()</PRE>
<DL>
<DD>Get the count of <code>Connection</code> objects in this object.
 
 <P><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>total number of all <code>Connection</code> objects (active/inactive).</DL>
</DD>
</DL>
<HR>

<A NAME="getReference()"><!-- --></A><H3>
getReference</H3>
<PRE>
public javax.naming.Reference <B>getReference</B>()
                                    throws javax.naming.NamingException</PRE>
<DL>
<DD>Required method to support <code>OdxJDBCConnectionMgrDataSource</code> as a <CODE>Referenceable</CODE>.

 <P><DD><DL>
<DT><B>Specified by: </B><DD><CODE>getReference</CODE> in interface <CODE>javax.naming.Referenceable</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html#getReference()">getReference</A></CODE> in class <CODE><A HREF="../../omnidex/jdbc/OdxJDBCDataSource.html">OdxJDBCDataSource</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a reference to this object<DT><B>Throws:</B><DD><CODE>javax.naming.NamingException</CODE> - a problem occurred constructing
 the reference</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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../omnidex/jdbc/OdxJDBCConnectionEventListener.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../omnidex/jdbc/OdxJDBCConnectionPoolDataSource.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>  &nbsp;
&nbsp;<A HREF="OdxJDBCConnectionMgrDataSource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>
