congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
DatasourceAccessor.createCustomizer
Code IndexAdd Tabnine to your IDE (free)

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

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

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

/**
* This method is called by reestablishConnection.
* Nothing needs to be done in case customize is not active (customization hasn't been applied yet).
* to repair existing customizer after connection became invalid.
* However if connection has been customized then
* if connection is still there and deemed to be valid - clear customization.
* Otherwise (or if clear fails) remove customizer and set its prevCustomizer as a new customizer,
* then re-create customizer using the same session as the original one.
*/
protected void reestablishCustomizer() {
  if(customizer != null && customizer.isActive()) {
    if(isValid()) {
      // the method eats SQLException in case of a failure.
      customizer.clear();
    } else {
      // It's an invalid connection - don't bother trying to clear customization.
      AbstractSession customizerSession = (AbstractSession)customizer.getSession();
      // need this so that the new customizer has the same prevCustomizer as the old one.
      customizer = customizer.getPrevCustomizer();
      // customizer recreated - it's the same as the original one, but not active.
      createCustomizer(customizerSession);
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
* This method is called by reestablishConnection.
* Nothing needs to be done in case customize is not active (customization hasn't been applied yet). 
* to repair existing customizer after connection became invalid.
* However if connection has been customized then
* if connection is still there and deemed to be valid - clear customization.
* Otherwise (or if clear fails) remove customizer and set its prevCustomizer as a new customizer,
* then re-create customizer using the same session as the original one.
*/
protected void reestablishCustomizer() {
  if(customizer != null && customizer.isActive()) {
    if(isValid()) {
      // the method eats SQLException in case of a failure.   
      customizer.clear();
    } else {
      // It's an invalid connection - don't bother trying to clear customization.
      AbstractSession customizerSession = (AbstractSession)customizer.getSession();
      // need this so that the new customizer has the same prevCustomizer as the old one.
      customizer = customizer.getPrevCustomizer();
      // customizer recreated - it's the same as the original one, but not active.
      createCustomizer(customizerSession);
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  /**
  * This method is called by reestablishConnection.
  * Nothing needs to be done in case customize is not active (customization hasn't been applied yet). 
  * to repair existing customizer after connection became invalid.
  * However if connection has been customized then
  * if connection is still there and deemed to be valid - clear customization.
  * Otherwise (or if clear fails) remove customizer and set its prevCustomizer as a new customizer,
  * then re-create customizer using the same session as the original one.
  */
  protected void reestablishCustomizer() {
    if(customizer != null && customizer.isActive()) {
      if(isValid()) {
        // the method eats SQLException in case of a failure.   
        customizer.clear();
      } else {
        // It's an invalid connection - don't bother trying to clear customization.
        AbstractSession customizerSession = (AbstractSession)customizer.getSession();
        // need this so that the new customizer has the same prevCustomizer as the old one.
        customizer = customizer.getPrevCustomizer();
        // customizer recreated - it's the same as the original one, but not active.
        createCustomizer(customizerSession);
      }
    }
  }  
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

createCustomizer(session);
try {
  connectInternal(login, session);
origin: org.eclipse.persistence/org.eclipse.persistence.core

createCustomizer(session);
try {
  connectInternal(login, session);
origin: com.haulmont.thirdparty/eclipselink

createCustomizer(session);
try {
  connectInternal(login, session);
org.eclipse.persistence.internal.databaseaccessDatasourceAccessorcreateCustomizer

Javadoc

Attempts to create ConnectionCustomizer. If created the customizer is cached by the accessor. Called by the owner of accessor (DatabaseSession, ServerSession through ConnectionPool) just once, typically right after the accessor is created. Also called by ClientSession when it acquires write accessor. If accessor already has a customizer set by ConnectionPool then ClientSession's customizer compared with the existing one and if they are not equal (don't produce identical customization) then the new customizer set onto accessor, caching the old customizer so that it could be restored later.

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
  • closeDatasourceConnection
    Close the connection to the driver level datasource.
  • 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.
  • 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

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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