org.apache.camel.util
Class WebSphereResolverUtil

java.lang.Object
  extended by org.apache.camel.util.ResolverUtil
      extended by org.apache.camel.util.WebSphereResolverUtil

public class WebSphereResolverUtil
extends ResolverUtil

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


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.camel.util.ResolverUtil
ResolverUtil.AnnotatedWith, ResolverUtil.IsA, ResolverUtil.Test
 
Field Summary
 
Fields inherited from class org.apache.camel.util.ResolverUtil
log
 
Constructor Summary
WebSphereResolverUtil(String resourcePath)
          Constructor.
 
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.util.ResolverUtil
addIfMatching, find, find, findAnnotated, findImplementations, getClasses, getClassLoaders, setClassLoaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSphereResolverUtil

public WebSphereResolverUtil(String resourcePath)
Constructor.

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

isWebSphereClassLoader

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

Parameters:
loader - the classloader
Returns:
true if IBM classloader, false otherwise.

getResources

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.

Overrides:
getResources in class ResolverUtil
Parameters:
loader - the classloader
packageName - the packagename for the package to load
Returns:
URL's for the given package
Throws:
IOException - is thrown by the classloader


Apache CAMEL