com.ibm.wsspi.ejbpersistence
Class WSEJBToRAAdapter
java.lang.Object
com.ibm.wsspi.ejbpersistence.WSEJBToRAAdapter
- All Implemented Interfaces:
- com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- public abstract class WSEJBToRAAdapter
- extends java.lang.Object
- implements com.ibm.websphere.ejbpersistence.EJBToRAAdapter
This is the default implementation for the EJBToRAAdapter interface. Third party RA suppliers
must implement EJBToRAAdapter interface or extend this class.
- Since:
- WAS 5.0
- Version:
- 1.31
- See Also:
EJBToRAAdapter
Fields inherited from interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter |
LOCKTYPE_NOTAPPLICABLE, LOCKTYPE_SELECT, LOCKTYPE_SELECT_FOR_UPDATE, LOCKTYPE_SELECT_FOR_UPDATE_WITH_RR, LOCKTYPE_SELECT_FOR_UPDATE_WITH_RS |
Method Summary |
boolean |
checkBackendId(javax.resource.cci.ConnectionFactory connectionFactory,
java.lang.String backendId)
|
javax.resource.cci.Interaction |
createInteraction(javax.resource.cci.Connection conn)
|
javax.resource.cci.Record |
executeCreate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
|
javax.resource.cci.Record |
executeCreate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord)
|
javax.resource.cci.Record |
executeFinder(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
|
javax.resource.cci.Record |
executeOther(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
|
javax.resource.cci.Record |
executeOther(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord)
|
javax.resource.cci.Record |
executeRemove(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord,
javax.resource.cci.IndexedRecord[] predicates)
|
javax.resource.cci.Record |
executeRemove(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord,
javax.resource.cci.IndexedRecord predicates)
|
javax.resource.cci.Record |
executeUpdate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord,
javax.resource.cci.IndexedRecord[] predicates,
boolean[][] dirtyBits,
java.lang.String cursorName)
|
javax.resource.cci.Record |
executeUpdate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord,
javax.resource.cci.IndexedRecord predicates,
boolean[] dirtyBits,
java.lang.String cursorName)
|
abstract javax.resource.cci.Connection |
getConnection(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
|
int |
getLockType(javax.resource.cci.ConnectionFactory connFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
|
java.lang.Object |
getNativeConnection(javax.resource.cci.Connection cciConnection)
|
javax.resource.cci.RecordFactory |
getRecordFactory(javax.resource.cci.ConnectionFactory connectionFactory)
|
protected com.ibm.ejs.ras.TraceComponent |
getTracer()
This method gets the trace component. |
boolean |
isBatchSupported(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WSEJBToRAAdapter
protected WSEJBToRAAdapter()
- default Constructor
checkBackendId
public boolean checkBackendId(javax.resource.cci.ConnectionFactory connectionFactory,
java.lang.String backendId)
throws javax.resource.ResourceException
- Specified by:
checkBackendId
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
connectionFactory
- the connection factorybackendId
- the bankend ID
- Returns:
- true if the connection factory matches the backend id; false otherwise.
- Throws:
javax.resource.ResourceException
- Since:
- WAS 6.0
- See Also:
EJBToRAAdapter.checkBackendId(javax.resource.cci.ConnectionFactory, String)
createInteraction
public javax.resource.cci.Interaction createInteraction(javax.resource.cci.Connection conn)
throws javax.resource.ResourceException
- Specified by:
createInteraction
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
conn
- javax.resource.cci.Connection see J2EE Connector spec, CCI
- Returns:
- javax.resource.cci.Interaction see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
- See Also:
Note: WSRelationalRAAdapter overrides this method to set the AccessIntent in
the Interaction [d193047.1]
executeCreate
public javax.resource.cci.Record executeCreate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
throws javax.ejb.CreateException,
javax.resource.ResourceException
- Specified by:
executeCreate
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction the interaction to call "execute(...)" onispec
- javax.resource.cci.InteractionSpec see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord see J2EE Connector spec, CCI
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.ejb.CreateException
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeCreate(Interaction, InteractionSpec, IndexedRecord)
executeFinder
public javax.resource.cci.Record executeFinder(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
throws javax.ejb.FinderException,
javax.resource.ResourceException
- Specified by:
executeFinder
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction the interaction to call "execute(...)" onispec
- javax.resource.cci.InteractionSpec see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord see J2EE Connector spec, CCI
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
- The exception description.
javax.ejb.FinderException
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeFinder(Interaction, InteractionSpec, IndexedRecord)
executeRemove
public javax.resource.cci.Record executeRemove(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord,
javax.resource.cci.IndexedRecord predicates)
throws javax.ejb.RemoveException,
javax.resource.ResourceException
- Specified by:
executeRemove
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction the interaction this method should call "execute(...)" onispec
- javax.resource.cci.InteractionSpec see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.Record input Record, see J2EE Connector spec, CCIpredicates
-
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
- The exception description.
javax.ejb.RemoveException
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeRemove(Interaction, InteractionSpec, IndexedRecord, IndexedRecord)
executeUpdate
public javax.resource.cci.Record executeUpdate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord,
javax.resource.cci.IndexedRecord predicates,
boolean[] dirtyBits,
java.lang.String cursorName)
throws javax.ejb.EJBException,
javax.resource.ResourceException
- Specified by:
executeUpdate
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction the interaction this method should call "execute(...)" onispec
- javax.resource.cci.InteractionSpec see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.Record input Record, see J2EE Connector spec, CCIpredicates
- dirtyBits
- cursorName
- java.lang.String an optional cursor name, obtained by PM runtime via a call to
java.sql.ResultSet.getCursorName(), using the ResultSet which contains the bean/row being updated.
This parameter is used to perform "positional update", a more efficient data updating mechanism supported
by certain Resource Managers (mostly, relational databases). If a Resource Adapter does not support
positioned update then this parameter can be ignored.
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
- The exception description.
javax.ejb.EJBException
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeUpdate(Interaction, InteractionSpec, IndexedRecord, IndexedRecord, boolean[], String)
executeOther
public javax.resource.cci.Record executeOther(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
throws javax.resource.ResourceException
- Specified by:
executeOther
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction the interaction this method should call "execute(...)" onispec
- javax.resource.cci.InteractionSpec see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord see J2EE Connector spec, CCI
This method is used for executing interactions other than the currently defeined ones (create, finder, etc).
This will immediately be used for updating the Many-Many Auxilary tables. The value returned from this execution
must be null
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeOther(Interaction, InteractionSpec, IndexedRecord)
getConnection
public abstract javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
throws javax.resource.ResourceException
- Specified by:
getConnection
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
connectionFactory
- javax.resource.cci.ConnectionFactory see J2EE Connector spec, CCIaccessIntent
- com.ibm.ws.ejbpersistence.AccessIntent data class to hold
access-intent-related info of potential use by any Resource Adapter. This method uses this
parameter to locate a possible cached connection suitable for use with this AccessIntent.
If there is no such cached connection, PM obtains one and caches it for future use.
- Returns:
- javax.resource.cci.Connection see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.getConnection(ConnectionFactory, AccessIntent)
getNativeConnection
public java.lang.Object getNativeConnection(javax.resource.cci.Connection cciConnection)
- Specified by:
getNativeConnection
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Returns:
- a NativeConnection or null
- See Also:
EJBToRAAdapter.getNativeConnection(javax.resource.cci.Connection)
getLockType
public int getLockType(javax.resource.cci.ConnectionFactory connFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
- Specified by:
getLockType
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
accessIntent
- com.ibm.ws.ejbpersistence.AccessIntent data class to hold
access-intent-related info of potential use by any Resource Adapter. This method uses this
parameter to locate a possible cached connection suitable for use with this AccessIntent.
If there is no such cached connection, PM obtains one and caches it for future use.
- Returns:
- the lock type - the EJBToRAAdapter.LOCKTYPE_SELECT locktype is returned in this method.
- See Also:
EJBToRAAdapter.getLockType(ConnectionFactory, AccessIntent)
getRecordFactory
public javax.resource.cci.RecordFactory getRecordFactory(javax.resource.cci.ConnectionFactory connectionFactory)
throws javax.resource.ResourceException
- Specified by:
getRecordFactory
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
connectionFactory
- javax.resource.cci.ConnectionFactory see J2EE Connector spec, CCI
- Returns:
- a RecordFactory
- Throws:
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.getRecordFactory(ConnectionFactory)
executeCreate
public javax.resource.cci.Record executeCreate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord)
throws javax.ejb.CreateException,
javax.resource.ResourceException
- Specified by:
executeCreate
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction: an array of the the interaction to call "execute(...)"ispec
- javax.resource.cci.InteractionSpec an array of the interactionSpecs, see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord an array of the indexedRecord, see J2EE Connector spec, CCI
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.ejb.CreateException
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeCreate(Interaction, InteractionSpec, IndexedRecord[])
executeRemove
public javax.resource.cci.Record executeRemove(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord,
javax.resource.cci.IndexedRecord[] predicates)
throws javax.ejb.RemoveException,
javax.resource.ResourceException
- Specified by:
executeRemove
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction: the interaction to call "execute(...)"ispec
- javax.resource.cci.InteractionSpec the interactionSpecs, see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord an array of the indexedRecord, see J2EE Connector spec, CCIpredicates
- javax.resource.cci.IndexedRecord[]: predicates an array of the indexedRecord, see J2EE Connector spec, CCI
- Returns:
- javax.resource.cci.Record see J2EE Connector spec, CCI
- Throws:
javax.resource.ResourceException
javax.ejb.RemoveException
- See Also:
EJBToRAAdapter.executeRemove(Interaction, InteractionSpec, IndexedRecord[], IndexedRecord[])
executeUpdate
public javax.resource.cci.Record executeUpdate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord,
javax.resource.cci.IndexedRecord[] predicates,
boolean[][] dirtyBits,
java.lang.String cursorName)
throws javax.ejb.EJBException,
javax.resource.ResourceException
- Specified by:
executeUpdate
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction: the interaction to call "execute(...)"ispec
- javax.resource.cci.InteractionSpec the interactionSpecs, see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord an array of the indexedRecord, see J2EE Connector spec, CCIpredicates
- javax.resource.cci.IndexedRecord[]: predicates an array of the indexedRecord, see J2EE Connector spec, CCIdirtyBits
- boolean[]: not used corrently, but will be used for partial updatedcursorName
-
- Returns:
- null all the time, since we know its not a finder
- Throws:
javax.ejb.EJBException
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeUpdate(Interaction, InteractionSpec, IndexedRecord[], IndexedRecord[], boolean[][], String)
executeOther
public javax.resource.cci.Record executeOther(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord)
throws javax.resource.ResourceException
- Specified by:
executeOther
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
interaction
- javax.resource.cci.Interaction: the interaction to call "execute(...)"ispec
- javax.resource.cci.InteractionSpec the interactionSpecs, see J2EE Connector spec, CCIinputRecord
- javax.resource.cci.IndexedRecord an array of the indexedRecord, see J2EE Connector spec, CCI
- Returns:
- javax.resource.cci.Record
- Throws:
javax.resource.ResourceException
- See Also:
EJBToRAAdapter.executeOther(Interaction, InteractionSpec, IndexedRecord[])
isBatchSupported
public boolean isBatchSupported(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
- Specified by:
isBatchSupported
in interface com.ibm.websphere.ejbpersistence.EJBToRAAdapter
- Parameters:
connectionFactory
- accessIntent
-
- Returns:
- boolean to indicate whether batch update is supported or not
- See Also:
EJBToRAAdapter.isBatchSupported(ConnectionFactory, AccessIntent)
getTracer
protected com.ibm.ejs.ras.TraceComponent getTracer()
This method gets the trace component. This method is used for get the trace component of the
subclasses. Some methods are inherited by the subclasses. When these inherited methods are called
via the subclass, we need to get the trace component of the subclass so the class names of the
subclasses is displayed in the trace.
- Returns:
- a trace component