Tabnine Logo
ConnectionCustomizer.getSession
Code IndexAdd Tabnine to your IDE (free)

How to use
getSession
method
in
org.eclipse.persistence.internal.databaseaccess.ConnectionCustomizer

Best Java code snippets using org.eclipse.persistence.internal.databaseaccess.ConnectionCustomizer.getSession (Showing top 9 results out of 315)

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: com.haulmont.thirdparty/eclipselink

/**
* Clear and remove customizer if its session is the same as the passed one;
* in case prevCustomizer exists set it as a new customizer.
* Called when ClientSession releases write accessor:
* if the customizer was created by the ClientSession it's removed, and
* the previous customizer (that ConnectionPool had set) is brought back;
* otherwise the customizer (created by ConnectionPool) is kept.
* Ignored if there's no customizer. 
*/
public void releaseCustomizer(AbstractSession session) {
  if(customizer != null) {
    if(customizer.getSession() == session) {
      if(customizer.isActive()) {
        customizer.clear();
      }
      if(customizer.getPrevCustomizer() == null) {
        customizer = null;
      } else {
        setCustomizer(customizer.getPrevCustomizer());
      }
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
* Clear and remove customizer if its session is the same as the passed one;
* in case prevCustomizer exists set it as a new customizer.
* Called when ClientSession releases write accessor:
* if the customizer was created by the ClientSession it's removed, and
* the previous customizer (that ConnectionPool had set) is brought back;
* otherwise the customizer (created by ConnectionPool) is kept.
* Ignored if there's no customizer. 
*/
public void releaseCustomizer(AbstractSession session) {
  if(customizer != null) {
    if(customizer.getSession() == session) {
      if(customizer.isActive()) {
        customizer.clear();
      }
      if(customizer.getPrevCustomizer() == null) {
        customizer = null;
      } else {
        setCustomizer(customizer.getPrevCustomizer());
      }
    }
  }
}
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: org.eclipse.persistence/org.eclipse.persistence.core

/**
* Clear and remove customizer if its session is the same as the passed one;
* in case prevCustomizer exists set it as a new customizer.
* Called when ClientSession releases write accessor:
* if the customizer was created by the ClientSession it's removed, and
* the previous customizer (that ConnectionPool had set) is brought back;
* otherwise the customizer (created by ConnectionPool) is kept.
* Ignored if there's no customizer.
*/
public void releaseCustomizer(AbstractSession session) {
  if(customizer != null) {
    if(customizer.getSession() == session) {
      if(customizer.isActive()) {
        customizer.clear();
      }
      if(customizer.getPrevCustomizer() == null) {
        customizer = null;
      } else {
        setCustomizer(customizer.getPrevCustomizer());
      }
    }
  }
}
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/org.eclipse.persistence.core

if(customizer.getSession() == session) {
  return;
origin: com.haulmont.thirdparty/eclipselink

if(customizer.getSession() == session) {
  return;
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if(customizer.getSession() == session) {
  return;
org.eclipse.persistence.internal.databaseaccessConnectionCustomizergetSession

Javadoc

INTERNAL:

Popular methods of ConnectionCustomizer

  • clear
    INTERNAL: Clears customization from connection. Called only if connection is customized (isActive()=
  • createEmptyCustomizer
  • customize
    INTERNAL: Applies customization to connection. Called only if connection is not already customized (
  • getPrevCustomizer
    INTERNAL:
  • isActive
    INTERNAL: Indicated whether the connection is currently customized.
  • setAccessor
    INTERNAL: Used only by DatasourceAccessor.clone method.
  • setPrevCustomizer
    INTERNAL:

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Top plugins for WebStorm
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