You can expose the properties of InteractionSpec and ConnectionSpec for input as data so that your Java™ application can set or get the property values. For example, you may want to expose the execution timeout property of ECIInteractionSpec to provide a timeout value based on user input.
Example
Here's the getCustomer() method of the TADERC99 tutorial modified to take in an integer, execTimeout, as another argument and set it on the interactionSpec property. The changes to be made are marked in bold. The changed generated code is in italics:
/** * @j2c.interactionSpec class="com.ibm.connector2.cics.ECIInteractionSpec" * @j2c.interactionSpec-property name="functionName" value="TADERC99" * @j2c.interactionSpec-property * name="executeTimeout" * argumentBinding="execTimeout" * * @generated */ public sample.cics.data.CustomerInfo getCustomer( sample.cics.data.CustomerInfo arg, int execTimeout) throws javax.resource.ResourceException { ConnectionSpec cs = getConnectionSpec(); InteractionSpec is = interactionSpec; if (is == null) { is = new com.ibm.connector2.cics.ECIInteractionSpec(); ((com.ibm.connector2.cics.ECIInteractionSpec) is).setFunctionName("TADERC99"); ((com.ibm.connector2.cics.ECIInteractionSpec) is).setExecuteTimeout(execTimeout); } sample.cics.data.CustomerInfo output = new sample.cics.data.CustomerInfo(); invoke(cs, is, arg, output); return output; }
To make a ConnectionSpec property exposed for input, use the @j2c.connectionSpec-property doclet tag instead.