IBM Support

functionSelectorClass is incorrect in the generated MDB.java in Rational Application Developer for the version 12 IMS TM resource adapters

Troubleshooting


Problem

If you use IMS TM resource adapter in J2C Bean wizard to generate code for the inbound Adapter flow, the functionSelectorClass in the generated MDB.java is not correct. This will cause runtime error during execution.

Symptom

In the generated MDB.java, the functionSelectorClass is incorrect.

@InboundAdapter(activationSpec = @ActivationSpecification(activationSpecClass = com.ibm.connector2.ims.ico.inbound.IMSActivationSpec.class, jndiName = "jndiName", authenticationAlias = "alias"), functionSelectorClass = com.ibm.j2ca.extension.emd.runtime.RootNameFunctionSelector.class)

Cause

There is an issue with the order of the classes being returned from the classpath.

Diagnosing The Problem

The correct functionSelectorClass in the generated MDB.java should be
com.ibm.connector2.ims.ico.inbound.IMSFunctionSelector for all IMS TM resource adapters.

The getInvocationTargetMethodName method in the MDBHelper.java references the

incorrect selector class.

public static String getInvocationTargetMethodName(Object[] inputs)


throws javax.resource.ResourceException {
String methodName = null;
try {
commonj.connector.runtime.FunctionSelector selector = new com.ibm.j2ca.extension.emd.runtime.RootNameFunctionSelector();

Resolving The Problem

The workaround is to manually change the functionSelectorClass in the generated MDB.java


@InboundAdapter(activationSpec = @ActivationSpecification(activationSpecClass = com.ibm.connector2.ims.ico.inbound.IMSActivationSpec.class, jndiName = "jndiName", authenticationAlias = "alias"), functionSelectorClass = com.ibm.connector2.ims.ico.inbound.IMSFunctionSelector.class )

Rebuild the whole project.

The getInvocationTargetMethodName method in MDBHelper.java will be fixed.

public static String getInvocationTargetMethodName(Object[] inputs)


throws javax.resource.ResourceException {
String methodName = null;
try {
commonj.connector.runtime.FunctionSelector selector = new com.ibm.connector2.ims.ico.inbound.IMSFunctionSelector();

The fix for this issue has been included in the fix of another APAR PM86388


https://www-01.ibm.com/support/entdocview.wss?uid=swg1PM86388

Related Information

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Connector Development","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.4.1;8.0.4.2;8.5;8.5.1","Edition":"Advanced","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21634827