com.vaadin.data.util.sqlcontainer.connection
Class J2EEConnectionPool
java.lang.Object
com.vaadin.data.util.sqlcontainer.connection.J2EEConnectionPool
- All Implemented Interfaces:
- JDBCConnectionPool, Serializable
public class J2EEConnectionPool
- extends Object
- implements JDBCConnectionPool
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
J2EEConnectionPool
public J2EEConnectionPool(DataSource dataSource)
J2EEConnectionPool
public J2EEConnectionPool(String dataSourceJndiName)
reserveConnection
public Connection reserveConnection()
throws SQLException
- Description copied from interface:
JDBCConnectionPool
- Retrieves a connection.
- Specified by:
reserveConnection
in interface JDBCConnectionPool
- Returns:
- a usable connection to the database
- Throws:
SQLException
releaseConnection
public void releaseConnection(Connection conn)
- Description copied from interface:
JDBCConnectionPool
- Releases a connection that was retrieved earlier.
Note that depending on implementation, the transaction possibly open in
the connection may or may not be rolled back.
- Specified by:
releaseConnection
in interface JDBCConnectionPool
- Parameters:
conn
- Connection to be released
destroy
public void destroy()
- Description copied from interface:
JDBCConnectionPool
- Destroys the connection pool: close() is called an all the connections in
the pool, whether available or reserved.
This method was added to fix PostgreSQL -related issues with connections
that were left hanging 'idle'.
- Specified by:
destroy
in interface JDBCConnectionPool
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.