Install your own java.rmi.server.RMIClassLoaderSpi instance by setting the "java.rmi.server.RMIClassLoaderSpi" system property to an implementation of RMIClassLoaderSpi, and you can choose to load classes from the codebase passed in to loadClass even if there is no security manager. You can maintain a map of codebase to URLClassLoader instances and use the URLClassLoader to do the actual loading of the class from the codebase.
public abstract class RMIClassLoaderSpi { public abstract Class loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException;
public abstract Class loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException;
public abstract ClassLoader getClassLoader(String codebase) throws MalformedURLException; public abstract String getClassAnnotation(Class cl); }
Andrew C. Oliver wrote:
On 11/10/03 8:18 AM, "Scott M Stark" <[EMAIL PROTECTED]> wrote:
In order to load the org.jboss.mail.userrepository.MetaInfoImpl class from the codebase, you are going to have to catch the UndeclaredThrowableException and check the nested type since the RMIAdaptor interface does not allow for ClassNotFoundExceptions.
Right...how do I actually load it from the codebase...I got the catching the
exception issue.
-- xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development