code: public static Bundle getBundle(BundleContext bundleContext, String resourceAdapter) throws ConfigEvaluatorException {
  
          Bundle bundle = null;
  
          if (JMSResourceDefinitionConstants.RESOURCE_ADAPTER_WASJMS.equals(resourceAdapter)
              || JMSResourceDefinitionConstants.RESOURCE_ADAPTER_WMQJMS.equals(resourceAdapter)) {
              Collection<ServiceReference<ResourceAdapterBundleService>> resourceAdapterServices;
              try {
                  resourceAdapterServices = bundleContext.getServiceReferences(ResourceAdapterBundleService.class,
                                                                               "(type=".concat(resourceAdapter).concat(")"));
                  bundle = resourceAdapterServices.iterator().next().getBundle();
  
              } catch (InvalidSyntaxException e) {
              }
          } else {
              bundle = bundleContext.getBundle(BUNDLE_LOCATION + resourceAdapter);
          }
  
          return bundle;
      }
docs: Get the bundle where the resource adapter's Metatype Information exists.
  
  @param resourceAdapter
  @return
  @throws ConfigEvaluatorException