The smart linker tool that ships with Rational® Software Development Platform is used in the process of building and packaging an application into a jar or jxe file. The smart linker can remove classes (and methods) that are deemed not to be required; this can cause the removal of classes that are needed but dynamically loaded. MQe makes use of dynamic loading so care should be taken to either avoid this feature or to explicitly name classes that must be present, even though not explicitly referenced in the code.
To prevent unused classes being removed use the -noRemoveUnused option.
Otherwise, if the -removeUnused option is set then any class that is dynamically loaded must be specifically included. One option that can be used to achieve this is -includeWholeClass.
-includeWholeClass "com.ibm.mqe.adapters.*"will include all classes in the adapters package, and
-includeWholeClass "com.ibm.mqe.adapters.MQeTcpipHttpAdapter"will include only the http adapter.
Multiple include (or exclude) options can be specified in the smart linker options file.
The following guidelines can be used to determine which classes are dynamically loaded. The basic guideline is any class that is referenced though an MQe class alias or any class that is set as a parameter when administering MQe resources will be dynamically loaded. This includes:
-includeWholeClass "com.ibm.mqe.MQeQueue" -includeWholeClass "com.ibm.mqe.MQeRemoteQueue" -includeWholeClass "com.ibm.mqe.MQeHomeServerQueue" -includeWholeClass "com.ibm.mqe.MQeTransporter" -includeWholeClass "com.ibm.mqe.communications.MQeConnectionDefinition" -includeWholeClass "com.ibm.mqe.adapters.MQeMidpFieldsAdapter" -includeWholeClass "com.ibm.mqe.adapters.MQeMidpHttpAdapter" -includeWholeClass "com.ibm.mqe.messagestore.MQeMessageStore" -includeWholeClass "com.ibm.mqe.registry.MQeFileSession"