|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for adapting between the WebSphere CMP 2.0 support layer and a J2EE Connector interface (a.k.a. J2C) Resource Adapter (RA). This includes converting the input parameters of a CMP 2.0 entity CRUD method to the input parameters needed by the corresponding RA function(s), and likewise converting the output and error indications from the RA function(s) to the Java return value and exceptions required by PM and CMP 2.0. The purpose of implementing this interface is to allow an RA (existing or new)to be used as an alternative "back-end" which can persist the data for CMP 2.0 entity beans. The existance of an implementation of this interface is not alone suffficient to enable an RA to be used as such a back-end. Certain of the classes generated by the WebSphere CMP 2.0 Deploy Tool are specific to the back-end; a new back-end must provide a way for these classes to be generated (or othewise produced) in a way compatible with it's requirement.One such generated class, which extends BeanAdaptorBinding, has a method which returns an instance of your RA's implementation of this interface; that is how your EJBToRAAdapter implementation, and thus your RA, is plugged into the WebSphere CMP 2.0 support layer (you must still register your RA as you would any RA). See documentation on the Deploy Tool and the WebSphere CMP 2.0 support for details on this aspect of plugging a 3rd party Resource Adapter into WebSphere's CMP 2.0 support. In addition to its stated purpose above, an implmementation of this interface may also perform any pre-and post-execute processing it desires, provided this processing does not break the interface defined herein.
Field Summary | |
---|---|
static int |
LOCKTYPE_NOTAPPLICABLE
|
static int |
LOCKTYPE_SELECT
|
static int |
LOCKTYPE_SELECT_FOR_UPDATE
|
static int |
LOCKTYPE_SELECT_FOR_UPDATE_WITH_RR
|
static int |
LOCKTYPE_SELECT_FOR_UPDATE_WITH_RS
|
Method Summary | |
---|---|
boolean |
checkBackendId(javax.resource.cci.ConnectionFactory connectionFactory,
java.lang.String backendId)
Return if currentBackendId is valid for the datasource connection factory connected to . |
javax.resource.cci.Interaction |
createInteraction(javax.resource.cci.Connection conn)
Using the given Connection object, call its "createInteraction()" method; the Interaction returned from that call is also returned by this method. |
javax.resource.cci.Record |
executeCreate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
Using the given Interaction object, call its "execute(InteractionSpec ispec, Record inrec)" method with the given InteractionSpec and input Record; the Record returned from that call is also returned by this method. |
javax.resource.cci.Record |
executeCreate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord)
This is the batch create |
javax.resource.cci.Record |
executeFinder(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
Using the given Interaction object, call its "execute(InteractionSpec ispec, Record inrec)" method with the given InteractionSpec and input Record; the Record returned from that call is also returned by this method (see next paragraph for specifics on the Record returned). |
javax.resource.cci.Record |
executeOther(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputRecord)
Using the given Interaction object, call its "execute(InteractionSpec ispec, Record inrec)" method with the given InteractionSpec and input Record; the Record returned from that call may also be returned by this method, or a new Record may be constructed by this method to further post-process the returned data. |
javax.resource.cci.Record |
executeOther(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputRecord)
this is the batch executeOther |
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)
This is the batch remove |
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)
Using the given Interaction object, call its "execute(InteractionSpec ispec, Record inrec)" method with the given InteractionSpec and input Record; the Record returned from that call is also returned by this method. |
javax.resource.cci.Record |
executeUpdate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord[] inputrec,
javax.resource.cci.IndexedRecord[] predicates,
boolean[][] dirtyBits,
java.lang.String cursorName)
this is the batch update |
javax.resource.cci.Record |
executeUpdate(javax.resource.cci.Interaction interaction,
javax.resource.cci.InteractionSpec ispec,
javax.resource.cci.IndexedRecord inputrec,
javax.resource.cci.IndexedRecord predicates,
boolean[] dirtyBits,
java.lang.String cursorName)
Using the given Interaction object, call its "execute(InteractionSpec ispec, Record inrec)" method with the given InteractionSpec and input Record; the Record returned from that call is also returned by this method. |
javax.resource.cci.Connection |
getConnection(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
Using the given ConnectionFactory object, call its "getConnection(javax.resource.cci.ConnectionFactory factory, javax.resource.cci.ConnectionSpec connSpec)" method, creating the ConnectionSpec subclass (if any) designed to work for the given ConnectionFactory subclass. |
int |
getLockType(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
Return the Lock Type basing on the current backend information and AccessIntent This method returns a value indicating what sort of locking behavior is needed when executing the requested method. |
java.lang.Object |
getNativeConnection(javax.resource.cci.Connection conn)
Return the native connection corresponding to the given cci.Connection, or null if there is no "native" connection. |
javax.resource.cci.RecordFactory |
getRecordFactory(javax.resource.cci.ConnectionFactory connectionFactory)
Return the RecordFactory for the given ConnectionFactory. |
boolean |
isBatchSupported(javax.resource.cci.ConnectionFactory connectionFactory,
com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
Return if batch is supported basing on the current backend information and AccessIntent |
Field Detail |
public static final int LOCKTYPE_NOTAPPLICABLE
public static final int LOCKTYPE_SELECT
public static final int LOCKTYPE_SELECT_FOR_UPDATE
public static final int LOCKTYPE_SELECT_FOR_UPDATE_WITH_RS
public static final int LOCKTYPE_SELECT_FOR_UPDATE_WITH_RR
Method Detail |
public javax.resource.cci.Interaction createInteraction(javax.resource.cci.Connection conn) throws javax.resource.ResourceException
conn
- javax.resource.cci.Connection see J2EE Connector spec, CCI
javax.resource.ResourceException
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
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 parameter may be null,
which indicates there are no input parameters for this function.
javax.ejb.CreateException
javax.resource.ResourceException
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
javax.ejb.CreateException
javax.resource.ResourceException
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
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 parameter may be null,
which indicates there are no input parameters for this function.
javax.resource.ResourceException
- The exception description.
javax.ejb.FinderException
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
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, CCI.This parameter may be null,
which indicates there are no input parameters for this function.
javax.resource.ResourceException
- The exception description.
javax.ejb.RemoveException
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
javax.ejb.RemoveException
javax.resource.ResourceException
public javax.resource.cci.Record executeUpdate(javax.resource.cci.Interaction interaction, javax.resource.cci.InteractionSpec ispec, javax.resource.cci.IndexedRecord inputrec, javax.resource.cci.IndexedRecord predicates, boolean[] dirtyBits, java.lang.String cursorName) throws javax.ejb.EJBException, javax.resource.ResourceException
interaction
- javax.resource.cci.Interaction the interaction this method should call "execute(...)" onispec
- javax.resource.cci.InteractionSpec see J2EE Connector spec, CCIinputrec
- javax.resource.cci.IndexedRecord input Record, see J2EE Connector spec, CCI.This parameter may be null,
which indicates there are no input parameters for this function. This is not normal but you should code to handle it
(for example., by ignoring the update request).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.
javax.resource.ResourceException
- The exception description.
javax.ejb.EJBException
public javax.resource.cci.Record executeUpdate(javax.resource.cci.Interaction interaction, javax.resource.cci.InteractionSpec ispec, javax.resource.cci.IndexedRecord[] inputrec, javax.resource.cci.IndexedRecord[] predicates, boolean[][] dirtyBits, java.lang.String cursorName) throws javax.ejb.EJBException, javax.resource.ResourceException
javax.ejb.EJBException
javax.resource.ResourceException
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
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 parameter may be null,
which indicates there are no input parameters for this function.
javax.resource.ResourceException
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
javax.resource.ResourceException
public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionFactory connectionFactory, com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent) throws javax.resource.ResourceException
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.
javax.resource.ResourceException
public java.lang.Object getNativeConnection(javax.resource.cci.Connection conn)
public javax.resource.cci.RecordFactory getRecordFactory(javax.resource.cci.ConnectionFactory connectionFactory) throws javax.resource.ResourceException
javax.resource.ResourceException
public int getLockType(javax.resource.cci.ConnectionFactory connectionFactory, com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
public boolean isBatchSupported(javax.resource.cci.ConnectionFactory connectionFactory, com.ibm.websphere.appprofile.accessintent.AccessIntent accessIntent)
public boolean checkBackendId(javax.resource.cci.ConnectionFactory connectionFactory, java.lang.String backendId) throws javax.resource.ResourceException
javax.resource.ResourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |