home *** CD-ROM | disk | FTP | other *** search
/ Encyclopaedia Britannica …oncise Encyclopedia 2007 / bcd_concise07.iso / data / jars / CDApp.jar / autocompletePoolLocal.jocl < prev    next >
Encoding:
Extensible Markup Language  |  2006-08-09  |  1.9 KB  |  50 lines

  1. <?xml version="1.0"?>
  2. <object class="org.apache.commons.dbcp.PoolableConnectionFactory" xmlns="http://apache.org/xml/xmlns/jakarta/commons/jocl">
  3.  
  4.    <!--
  5.       The first argument to PoolableConnectionFactory is a ConnectionFactory.
  6.       We'll use a DriverManagerConnectionFactory, passing in the appropriate
  7.       connect string for the underlying driver.
  8.     -->
  9.    <object class="org.apache.commons.dbcp.DriverManagerConnectionFactory">
  10.       <string value="jdbc:britannica:axioncd:autocomplete:${INSTALL}/autocomplete"/>
  11.       <object class="java.util.Properties" null="true"/>
  12.    </object>
  13.  
  14.    <!--
  15.       The next argument is the pool to use.
  16.     -->
  17.    <object class="org.apache.commons.pool.impl.GenericObjectPool">
  18.      <object class="org.apache.commons.pool.PoolableObjectFactory"
  19.              null="true"/>
  20.      <int value="3"/>         <!-- Max active -->
  21.      <byte value="2"/>        <!-- Exhausted action (2=grow) -->
  22.      <long value="0"/>        <!-- Max wait -->
  23.      <int value="0"/>         <!-- Max idle -->
  24.      <boolean value="false"/>  <!-- Test on borrow -->
  25.      <boolean value="false"/> <!-- Test on return -->
  26.    </object>
  27.  
  28.    <!--
  29.        The next argument is the KeyedObjectPoolFactory to use to create
  30.        pools for storing PreparedStatements.  This functionality is
  31.        optional, we'll just use null.
  32.    -->
  33.    <object class="org.apache.commons.pool.impl.StackKeyedObjectPoolFactory">
  34.       <int value="3"/> 
  35.    </object> 
  36.  
  37.    <!--
  38.       The next argument is the query to use to validate that a Connection is
  39.       still up and running.  It should return at least one row.
  40.       This functionality is optional. We'll just set it to null.
  41.     -->
  42.    <string null="true"/>
  43.  
  44.    <!-- The default "read only" value for Connections. -->
  45.    <boolean value="true"/>
  46.  
  47.    <!-- The default "auto commit" value for Connections. -->
  48.    <boolean value="false"/>
  49. </object>
  50.