Top Description Methods
org.eclipse.persistence.sessions

public Interface Login

extends CoreLogin<Platform>
Known Direct Implementers
org.eclipse.persistence.sessions.DatasourceLogin
Imports
java.util.Properties, org.eclipse.persistence.core.sessions.CoreLogin, org.eclipse.persistence.exceptions.DatabaseException, org.eclipse.persistence.internal.databaseaccess.Accessor, .Platform, org.eclipse.persistence.platform.database.DatabasePlatform

Purpose: Define the information required to connect to an EclipseLink session.

Description: This interface represents a generic concept of a login to be used when connecting to a data-store. It is independent of JDBC so that the EclipseLink session interface can be used for JCA, XML, non-relational or three-tiered frameworks.

See Also
DatabaseLogin

Method Summary

Modifier and TypeMethod and Description
public Accessor
buildAccessor()

INTERNAL: Build the correct datasource Accessor for this login instance.

public Login
clone()

INTERNAL: Clone the login.

public Object
connectToDatasource(Accessor accessor, Session session)

INTERNAL: Connect to the datasource, and return the driver level connection object.

public Platform
getDatasourcePlatform()

Redeclares org.eclipse.persistence.core.sessions.CoreLogin.getDatasourcePlatform.

PUBLIC: Return the datasource platform specific information.
public String
getPassword()

PUBLIC: All logins must take a user name and password.

public DatabasePlatform
getPlatform()

INTERNAL: Return the database platform specific information.

public Object
getProperty(String name)

PUBLIC: The properties are additional, driver-specific, connection information to be passed to the driver.

public String
getTableQualifier()

PUBLIC: Return the qualifier for the all of the tables.

public String
getUserName()

PUBLIC: All logins must take a user name and password.

public boolean
isConnectionHealthValidatedOnError()

PUBLIC: This value defaults to false when not on a DatabaseLogin as the functionality has not been implemented for other datasource type.

public void
setDatasourcePlatform(Platform platform)

PUBLIC: Set the database platform specific information.

public void
setPassword(String password)

PUBLIC: All logins must take a user name and password.

public void
setPlatform(Platform platform)

INTERNAL: Set the database platform specific information.

public void
setProperties(Properties properties)

PUBLIC: The properties are additional, driver-specific, connection information to be passed to the JDBC driver.

public void
setProperty(String propertyName, Object propertyValue)

PUBLIC: Some JDBC drivers require additional, driver-specific, properties.

public void
setUserName(String userName)

PUBLIC: All logins must take a user name and password.

public boolean
shouldAllowConcurrentReadWrite()

INTERNAL: Used for cache isolation.

public boolean
shouldSynchronizedReadOnWrite()

INTERNAL: Used for cache isolation.

public boolean
shouldSynchronizeObjectLevelReadWrite()

INTERNAL: Used for Cache Isolation.

public boolean
shouldSynchronizeObjectLevelReadWriteDatabase()

INTERNAL: Used for Cache Isolation.

public boolean
shouldSynchronizeWrites()

INTERNAL: Used for Cache Isolation.

public boolean
shouldUseExternalConnectionPooling()

PUBLIC: Return whether EclipseLink uses some externally managed connection pooling.

public boolean
shouldUseExternalTransactionController()

PUBLIC: Return whether EclipseLink uses some externally managed transaction service such as JTS.

Method Detail

buildAccessorback to summary
public Accessor buildAccessor()

INTERNAL: Build the correct datasource Accessor for this login instance.

cloneback to summary
public Login clone()

INTERNAL: Clone the login.

connectToDatasourceback to summary
public Object connectToDatasource(Accessor accessor, Session session) throws DatabaseException

INTERNAL: Connect to the datasource, and return the driver level connection object.

getDatasourcePlatformback to summary
public Platform getDatasourcePlatform()

Redeclares org.eclipse.persistence.core.sessions.CoreLogin.getDatasourcePlatform.

PUBLIC: Return the datasource platform specific information. This allows EclipseLink to configure certain advanced features for the datasource desired. The platform also allows configuration of sequence information.

Annotations
@Override
getPasswordback to summary
public String getPassword()

PUBLIC: All logins must take a user name and password.

getPlatformback to summary
public DatabasePlatform getPlatform()

INTERNAL: Return the database platform specific information. This allows EclipseLink to configure certain advanced features for the database desired. The platform also allows configuration of sequence information.

Note

this must only be used for relational specific usage and will not work for non-relational datasources.

getPropertyback to summary
public Object getProperty(String name)

PUBLIC: The properties are additional, driver-specific, connection information to be passed to the driver.

Note

Do not set the password directly by getting the properties and setting the "password" property directly. Use the method DatabaseLogin.setPassword(String).

getTableQualifierback to summary
public String getTableQualifier()

PUBLIC: Return the qualifier for the all of the tables.

getUserNameback to summary
public String getUserName()

PUBLIC: All logins must take a user name and password.

isConnectionHealthValidatedOnErrorback to summary
public boolean isConnectionHealthValidatedOnError()

PUBLIC: This value defaults to false when not on a DatabaseLogin as the functionality has not been implemented for other datasource type. On an SQL Exception EclipseLink will ping the database to determine if the connection used can continue to be used for queries. This should have no impact on applications unless the user is using pessimistic locking queries with 'no wait' or are using a query timeout feature. If that is the case and the application is experiencing a performance impact from the health check then this feature can be turned off. Turning this feature off will prevent EclipseLink from being able to retry queries in the case of database failure.

setDatasourcePlatformback to summary
public void setDatasourcePlatform(Platform platform)

PUBLIC: Set the database platform specific information. This allows EclipseLink to configure certain advanced features for the database desired. The platform also allows configuration of sequence information.

setPasswordback to summary
public void setPassword(String password)

PUBLIC: All logins must take a user name and password.

setPlatformback to summary
public void setPlatform(Platform platform)

INTERNAL: Set the database platform specific information. This allows EclipseLink to configure certain advanced features for the database desired. The platform also allows configuration of sequence information.

setPropertiesback to summary
public void setProperties(Properties properties)

PUBLIC: The properties are additional, driver-specific, connection information to be passed to the JDBC driver.

setPropertyback to summary
public void setProperty(String propertyName, Object propertyValue)

PUBLIC: Some JDBC drivers require additional, driver-specific, properties. Add the specified property to those to be passed to the JDBC driver.

setUserNameback to summary
public void setUserName(String userName)

PUBLIC: All logins must take a user name and password.

shouldAllowConcurrentReadWriteback to summary
public boolean shouldAllowConcurrentReadWrite()

INTERNAL: Used for cache isolation.

shouldSynchronizedReadOnWriteback to summary
public boolean shouldSynchronizedReadOnWrite()

INTERNAL: Used for cache isolation.

shouldSynchronizeObjectLevelReadWriteback to summary
public boolean shouldSynchronizeObjectLevelReadWrite()

INTERNAL: Used for Cache Isolation. Causes EclipseLink to lock at the object level on cache updates and cache access.

shouldSynchronizeObjectLevelReadWriteDatabaseback to summary
public boolean shouldSynchronizeObjectLevelReadWriteDatabase()

INTERNAL: Used for Cache Isolation. Causes EclipseLink to lock at the object level on cache updates and cache access, based on database transaction.

shouldSynchronizeWritesback to summary
public boolean shouldSynchronizeWrites()

INTERNAL: Used for Cache Isolation. Causes EclipseLink to lock at the class level on cache updates.

shouldUseExternalConnectionPoolingback to summary
public boolean shouldUseExternalConnectionPooling()

PUBLIC: Return whether EclipseLink uses some externally managed connection pooling.

shouldUseExternalTransactionControllerback to summary
public boolean shouldUseExternalTransactionController()

PUBLIC: Return whether EclipseLink uses some externally managed transaction service such as JTS.