Example
Here is the getCustomer() method of the tader99 tutorial modified to take in an integer, execTimeout, as another argument and set it on the interactionSpec property. The changes that have been 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.