Class EISAccessor

java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
org.eclipse.persistence.eis.EISAccessor
All Implemented Interfaces:
Cloneable, org.eclipse.persistence.internal.databaseaccess.Accessor

public class EISAccessor extends org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor

EISAccessor is an implementation of the Accessor interface. It is responsible for:

  • Connecting via connection factory
  • Local transactions
  • Interaction execution
  • Record translation
See Also:
Author:
James
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected jakarta.resource.cci.Connection
     
    protected jakarta.resource.cci.RecordFactory
     

    Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor

    callCount, currentSession, customizer, datasourceConnection, isConnected, isInTransaction, isValid, login, platform, pool, possibleFailure, READ_STATEMENTS_COUNT_PROPERTY, readStatementsCount, sequencingCallback, shouldCheckConnection, STOREDPROCEDURE_STATEMENTS_COUNT_PROPERTY, storedProcedureStatementsCount, usesExternalConnectionPooling, WRITE_STATEMENTS_COUNT_PROPERTY, writeStatementsCount
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    basicBeginTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Begin a local transaction.
    protected void
    basicCommitTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Commit the local transaction.
    basicExecuteCall(Call call, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
    Execute the interaction.
    void
    basicRollbackTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Rollback the local transaction on the datasource.
    protected void
    buildConnectLog(org.eclipse.persistence.internal.sessions.AbstractSession session)
    If logging is turned on and the CCI implementation supports meta data then display connection info.
    protected void
    Close the connection.
    executeCall(Call call, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
    Avoid super to have logging occur after possible manual auto-commit.
    jakarta.resource.cci.Connection
    Return the CCI connection to the EIS resource adapter.
    Return and cast the platform.
    jakarta.resource.cci.RecordFactory
    Return the RecordFactory.
    protected boolean
    Return if the connection to the "data source" is connected.
    void
    setRecordFactory(jakarta.resource.cci.RecordFactory recordFactory)
    Set the RecordFactory.

    Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor

    beginTransaction, clone, closeConnection, closeJTSConnection, commitTransaction, connect, connectInternal, createCustomizer, decrementCallCount, disconnect, flushSelectCalls, getCallCount, getColumnInfo, getConnection, getDatasourceConnection, getDatasourcePlatform, getLogin, getPool, getReadStatementsCount, getSequencingCallback, getStoredProcedureStatementsCount, getTableInfo, getWriteStatementsCount, incrementCallCount, isConnected, isInTransaction, isPossibleFailure, isValid, reconnect, reestablishConnection, reestablishCustomizer, releaseCustomizer, releaseCustomizer, reset, rollbackTransaction, setCallCount, setCustomizer, setDatasourceConnection, setDatasourcePlatform, setIsConnected, setIsInTransaction, setIsValid, setLogin, setPool, setPossibleFailure, usesExternalConnectionPooling, usesExternalTransactionController, writesCompleted

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cciConnection

      protected jakarta.resource.cci.Connection cciConnection
    • recordFactory

      protected jakarta.resource.cci.RecordFactory recordFactory
  • Constructor Details

    • EISAccessor

      public EISAccessor()
      Default Constructor.
  • Method Details

    • basicBeginTransaction

      protected void basicBeginTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EISException
      Begin a local transaction.
      Specified by:
      basicBeginTransaction in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
      Throws:
      EISException
    • closeDatasourceConnection

      protected void closeDatasourceConnection()
      Close the connection.
      Specified by:
      closeDatasourceConnection in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
    • basicCommitTransaction

      protected void basicCommitTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EISException
      Commit the local transaction.
      Specified by:
      basicCommitTransaction in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
      Throws:
      EISException
    • buildConnectLog

      protected void buildConnectLog(org.eclipse.persistence.internal.sessions.AbstractSession session)
      If logging is turned on and the CCI implementation supports meta data then display connection info.
      Specified by:
      buildConnectLog in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
    • executeCall

      public Object executeCall(Call call, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
      Avoid super to have logging occur after possible manual auto-commit.
      Specified by:
      executeCall in interface org.eclipse.persistence.internal.databaseaccess.Accessor
      Overrides:
      executeCall in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
      Returns:
      depending of the type either the row count, row or vector of rows.
      Throws:
      DatabaseException
    • basicExecuteCall

      public Object basicExecuteCall(Call call, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
      Execute the interaction. The execution can differ slightly depending on the type of interaction. The call may be parameterized where the arguments are in the translation row. The row will be empty if there are no parameters.
      Specified by:
      basicExecuteCall in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
      Returns:
      depending of the type either the row count, row or vector of rows.
      Throws:
      DatabaseException
    • getCCIConnection

      public jakarta.resource.cci.Connection getCCIConnection()
      Return the CCI connection to the EIS resource adapter.
    • getEISPlatform

      public EISPlatform getEISPlatform()
      Return and cast the platform.
    • getRecordFactory

      public jakarta.resource.cci.RecordFactory getRecordFactory()
      Return the RecordFactory. The record factory is acquired from the ConnectionManager, and used to create record to pass to interactions.
    • setRecordFactory

      public void setRecordFactory(jakarta.resource.cci.RecordFactory recordFactory)
      Set the RecordFactory. The record factory is acquired from the ConnectionManager, and used to create record to pass to interactions.
    • basicRollbackTransaction

      public void basicRollbackTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
      Rollback the local transaction on the datasource.
      Specified by:
      basicRollbackTransaction in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
      Throws:
      DatabaseException
    • isDatasourceConnected

      protected boolean isDatasourceConnected()
      Return if the connection to the "data source" is connected.
      Specified by:
      isDatasourceConnected in class org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor