Protomatter Classes v1.1.6

com.protomatter.jdbc.pool
Class PASJdbcPoolStartup

java.lang.Object
  |
  +--com.protomatter.jdbc.pool.PASJdbcPoolStartup
All Implemented Interfaces:
PASStartup

public class PASJdbcPoolStartup
extends java.lang.Object
implements PASStartup

A startup class for use with the Protomatter Application Server. It will create pools at startup based on configuration properties. This class looks for properties in the PAS properties file that look like this:

  ##
  ## Configuration properties for the pool.
  ##
  com.protomatter.jdbc.pool.POOLNAME=\
    pool.initialSize=pool-start-size,\
    pool.maxSize=pool-max-size,\
    pool.growBlock=grow-block-size,\
    pool.createWaitTime=wait-time,\
    jdbc.driver=driver-class-name,\
    jdbc.URL=connection-URL,\
    jdbc.validityCheckStatement=SQL-statement,\
    pool.refreshThreadCheckInterval=check-interval

  ##
  ## Connection properties for the pool.
  ##
  com.protomatter.jdbc.pool.POOLNAME.jdbcProperties=\
    key1=val1,\
    key2=val2
  

The properties in the first part of the example correspond to init parameters for the JdbcConnectionPool class. This class knows how to translate each option into the correct type (such as java.lang.Integer, etc) before initializing the pool. The properties defined in the second part of the example are passed in as the jdbc.properties init option.

A javax.sql.DataSource interface is also placed into JNDI for each pool at the "com.protomatter.jdbc.pool.PoolName" location.

See Also:
JdbcConnectionPool

Constructor Summary
PASJdbcPoolStartup()
          Default constructor.
 
Method Summary
 java.lang.String startup(java.lang.String name, java.util.Properties pasProps, java.util.Properties myProps, javax.naming.Context context)
          Start JDBC connection pools.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PASJdbcPoolStartup

public PASJdbcPoolStartup()
Default constructor.
Method Detail

startup

public java.lang.String startup(java.lang.String name,
                                java.util.Properties pasProps,
                                java.util.Properties myProps,
                                javax.naming.Context context)
                         throws StartupException
Start JDBC connection pools. This method is called by PAS.
Specified by:
startup in interface PASStartup
See Also:
PASStartup

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6