Class WebSpherePackageScanClassResolver

  extended by
      extended by org.apache.camel.impl.DefaultPackageScanClassResolver
          extended by org.apache.camel.impl.WebSpherePackageScanClassResolver
All Implemented Interfaces:
Service, ShutdownableService, PackageScanClassResolver, StatefulService, StaticService, SuspendableService

public class WebSpherePackageScanClassResolver
extends DefaultPackageScanClassResolver

WebSphere specific resolver to handle loading annotated resources in JAR files.

Field Summary
Fields inherited from class org.apache.camel.impl.DefaultPackageScanClassResolver
Fields inherited from class
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor Summary
WebSpherePackageScanClassResolver(String resourcePath)
Method Summary
protected  Enumeration<URL> getResources(ClassLoader loader, String packageName)
          Overloaded to handle specific problem with getting resources on the IBM WebSphere platform.
static boolean isWebSphereClassLoader(ClassLoader loader)
          Is the classloader from IBM and thus the WebSphere platform?
Methods inherited from class org.apache.camel.impl.DefaultPackageScanClassResolver
addClassLoader, addFilter, addIfMatching, customResourceLocator, doStart, doStop, find, find, findAnnotated, findAnnotated, findByFilter, findImplementations, getClassLoaders, isAcceptableScheme, removeFilter, setAcceptableSchemes, setClassLoaders
Methods inherited from class
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.Service
start, stop

Constructor Detail


public WebSpherePackageScanClassResolver(String resourcePath)

resourcePath - the fixed resource path to use for fetching camel jars in WebSphere.
Method Detail


public static boolean isWebSphereClassLoader(ClassLoader loader)
Is the classloader from IBM and thus the WebSphere platform?

loader - the classloader
true if IBM classloader, false otherwise.


protected Enumeration<URL> getResources(ClassLoader loader,
                                        String packageName)
                                 throws IOException
Overloaded to handle specific problem with getting resources on the IBM WebSphere platform.

WebSphere can not load resources if the resource to load is a folder name, such as a packagename, you have to explicit name a resource that is a file.

getResources in class DefaultPackageScanClassResolver
loader - the classloader
packageName - the packagename for the package to load
URL's for the given package
IOException - is thrown by the classloader

Apache Camel