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

Technote (troubleshooting)


Problem(Abstract)

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-304.ibm.com/support/entdocview.wss?uid=swg1PM86388

Related information

PM86388

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Application Developer for WebSphere Software
Java Connector Development

Software 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

Operating system(s):

Linux, Windows

Software edition:

Advanced

Reference #:

1634827

Modified date:

2013-04-22

Translate my page

Machine Translation

Content navigation