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
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21634827