Tabnine Logo
EISLogin
Code IndexAdd Tabnine to your IDE (free)

How to use
EISLogin
in
org.eclipse.persistence.eis

Best Java code snippets using org.eclipse.persistence.eis.EISLogin (Showing top 20 results out of 315)

origin: com.haulmont.thirdparty/eclipselink

/**
 * Connect to the EIS adapter and return the Connection.
 */
public Object connectToDatasource(Accessor accessor, Session session) {
  return getConnectionSpec().connectToDataSource((EISAccessor)accessor, getProperties());
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Return the connector.
 * The connector defines how the connection is created.
 */
public EISConnectionSpec getConnectionSpec() {
  return (EISConnectionSpec)getConnector();
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Set the password.
 */
public void setPassword(String password) {
  // Avoid encryption
  // Bug 4117441 - Secure programming practices, store password in char[]        
  if (password != null) {
    setProperty("password", password.toCharArray());
  } else {
    // is null so remove the property
    // respect explicit de-referencing of password
    removeProperty("password");
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Wrapped by the getLogin() call, therefore, config can't be null at this
 * point.
 */
protected Login buildEISLoginConfig(EISLoginConfig eisLoginConfig) {
  EISLogin eisLogin = new EISLogin();
  // Connection Spec
  String specClassName = eisLoginConfig.getConnectionSpecClass();
  if (specClassName != null) {
    try {
      Class specClass = m_classLoader.loadClass(specClassName);
      EISConnectionSpec spec = null;
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
        spec = (EISConnectionSpec)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(specClass));
      }else{
        spec = (EISConnectionSpec)PrivilegedAccessHelper.newInstanceFromClass(specClass);
      }
      eisLogin.setConnectionSpec(spec);
    } catch (Exception exception) {
      throw SessionLoaderException.failedToLoadTag("connection-spec-class", specClassName, exception);
    }
  }
  // Connection Factory URL, setConnectionFactoryURL checks for null
  eisLogin.setConnectionFactoryURL(eisLoginConfig.getConnectionFactoryURL());
  // Process the common elements in LoginConfig
  processLoginConfig(eisLoginConfig, eisLogin);
  // Finally, return the newly created EISLogin
  return eisLogin;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Configure the login to connect through a JDNI managed connection factory and the default getConnection().
 */
public void configureConnectionSpec(String jndiName) {
  setConnectionSpec(new EISConnectionSpec(jndiName));
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

method.addLine("login.setConnectionSpec(new " + eisLogin.getConnectionSpec().getClass().getName() + "());");
if (eisLogin.getConnectionFactoryURL() != null) {
  method.addLine("login.setConnectionFactoryURL(\"" + eisLogin.getConnectionFactoryURL() + "\");");
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Set the JNDI URL for the managed connection factory for the JCA adapter connecting to.
 */
public void setConnectionFactoryURL(String url) {
  if ((url == null) || (url.length() == 0)) {
    return;
  }
  getConnectionSpec().setName(url);
}
origin: com.haulmont.thirdparty/eclipselink

if (login.getDatasourcePlatform() instanceof EISPlatform) {
  isEIS = true;
  EISLogin newLogin = new EISLogin();
  newLogin.setDatasourcePlatform(login.getDatasourcePlatform());
  this.session.setDatasourceLogin(newLogin);
  if (this.session.isServerSession()) {
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Set the EclipseLink connection spec.
 * The connection spec defines how to connect to the EIS adapter.
 */
public void setConnectionSpec(EISConnectionSpec connectionSpec) {
  setConnector(connectionSpec);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Wrapped by the getLogin() call, therefore, config can't be null at this
 * point.
 */
protected Login buildEISLoginConfig(EISLoginConfig eisLoginConfig) {
  EISLogin eisLogin = new EISLogin();
  // Connection Spec
  String specClassName = eisLoginConfig.getConnectionSpecClass();
  if (specClassName != null) {
    try {
      Class specClass = m_classLoader.loadClass(specClassName);
      EISConnectionSpec spec = null;
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
        spec = (EISConnectionSpec)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(specClass));
      }else{
        spec = (EISConnectionSpec)PrivilegedAccessHelper.newInstanceFromClass(specClass);
      }
      eisLogin.setConnectionSpec(spec);
    } catch (Exception exception) {
      throw SessionLoaderException.failedToLoadTag("connection-spec-class", specClassName, exception);
    }
  }
  // Connection Factory URL, setConnectionFactoryURL checks for null
  eisLogin.setConnectionFactoryURL(eisLoginConfig.getConnectionFactoryURL());
  // Process the common elements in LoginConfig
  processLoginConfig(eisLoginConfig, eisLogin);
  // Finally, return the newly created EISLogin
  return eisLogin;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * Configure the login to connect through a JDNI managed connection factory and the default getConnection().
 */
public void configureConnectionSpec(String jndiName) {
  setConnectionSpec(new EISConnectionSpec(jndiName));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

method.addLine("login.setConnectionSpec(new " + eisLogin.getConnectionSpec().getClass().getName() + "());");
if (eisLogin.getConnectionFactoryURL() != null) {
  method.addLine("login.setConnectionFactoryURL(\"" + eisLogin.getConnectionFactoryURL() + "\");");
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Set the JNDI URL for the managed connection factory for the JCA adapter connecting to.
 */
public void setConnectionFactoryURL(String url) {
  if ((url == null) || (url.length() == 0)) {
    return;
  }
  getConnectionSpec().setName(url);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * Set the EclipseLink connection spec.
 * The connection spec defines how to connect to the EIS adapter.
 */
public void setConnectionSpec(EISConnectionSpec connectionSpec) {
  setConnector(connectionSpec);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Wrapped by the getLogin() call, therefore, config can't be null at this
 * point.
 */
protected Login buildEISLoginConfig(EISLoginConfig eisLoginConfig) {
  EISLogin eisLogin = new EISLogin();
  // Connection Spec
  String specClassName = eisLoginConfig.getConnectionSpecClass();
  if (specClassName != null) {
    try {
      Class specClass = m_classLoader.loadClass(specClassName);
      EISConnectionSpec spec = null;
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
        spec = (EISConnectionSpec)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(specClass));
      }else{
        spec = (EISConnectionSpec)PrivilegedAccessHelper.newInstanceFromClass(specClass);
      }
      eisLogin.setConnectionSpec(spec);
    } catch (Exception exception) {
      throw SessionLoaderException.failedToLoadTag("connection-spec-class", specClassName, exception);
    }
  }
  // Connection Factory URL, setConnectionFactoryURL checks for null
  eisLogin.setConnectionFactoryURL(eisLoginConfig.getConnectionFactoryURL());
  // Process the common elements in LoginConfig
  processLoginConfig(eisLoginConfig, eisLogin);
  // Finally, return the newly created EISLogin
  return eisLogin;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Configure the login to connect through a JDNI managed connection factory and the default getConnection().
 */
public void configureConnectionSpec(String jndiName) {
  setConnectionSpec(new EISConnectionSpec(jndiName));
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Connect to the EIS adapter and return the Connection.
 */
public Object connectToDatasource(Accessor accessor, Session session) {
  return getConnectionSpec().connectToDataSource((EISAccessor)accessor, getProperties());
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * Set the password.
 */
public void setPassword(String password) {
  // Avoid encryption
  // Bug 4117441 - Secure programming practices, store password in char[]        
  if (password != null) {
    setProperty("password", password.toCharArray());
  } else {
    // is null so remove the property
    // respect explicit de-referencing of password
    removeProperty("password");
  }
}
origin: com.haulmont.thirdparty/eclipselink

method.addLine("login.setConnectionSpec(new " + eisLogin.getConnectionSpec().getClass().getName() + "());");
if (eisLogin.getConnectionFactoryURL() != null) {
  method.addLine("login.setConnectionFactoryURL(\"" + eisLogin.getConnectionFactoryURL() + "\");");
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * Set the JNDI URL for the managed connection factory for the JCA adapter connecting to.
 */
public void setConnectionFactoryURL(String url) {
  if ((url == null) || (url.length() == 0)) {
    return;
  }
  getConnectionSpec().setName(url);
}
org.eclipse.persistence.eisEISLogin

Javadoc

An EISLogin defines connection information and datasource properties. There are three ways to connect to an EIS datasource through EclipseLink EIS:

  • Provide a JNDI name to the ConnectionFactory and use the default getConnection
  • Provide a JNDI name to the ConnectionFactory and a driver specific ConnectionSpec to pass to the getConnection
  • Connect in a non-managed way directly to the driver specific ConnectionFactory

A EISConnectionSpec must be provided to define how to connect to the EIS adapter.

The EIS platform can be used to provide datasource/driver specific behavior such as InteractionSpec and Record conversion.

Most used methods

  • <init>
    Constructor.
  • getConnectionFactoryURL
    PUBLIC: Return the JNDI URL for the managed connection factory for the JCA adapter connecting to.
  • getConnectionSpec
    Return the connector. The connector defines how the connection is created.
  • getConnector
  • getProperties
  • removeProperty
  • setConnectionFactoryURL
    PUBLIC: Set the JNDI URL for the managed connection factory for the JCA adapter connecting to.
  • setConnectionSpec
    PUBLIC: Set the EclipseLink connection spec. The connection spec defines how to connect to the EIS a
  • setConnector
  • setProperty
  • setDatasourcePlatform
  • setDatasourcePlatform

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Runner (org.openjdk.jmh.runner)
  • CodeWhisperer alternatives
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