tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Järkeborn Joacim <joacim.jarkeb...@consultant.volvo.com>
Subject Poolman 2.0.4 and Tomcat 3.2.3
Date Wed, 22 Aug 2001 09:12:43 GMT
Hi,

Since I need to get a DataSource from some JNDI I have downloaded PoolMan 2.0.4.
When I am trying to run "JSP Database Client" Tomcat terminates.

In <TOMCAT_HOME>/lib I have the following jars:
poolman.jar, jdbc2_0-stdext.jar, jta.jar, xerces.jar, mm.mysql-2.0.4-bin.jar

I also have the poolman.xml in the same dir, but this is added to CLASSPATH in <TOMCAT_HOME>/bin/tomcat.bat:
if exist "%TOMCAT_HOME%\lib\poolman.xml" set CP=%CP%;%TOMCAT_HOME%\lib\poolman.xml

What's wrong?

Regards
Joacim J


My poolman.xml (based on poolman.xml.template)
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<poolman>

  <!-- =============================================================== -->
  <!-- If the management-mode is JMX, then JMX will be used to deploy  -->
  <!-- all of the DataSource pools and object pools, and the JMX admin -->
  <!-- will be started for HTTP-based administration of pools. JMX     -->
  <!-- is somewhat heavy for applications that necessarily require it, -->
  <!-- and its internal ClassLoaders occasionally create conflicts.    -->
  <!-- Thus it can be commented out and not used.                      -->
  <!-- POSSIBLE VALUES: jmx, local                                     -->
  <!-- DEFAULT: local (JMX not used)                                   -->         
   
  <!-- =============================================================== -->
  <management-mode>jmx</management-mode>

  <!-- ========================================================== -->
  <!-- These entries illustrate configuration of generic non-JDBC -->
  <!-- object pooling.                                            -->
  <!-- ========================================================== -->
  <objectPool>
    <name>mypool</name>
    <objectType>java.lang.StringBuffer</objectType>
    <initialObjects>10</initialObjects>
    <minimumSize>1</minimumSize>
    <maximumSize>10</maximumSize>
    <objectTimeout>6</objectTimeout>
    <userTimeout>12</userTimeout>
    <skimmerFrequency>300</skimmerFrequency>
    <shrinkBy>2</shrinkBy>
    <logFile>c:\code\src\poolman\lib\pool.log</logFile>
    <debugging>true</debugging>
  </objectPool>


  <!-- ========================================================== -->
  <!-- These entries are an example of JDBC Connection pooling.   -->
  <!-- Many of the parameters are optional. Consult the           -->
  <!-- UsersGuide.html doument for guidance and element           --> 
  <!-- definitions.                                               -->
  <!-- ========================================================== -->

  <datasource>

    <!-- ============================== -->
    <!-- Physical Connection Attributes -->
    <!-- ============================== -->

    <!-- Standard JDBC Driver info -->
    <dbname>dtim9t</dbname>
    <jndiName>jdbc/dtim9t</jndiName>
    <driver>org.gjt.mm.mysql.Driver</driver>
    <url>jdbc:mysql://localhost/dtim9t</url>
    <username>impact</username>
    <password>impact</password>


    <!-- If the following element is set to true, then PoolMan's  -->
    <!-- scrollable/updatable ResultSet will not be used, and the -->
    <!-- underlying driver's ResultSet will be used instead. This -->
    <!-- provides a performance gain in certain rare instances at -->
    <!-- the expense of functionality.                            -->
    <!-- DEFAULT: false                                           -->
    <nativeResults>false</nativeResults>

    <!-- ======================== -->
    <!-- Pool Behavior Attributes -->
    <!-- ======================== -->

    <!-- Connections created when the pool is instantiated -->
    <!-- DEFAULT: 1                                        -->
    <initialConnections>2</initialConnections>

    <!-- The pool will never shrink below this number -->
    <!-- DEFAULT: 0                                   -->
    <minimumSize>0</minimumSize>

    <!-- The pool will never grow larger than this value -->
    <maximumSize>10</maximumSize>

    <!-- If the maximum size of a pool is reached but requests  -->
    <!-- are still waiting on objects, PoolMan will create new  -->
    <!-- emergency objects if this value is set to true. This   -->
    <!-- will temporarily increase the size of the pool, but    -->
    <!-- the pool will shrink back down to acceptable size      -->
    <!-- automatically when the skimmer activates. If this      -->
    <!-- value is set to false, the requests will sit and wait  -->
    <!-- until an object is available.                          -->
    <!-- DEFAULT: true                                          -->
    <maximumSoft>true</maximumSoft>

    <!-- The connection will be destroyed after living for a     -->
    <!-- duration of this value. IN SECONDS.                     -->
    <!-- DEFAULT: 1200 (20 minutes)                              -->
    <connectionTimeout>600</connectionTimeout>

    <!-- A user will lose a Connection and it will automatically -->
    <!-- return to its pool after the duration greater than or   -->
    <!-- equal to this value. If this value is set to 0 or less, -->
    <!-- no user timeout will be enforced. IN SECONDS.           -->
    <!-- DEFAULT: 20                                             --> 
    <userTimeout>12</userTimeout>

    <!-- How frequently each object's connection timeout and     -->
    <!-- user timeout values will be examined for collection.    -->
    <!-- IN SECONDS.                                             -->
    <!-- DEFAULT: 420 (7 minutes)                                -->
    <skimmerFrequency>300</skimmerFrequency>

    <!-- Each time the pool is sized down, how many connections  -->
    <!-- should be removed from it? This value prevents backing  -->
    <!-- off the pool too quickly.                               -->
    <shrinkBy>10</shrinkBy>

    <!-- Each time a connection is requested, it is validated by -->
    <!-- the pool to ensure that it is active. If this element   -->
    <!-- exists, then it is treated as a SQL query that is       -->
    <!-- executed on the raw Connection (bypassing the cache)    -->
    <!-- in order to ensure the Connection is valid. If this     -->
    <!-- element does NOT exist, then the Connection.isClosed()  -->
    <!-- method is used to validate it instead. The              -->
    <!-- Connection.isClosed() method is unreliable on some      -->
    <!-- drivers.                                                -->
    <!-- DEFAULT: null                                           -->
    <validationQuery>SELECT id FROM users</validationQuery>

    <!-- Where should log and debug information be printed?      -->
    <!-- DEFAULT: System.out                                     -->
    <logFile>C:\apache-tomcat\logs\poolman.txt</logFile>

    <!-- If set to true, the logger will display verbose info    -->
    <!-- DEFAULT: false                                          -->
    <debugging>true</debugging>

    <!-- XA Connection Attributes   -->
    <!-- NOTE: MEASURED IN SECONDS. -->
    <transactionTimeout>100</transactionTimeout>

    <!-- Query Cache Attributes-->

    <!-- If enabled, queries will be cached. The cache is        -->
    <!-- asynchronously updated in the background.               -->
    <!-- DEFAULT: false                                          -->
    <cacheEnabled>true</cacheEnabled>

    <!-- The maximum number of query/ResultSet pairs the         -->
    <!-- cache can contain.                                      --> 
    <!-- DEFAULT: 5                                              -->
    <cacheSize>10</cacheSize>

    <!-- How long the cache waits before re-loading its          -->
    <!-- ResultSets from the underlying database.                -->
    <!-- IN SECONDS.                                             -->
    <!-- DEFAULT: 30                                             -->
    <cacheRefreshInterval>120</cacheRefreshInterval>

    <!-- A SQL statement to be executed when the pool is created.-->
    <!-- DEFAULT: none                                           -->
    <!--
    <initialPoolSQL>
    	insert into users values(32, 'xml')
    </initialPoolSQL>
    -->


    <!-- A SQL statement to be excuted every time a Connection   -->
    <!-- is accessed.                                            -->
    <!-- DEFAULT: none                                           -->
    <!--
    <initialConnectionSQL>
	insert into users values(1010, 'con')
    </initialConnectionSQL>
    -->

    <!-- Whether a SQLException should cause the Connection to   --> 
    <!-- be removed from the pool and destroyed.                 -->
    <!-- DEFAULT: false                                          -->
    <removeOnExceptions>false</removeOnExceptions>

  </datasource>

  <!-- ==================================================== -->
  <!-- Another generic object pool, this one is used by     -->
  <!-- the PoolManServlet application                       -->
  <!-- ==================================================== -->
  <objectPool>
    <name>beanpool</name>
    <objectType>com.codestudio.util.PoolManBean</objectType>
    <initialObjects>6</initialObjects>
    <minimumSize>0</minimumSize>
    <maximumSize>50</maximumSize>
    <objectTimeout>1200</objectTimeout>
    <userTimeout>1200</userTimeout>
    <skimmerFrequency>300</skimmerFrequency>
    <shrinkBy>2</shrinkBy>
    <logFile>C:\apache-tomcat\logs\PoolManServlet.log</logFile>
    <debugging>true</debugging>
  </objectPool>

  <!-- ========================================= -->
  <!-- Admin via JMX HTML Adapter. Disable this  -->
  <!-- (at least comment it out) for production  -->
  <!-- environments. When enabled, point your    -->
  <!-- web browser to the localhost:[port] to    -->
  <!-- view the JMX html admin agent.            -->
  <!-- This agent is not created if the          -->
  <!-- management-mode element above is not      -->
  <!-- set to "jmx"                              -->
  <!-- ========================================= -->
  <admin-agent>
    <class>com.sun.jdmk.comm.HtmlAdaptorServer</class>
    <name>Adaptor:name=html</name>
    <maxClients>10</maxClients>
    <port>8082</port>
  </admin-agent>

</poolman>
------------------------------------------------------------------------

Mime
View raw message