| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.engines.jdbcengine.datasource.JndiDataSourceConnectionFactory
This is a JNDI specific implementation of IConnectionFactory. It assumes that the Jdbc Engine is being executed in the same VM in which a DataSource has already been defined. It will use JNDI to get a handle on the DataSource resource and a Connection from that DataSource.
| Constructor Summary | |
| JndiDataSourceConnectionFactory() | |
| Method Summary | |
|  Connection | createConnection()Creates a connection using the DataSource obtained via JNDI. | 
|  void | freeConnection(Connection connection)Returns the connection back to the pool. | 
|  String | getJndiDataSourceName()Getter for property jndiDataSourceName. | 
|  Long | getMaxWait()Getter for property maxWait. | 
|  void | setJndiDataSourceName(String jndiDataSourceName)Setter for property jndiDataSourceName. | 
|  void | setMaxWait(Long maxWait)Setter for property maxWait. | 
|  boolean | usePreparedStatementCaching()Returns a true if the Prepared (and Call) Statements are to be cached for a connection. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public JndiDataSourceConnectionFactory()
| Method Detail | 
public String getJndiDataSourceName()
public void setJndiDataSourceName(String jndiDataSourceName)
jndiDataSourceName - New value of property jndiDataSourceName.public Long getMaxWait()
public void setMaxWait(Long maxWait)
maxWait - New value of property maxWait.
public Connection createConnection()
                            throws SQLException,
                                   IOException
createConnection in interface IConnectionFactorySQLException - if any SQL error occurs
IOException - if any IO error occurs
public void freeConnection(Connection connection)
                    throws SQLException,
                           IOException
freeConnection in interface IConnectionFactoryconnection - The connection to return back to the pool.
SQLException - if any SQL error occurs
IOException - if any IO error occurspublic boolean usePreparedStatementCaching()
usePreparedStatementCaching in interface IConnectionFactory| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||