|
MDi JLib 1.7.4 |
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
ConnectionPoolInterface | Interface class used by the ConnectionPool implementation class. |
Class Summary | |
---|---|
ConnectionPool | ConnectionPool is designed to ease the burden of establishing pooled connections within Servlets or JSP pages. |
ConnectionPoolPw | Class used to generate new passwords for the Connection Pool dbnames property file. |
ConnectionPoolTest | ConnectionPoolTest is used to ensure that the Connection Pool and JNDI is working properly. |
The class is built Oracle databases in particular.
These classes uses pooled connections based on JNDI lookup for registered pool resources within a given java server container. If you desire connections formed from a dedicated connection, you should use the com.microdeveloper.db.Connection class instead. In both cases, the connections must be explicitly closed when operations are completed.
To use these classes, you must have a database.properties file available. The default location the class
looks in is META-INF within it's class path. This can be placed in a JAR or stored in the file system. Under
Tomcat, for example, the physical path would be %CATALINA_HOME%/%CONTEXT_HOME%/WEB-INF/classes/META-INF. The
construct of the file must contain, at a minimum, the following:
#Alias
test
#Driver
test.Driver=oracle.jdbc.driver.OracleDriver
#URL
test.Url=jdbc\:oracle\:thin\:@db.oracle.com\:1521\:orcl
and may optionally contain:
#JNDI database name
test.JNDI=test
#default test user
test.User=scott
#Scott's (encrypted) password
test.Pw=Rq2lKFXWb2c\=
There are always one group of entries per database connection. They can appear in any order in the file but it is usually best to keep them grouped together for readability.
Refer to the individual classes for connection usage instructions.
Package documentation version 1.0.2
|
MDi JLib 1.7.4 |
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |