com.elvyx
Class ConnectionPoolDataSource

java.lang.Object
  extended by com.elvyx.DataSource
      extended by com.elvyx.ConnectionPoolDataSource
All Implemented Interfaces:
java.io.Serializable, javax.naming.Referenceable, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource

public class ConnectionPoolDataSource
extends DataSource
implements javax.sql.ConnectionPoolDataSource

This class is used to obtain a physical connection and instantiate and return an ElvyxPooledConnection. J2EE application servers map client calls to dataSource.getConnection to this class based upon mapping set within deployment descriptor. This class extends ElvyxDataSource.

Author:
David Newcomb
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.elvyx.DataSource
dsProperties, logWriter
 
Constructor Summary
ConnectionPoolDataSource()
           
 
Method Summary
 javax.sql.PooledConnection getPooledConnection()
          Returns a pooled connection.
 javax.sql.PooledConnection getPooledConnection(java.lang.String s, java.lang.String s1)
          This method is invoked by the container.
 
Methods inherited from class com.elvyx.DataSource
getConnection, getConnection, getConnection, getLoginTimeout, getLogWriter, getReference, setLoginTimeout, setLogWriter, setPassword, setPort, setPortNumber, setProperty, setRealDriver, setRealUrl, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.ConnectionPoolDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

ConnectionPoolDataSource

public ConnectionPoolDataSource()
Method Detail

getPooledConnection

public javax.sql.PooledConnection getPooledConnection()
                                               throws java.sql.SQLException
Returns a pooled connection.

Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Returns:
a PooledConnection
Throws:
java.sql.SQLException - if an error occurs

getPooledConnection

public javax.sql.PooledConnection getPooledConnection(java.lang.String s,
                                                      java.lang.String s1)
                                               throws java.sql.SQLException
This method is invoked by the container. Obtains physical connection using elvyx.Driver class and returns an ElvyxPooledConnection object.

Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Parameters:
s - user name
s1 - password
Returns:
a PooledConnection
Throws:
java.sql.SQLException - if an error occurs


Copyright © 2006-2008 Armando Perdomo. All Rights Reserved.