Skip Headers

# Configuring Custom EIS Interactions for Basic Persistence Operations

Previous

Next

You can use TopLink to define an interaction for each basic persistence operation (insert, update, delete, read object, read all, or does exist) so that when you query and modify your EIS-mapped objects, the TopLink runtime will use the appropriate EIS interaction instead of the default EIS interaction.

You can configure custom EIS interactions for basic persistence operations only for EIS descriptors designated as root descriptors ("Configuring an EIS Descriptor as a Root or Composite Type").

For CMP projects, the `ejb-jar.xml` file stores query lists. You can define the queries in the file and then read them into TopLink Workbench, or define them on the Queries tab and write them to the file. For more information, see "Writing to the ejb-jar.xml File" and "Reading From the ejb-jar.xml File".

Using TopLink Workbench, you can create `XMLInteraction` objects, in which there is a single query per interaction (see "Using TopLink Workbench").

Using Java, you can create any `EISInteraction` type. For some EIS projects, it is common for multiple interactions to be used in a single query. For example, one interaction–to enqueue a request, and another–to dequeue the response. Because TopLink Workbench does not support setting multiple interactions on a single query, you must use an amendment method to create and configure the interaction in Java (see "Using Java").

Note: In a one-to-one or one-to-many EIS mapping, you must also specify a selection interaction that TopLink uses to acquire target objects. You can use either the target object's read interaction (the default) or specify a separate selection interaction, if necessary. For more information, see "Configuring Selection Interaction").