/** * UnifiedClassLoader constructor that can be used to * register with a particular Loader Repository identified by ObjectName. * * @param url an <code>URL</code> value * @param origURL the possibly null original URL from which url may * be a local copy or nested jar. * @param server a <code>MBeanServer</code> value * @param repositoryName an <code>ObjectName</code> value * @exception Exception if an error occurs */ public UnifiedClassLoader(final URL url, final URL origURL, final MBeanServer server, final ObjectName repositoryName) throws Exception { this(url, origURL); LoaderRepository rep = (LoaderRepository)server.invoke(repositoryName, "registerClassLoader", new Object[] {this}, new String[] {getClass().getName()}); this.setRepository(rep); }
/** * UnifiedClassLoader constructor that can be used to * register with a particular Loader Repository identified by ObjectName. * * @param url an <code>URL</code> value * @param origURL the possibly null original URL from which url may * be a local copy or nested jar. * @param server a <code>MBeanServer</code> value * @param repositoryName an <code>ObjectName</code> value * @exception Exception if an error occurs */ public UnifiedClassLoader(final URL url, final URL origURL, final MBeanServer server, final ObjectName repositoryName) throws Exception { this(url, origURL); LoaderRepository rep = (LoaderRepository)server.invoke(repositoryName, "registerClassLoader", new Object[] {this}, new String[] {getClass().getName()}); this.setRepository(rep); }
/** * Construct a <tt>UnifiedClassLoader</tt> and registers it to the given * repository. * @param url The single URL to load classes from. * @param origURL the possibly null original URL from which url may * be a local copy or nested jar. * @param repository the repository this classloader delegates to * be a local copy or nested jar. */ public UnifiedClassLoader(URL url, URL origURL, LoaderRepository repository) { this(url, origURL); // set the repository reference this.setRepository(repository); // register this loader to the given repository repository.addClassLoader(this); }
/** * Construct a <tt>UnifiedClassLoader</tt> and registers it to the given * repository. * @param url The single URL to load classes from. * @param origURL the possibly null original URL from which url may * be a local copy or nested jar. * @param repository the repository this classloader delegates to * be a local copy or nested jar. */ public UnifiedClassLoader(URL url, URL origURL, LoaderRepository repository) { this(url, origURL); // set the repository reference this.setRepository(repository); // register this loader to the given repository repository.addClassLoader(this); }