com.raritantechnologies.searchApp.database
Class JNDIConnectionManager

java.lang.Object
  extended bycom.raritantechnologies.searchApp.database.JNDIConnectionManager
All Implemented Interfaces:
IConfigurable, IDatabaseConnectionManager

public class JNDIConnectionManager
extends java.lang.Object
implements IDatabaseConnectionManager

Database connection manager that uses the jdk 1.4 DataSource and JNDI Contexts to provide connection management and connection pooling.

XML Configuration Template:
   <SystemObject type="DatabaseConnectionManager" name="[my name]"
                    class="com.raritantechnologies.searchApp.database.JNDIConnectionManager"
                    initalContextFactory="[JNDI Initial Context Factory classname]"
                    envContext="[JNDI name for Initial context]"
                    dataSourceName="[JNDI Data Source name]" />


	WEBLOGIC sample:

			<SystemObject type="DatabaseConnectionManager"
				name="jdbcPrefs"
		class="com.raritantechnologies.searchApp.database.JNDIConnectionManager"
				initialContextFactory="weblogic.jndi.WLInitialContextFactory"
				dataSourceName="jdbcPREFS" />
	
	TOMCAT sample
	
			<SystemObject type="DatabaseConnectionManager"
				name="jdbcPrefs"
		class="com.raritantechnologies.searchApp.database.JNDIConnectionManager"
				envContext="java:/comp/env" 
				dataSourceName="jdbc/PREFS" />
 


Developed by Raritan Technologies .

Author:
Ted Sullivan, Glenn Robitaille

Constructor Summary
JNDIConnectionManager()
           
 
Method Summary
 java.sql.Connection getConnection()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIConnectionManager

public JNDIConnectionManager()
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface IDatabaseConnectionManager
Throws:
java.sql.SQLException

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable