3.1.4 Implementing the JcaDataInterface

Most of the methods of the JcaDataInterface have two versions:

  • One version that is "spec aware" and which takes an (activation or interaction) "spec" argument that indicates the activation or interaction spec to which a property or attribute belongs.

  • Another version is "non-spec aware" and does not have a spec argument. All the examples in this document use the "non-spec aware" APIs.

The "non-spec" versions of these methods are for adapter wizards that only support a single spec at a time. For example, a FileAdapter instance can either Read a file or Write to a file. A single instance cannot do both.

The "spec aware" methods must be used by adapter wizards that support multiple specs. For example, the MQ adapter supports a read operation that also has an asynchronous callback.

In this case, the MQ adapter wizard generates an activation spec and an interaction spec. Therefore, the MQ adapter wizard must use the "spec aware" methods to make it clear which spec a property or attribute belongs to.

The spec argument contains only the spec String.

The "non-spec" API also supports older adapters where the properties can be set before you add the activation or interaction spec.