org.springframework.orm.jdo
Class DefaultJdoDialect.DataStoreConnectionHandle
java.lang.Object
org.springframework.orm.jdo.DefaultJdoDialect.DataStoreConnectionHandle
- All Implemented Interfaces:
- ConnectionHandle
- Enclosing class:
- DefaultJdoDialect
private static class DefaultJdoDialect.DataStoreConnectionHandle
- extends java.lang.Object
- implements ConnectionHandle
ConnectionHandle implementation that fetches a new JDO2 DataStoreConnection
for every getConnection
call and closes the Connection on
releaseConnection
. This is necessary because JDO2 requires the
fetched Connection to be closed before continuing PersistenceManager work.
- See Also:
javax.jdo.PersistenceManager#getDataStoreConnection()
Method Summary |
java.sql.Connection |
getConnection()
Fetch the JDBC Connection that this handle refers to. |
void |
releaseConnection(java.sql.Connection con)
Release the JDBC Connection that this handle refers to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
persistenceManager
private final PersistenceManager persistenceManager
DefaultJdoDialect.DataStoreConnectionHandle
public DefaultJdoDialect.DataStoreConnectionHandle(PersistenceManager persistenceManager)
getConnection
public java.sql.Connection getConnection()
- Description copied from interface:
ConnectionHandle
- Fetch the JDBC Connection that this handle refers to.
- Specified by:
getConnection
in interface ConnectionHandle
releaseConnection
public void releaseConnection(java.sql.Connection con)
- Description copied from interface:
ConnectionHandle
- Release the JDBC Connection that this handle refers to.
- Specified by:
releaseConnection
in interface ConnectionHandle
- Parameters:
con
- the JDBC Connection to release