congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JList (javax.swing)
  • JTable (javax.swing)
  • Best IntelliJ 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