The OSGi runtime controls package visibility across bundles. If a bundle does not explicitly import a package, then it will not have access to classes within that package when it comes to dynamically loading them. This is especially important to WebSphere MQ Everyplace, because it has been designed with this flexibility in mind. Without some small changes to the bundles, developers cannot use 3rd party or their own Rules or Adapters. There are two ways to remove this problem:
String MyRule = "UserQMRule"; MQeLoader loader = new MQeLoader(); loader.addClass(MyRule, Class.forName(MyRule)); MQe.setLoader(loader);
Take care when using the second method, that the loader within WebSphere MQ Everyplace is not replaced with another loader from another bundle during the application runtime.