A simple subclass of URLClassLoader that overrides the getURLs()
method to return a different set of URLs for remote loading than what is used
for local loading. This class is used in conjunction with the WebService
mbean to allow dynamic loading of resources and classes from deployed ears,
ejb jars and wars.
Version:
$Revision: 1.1 $
Author:
Scott_Stark@displayscape.com, Sacha Labourey , Vladimir Blagojevic
public WebClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
WebClassLoader
public WebClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent,
java.net.URLStreamHandlerFactory factory)
Method Detail
getURLs
public java.net.URL[] getURLs()
Get the list of URLs that should be used as the RMI annotated codebase.
This is the URLs previously set via setWebURLs. If setWebURLs has not
been invoked or was passed in a null value, the super class value of
getURLs() is used.
Overrides:
getURLs in class java.net.URLClassLoader
Returns:
the local web URLs if not null, else the value of super.getURLs()
getLocalURLs
public java.net.URL[] getLocalURLs()
Access the URLClassLoader.getURLs() value.
Returns:
the URLs used for local class and resource loading
setWebURLs
public void setWebURLs(java.net.URL[] webURLs)
Set the URLs that should be returned from this classes getURLs() override.
Parameters:
webURLs, - the set of URL codebases to be used for remote class loading.