org.springframework.orm.jdo
Class DefaultJdoDialect.DataStoreConnectionHandle

java.lang.Object
  extended by 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()

Field Summary
private  PersistenceManager persistenceManager
           
 
Constructor Summary
DefaultJdoDialect.DataStoreConnectionHandle(PersistenceManager persistenceManager)
           
 
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
 

Field Detail

persistenceManager

private final PersistenceManager persistenceManager
Constructor Detail

DefaultJdoDialect.DataStoreConnectionHandle

public DefaultJdoDialect.DataStoreConnectionHandle(PersistenceManager persistenceManager)
Method Detail

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