com.objectwave.persist.broker
Class EjbConnectionSource
java.lang.Object
|
+--com.objectwave.persist.broker.AbstractConnectionFactory
|
+--com.objectwave.persist.broker.EjbConnectionSource
- All Implemented Interfaces:
- SqlConnectionFactory
- public class EjbConnectionSource
- extends AbstractConnectionFactory
- implements SqlConnectionFactory
The connectUrl will be the DataSource JNDI name.
- Version:
- $Id: EjbConnectionSource.java,v 2.2 2001/10/04 19:42:17 dave_hoag Exp $
- Author:
- dhoag
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DATASOURCE
public static final java.lang.String DEFAULT_DATASOURCE
- See Also:
- Constant Field Values
EjbConnectionSource
public EjbConnectionSource()
- Constructor for the EjbConnectionSource object
getEjbConnection
public java.sql.Connection getEjbConnection(RDBConnection jgrinderConnection)
throws java.lang.Exception
- Lookup the DataSource from the JNDI location. From the DataSource, create a
new connection object.
- Parameters:
jgrinderConnection
-
- Returns:
- The EjbConnection value
- Throws:
java.lang.Exception
checkConnection
public java.sql.Connection checkConnection(RDBConnection jgrinderConnection)
throws java.sql.SQLException
- Description copied from interface:
SqlConnectionFactory
- Create or retrieve the connection to use for accessing the database.
- Specified by:
checkConnection
in interface SqlConnectionFactory
- Parameters:
jgrinderConnection
-
- Returns:
-
- Throws:
java.sql.SQLException
freeConnection
public void freeConnection(RDBConnection jgrinderConnection,
java.sql.Connection connection)
- Description copied from interface:
SqlConnectionFactory
- Release the connection back into the wild.
- Specified by:
freeConnection
in interface SqlConnectionFactory
- Parameters:
jgrinderConnection
- connection
-