Package org.eclipse.persistence.eis
Class EISAccessor
- java.lang.Object
-
- org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
-
- org.eclipse.persistence.eis.EISAccessor
-
- All Implemented Interfaces:
java.lang.Cloneable,org.eclipse.persistence.internal.databaseaccess.Accessor
public class EISAccessor extends org.eclipse.persistence.internal.databaseaccess.DatasourceAccessorEISAccessoris an implementation of theAccessorinterface. It is responsible for:- Connecting via connection factory
- Local transactions
- Interaction execution
- Record translation
- See Also:
EISInteraction,EISLogin- Author:
- James
- Since:
- OracleAS TopLink 10g (10.0.3)
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.resource.cci.ConnectioncciConnectionprotected javax.resource.cci.RecordFactoryrecordFactory-
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 EISAccessor()Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbasicBeginTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session)Begin a local transaction.protected voidbasicCommitTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session)Commit the local transaction.java.lang.ObjectbasicExecuteCall(Call call, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractSession session)Execute the interaction.voidbasicRollbackTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session)Rollback the local transaction on the datasource.protected voidbuildConnectLog(org.eclipse.persistence.internal.sessions.AbstractSession session)If logging is turned on and the CCI implementation supports meta data then display connection info.protected voidcloseDatasourceConnection()Close the connection.java.lang.ObjectexecuteCall(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.javax.resource.cci.ConnectiongetCCIConnection()Return the CCI connection to the EIS resource adapter.EISPlatformgetEISPlatform()Return and cast the platform.javax.resource.cci.RecordFactorygetRecordFactory()Return the RecordFactory.protected booleanisDatasourceConnected()Return if the connection to the "data source" is connected.voidsetRecordFactory(javax.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
-
-
-
-
Method Detail
-
basicBeginTransaction
protected void basicBeginTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EISExceptionBegin a local transaction.- Specified by:
basicBeginTransactionin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor- Throws:
EISException
-
closeDatasourceConnection
protected void closeDatasourceConnection()
Close the connection.- Specified by:
closeDatasourceConnectionin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
-
basicCommitTransaction
protected void basicCommitTransaction(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EISExceptionCommit the local transaction.- Specified by:
basicCommitTransactionin classorg.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:
buildConnectLogin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
-
executeCall
public java.lang.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:
executeCallin interfaceorg.eclipse.persistence.internal.databaseaccess.Accessor- Overrides:
executeCallin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor- Throws:
DatabaseException
-
basicExecuteCall
public java.lang.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:
basicExecuteCallin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor- Returns:
- depending of the type either the row count, row or vector of rows.
- Throws:
DatabaseException
-
getCCIConnection
public javax.resource.cci.Connection getCCIConnection()
Return the CCI connection to the EIS resource adapter.
-
getEISPlatform
public EISPlatform getEISPlatform()
Return and cast the platform.
-
getRecordFactory
public javax.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(javax.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 DatabaseExceptionRollback the local transaction on the datasource.- Specified by:
basicRollbackTransactionin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor- Throws:
DatabaseException
-
isDatasourceConnected
protected boolean isDatasourceConnected()
Return if the connection to the "data source" is connected.- Specified by:
isDatasourceConnectedin classorg.eclipse.persistence.internal.databaseaccess.DatasourceAccessor
-
-