Class ConnectionFactoryImpl.ManagedConnectionImpl

java.lang.Object
org.datanucleus.store.connection.AbstractManagedConnection
org.datanucleus.store.rdbms.ConnectionFactoryImpl.ManagedConnectionImpl
All Implemented Interfaces:
org.datanucleus.store.connection.ManagedConnection
Enclosing class:
ConnectionFactoryImpl

class ConnectionFactoryImpl.ManagedConnectionImpl extends org.datanucleus.store.connection.AbstractManagedConnection
  • Field Details

    • ec

      org.datanucleus.ExecutionContext ec
    • xaRes

      XAResource xaRes
    • isolation

      int isolation
    • needsCommitting

      boolean needsCommitting
    • savepoints

      private Map<String,Savepoint> savepoints
  • Constructor Details

    • ManagedConnectionImpl

      ManagedConnectionImpl(org.datanucleus.ExecutionContext ec, Map options)
  • Method Details

    • release

      public void release()
      Release this connection. Releasing this connection will allow this managed connection to be used one or more times inside the same transaction. If this managed connection is managed by a transaction manager, release is a no-op, otherwise the physical connection is closed
      Specified by:
      release in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      release in class org.datanucleus.store.connection.AbstractManagedConnection
    • getXAResource

      public XAResource getXAResource()
      Obtain an XAResource which can be enlisted in a transaction
      Specified by:
      getXAResource in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      getXAResource in class org.datanucleus.store.connection.AbstractManagedConnection
    • getConnection

      public Object getConnection()
      Create a connection to the resource
    • close

      public void close()
      Close the connection
      Specified by:
      close in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      close in class org.datanucleus.store.connection.AbstractManagedConnection
    • getSqlConnection

      private Connection getSqlConnection()
      Convenience accessor for the java.sql.Connection in use (if any).
      Returns:
      SQL Connection
    • setSavepoint

      public void setSavepoint(String name)
      Specified by:
      setSavepoint in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      setSavepoint in class org.datanucleus.store.connection.AbstractManagedConnection
    • releaseSavepoint

      public void releaseSavepoint(String name)
      Specified by:
      releaseSavepoint in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      releaseSavepoint in class org.datanucleus.store.connection.AbstractManagedConnection
    • rollbackToSavepoint

      public void rollbackToSavepoint(String name)
      Specified by:
      rollbackToSavepoint in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      rollbackToSavepoint in class org.datanucleus.store.connection.AbstractManagedConnection
    • closeAfterTransactionEnd

      public boolean closeAfterTransactionEnd()
      Specified by:
      closeAfterTransactionEnd in interface org.datanucleus.store.connection.ManagedConnection
      Overrides:
      closeAfterTransactionEnd in class org.datanucleus.store.connection.AbstractManagedConnection