Tabnine Logo
DatasourceAccessor.closeDatasourceConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
closeDatasourceConnection
method
in
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor

Best Java code snippets using org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.closeDatasourceConnection (Showing top 6 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Close the accessor's connection.
 * This is used only for external connection pooling
 * when it is intended for the connection to be reconnected in the future.
 */
public void closeConnection() {
  try {
    if (this.datasourceConnection != null) {
      if (isDatasourceConnected()) {
        if(currentSession != null) {
          currentSession.preReleaseConnection(this);
        }
        if(customizer != null && customizer.isActive()) {
          customizer.clear();
        }
        closeDatasourceConnection();
      }
      this.datasourceConnection = null;
    }
  } catch (DatabaseException exception) {
    // Ignore
    this.datasourceConnection = null;
  } finally {
    currentSession = null;
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Disconnect from the datasource.
 */
public void disconnect(AbstractSession session) throws DatabaseException {
  session.log(SessionLog.CONFIG, SessionLog.CONNECTION, "disconnect", (Object[])null, this);
  if (this.datasourceConnection == null) {
    return;
  }
  session.incrementProfile(SessionProfiler.TlDisconnects);
  session.startOperationProfile(SessionProfiler.CONNECT);
  releaseCustomizer();
  closeDatasourceConnection();
  this.datasourceConnection = null;
  this.isInTransaction = true;
  session.endOperationProfile(SessionProfiler.CONNECT);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Close the accessor's connection.
 * This is used only for external connection pooling
 * when it is intended for the connection to be reconnected in the future.
 */
public void closeConnection() {
  try {
    if (this.datasourceConnection != null) {
      if (isDatasourceConnected()) {
        if(currentSession != null) {
          currentSession.preReleaseConnection(this);
        }
        if(customizer != null && customizer.isActive()) {
          customizer.clear();
        }
        closeDatasourceConnection();
      }
      this.datasourceConnection = null;
    }
  } catch (DatabaseException exception) {
    // Ignore
    this.datasourceConnection = null;
  } finally {
    currentSession = null;
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Close the accessor's connection.
 * This is used only for external connection pooling
 * when it is intended for the connection to be reconnected in the future.
 */
public void closeConnection() {
  try {
    if (this.datasourceConnection != null) {
      if (isDatasourceConnected()) {
        if(currentSession != null) {
          currentSession.preDisconnectExternalConnection(this);
        }
        if(customizer != null && customizer.isActive()) {
          customizer.clear();
        }
        closeDatasourceConnection();
      }
      this.datasourceConnection = null;
    }
  } catch (DatabaseException exception) {
    // Ignore
    this.datasourceConnection = null;
  } finally {
    currentSession = null;
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Disconnect from the datasource.
 */
public void disconnect(AbstractSession session) throws DatabaseException {
  session.log(SessionLog.CONFIG, SessionLog.CONNECTION, "disconnect", (Object[])null, this);
  if (this.datasourceConnection == null) {
    return;
  }
  session.incrementProfile(SessionProfiler.Disconnects);
  session.startOperationProfile(SessionProfiler.ConnectionManagement);
  try {
    releaseCustomizer();
    closeDatasourceConnection();
    this.datasourceConnection = null;
    this.isInTransaction = true;
  } finally {
    session.endOperationProfile(SessionProfiler.ConnectionManagement);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Disconnect from the datasource.
 */
public void disconnect(AbstractSession session) throws DatabaseException {
  session.log(SessionLog.CONFIG, SessionLog.CONNECTION, "disconnect", (Object[])null, this);
  if (this.datasourceConnection == null) {
    return;
  }
  session.incrementProfile(SessionProfiler.Disconnects);
  session.startOperationProfile(SessionProfiler.ConnectionManagement);
  try {
    releaseCustomizer();
    closeDatasourceConnection();
    this.datasourceConnection = null;
    this.isInTransaction = true;
  } finally {
    session.endOperationProfile(SessionProfiler.ConnectionManagement);
  }
}
org.eclipse.persistence.internal.databaseaccessDatasourceAccessorcloseDatasourceConnection

Javadoc

Close the connection to the driver level datasource.

Popular methods of DatasourceAccessor

  • basicBeginTransaction
    Begin the driver level transaction.
  • basicCommitTransaction
    Commit the driver level transaction.
  • basicExecuteCall
    Execute the call to driver level datasource.
  • basicRollbackTransaction
    Rollback the driver level transaction.
  • buildConnectLog
    Build a log string of any driver metadata that can be obtained.
  • clone
    Clone the accessor.
  • closeConnection
    Close the accessor's connection. This is used only for external connection pooling when it is intend
  • commitTransaction
    Commit a transaction on the database. If using non-managed transaction commit the local transaction.
  • connectInternal
    Connect to the database. Exceptions are caught and re-thrown as EclipseLink exceptions.
  • createCustomizer
    Attempts to create ConnectionCustomizer. If created the customizer is cached by the accessor. Called
  • decrementCallCount
    Used for load balancing and external pooling.
  • disconnect
    Disconnect from the datasource.
  • decrementCallCount,
  • disconnect,
  • getDatasourceConnection,
  • getLogin,
  • getReadStatementsCount,
  • getStoredProcedureStatementsCount,
  • getWriteStatementsCount,
  • incrementCallCount,
  • isConnected

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Option (scala)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now