public RepositoryClassLoader newClassLoader(final URL url, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = new UnifiedClassLoader3(url, null, this); if (addToRepository) this.registerClassLoader(ucl); return ucl; }
/** * Retruns a string representaion of this UCL. */ public String toString() { StringBuffer tmp = new StringBuffer(super.toString()); tmp.setCharAt(tmp.length()-1, ','); tmp.append("addedOrder="); tmp.append(getAddedOrder()); tmp.append('}'); return tmp.toString(); } }
/** Construct a UnifiedClassLoader and associate it with 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 */ public UnifiedClassLoader3(URL url, URL origURL, LoaderRepository repository) { this(url, origURL); // set the repository reference this.setRepository(repository); } /** Construct a UnifiedClassLoader and associate it with the given
public void execute() { ((UnifiedClassLoader3) mobicentsSbbDescriptor.getClassLoader()) .unregister(); } };
private static void initDeployPath() { try { java.net.URL url = ((UnifiedClassLoader3)SleeContainer.class.getClassLoader()).getURL(); java.net.URI uri = new java.net.URI(url.toExternalForm().replaceAll( " ", "%20" )); deployPath = new File(uri).getAbsolutePath(); } catch (URISyntaxException e) { logger.error("Failed to establish path to Mobicents root deployment directory (mobicents.sar)", e); deployPath = null; } }
.unregister(); if (logger.isDebugEnabled()) { logger.debug("Removed class loader for SBB "
public RepositoryClassLoader newClassLoader(final URL url, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = new UnifiedClassLoader3(url, null, this); if (addToRepository) this.registerClassLoader(ucl); return ucl; }
/** Construct a UnifiedClassLoader and associate it with 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 */ public UnifiedClassLoader3(URL url, URL origURL, LoaderRepository repository) { this(url, origURL); // set the repository reference this.setRepository(repository); } /** Construct a UnifiedClassLoader and associate it with the given
/** * Retruns a string representaion of this UCL. */ public String toString() { StringBuffer tmp = new StringBuffer(super.toString()); tmp.setCharAt(tmp.length()-1, ','); tmp.append("addedOrder="); tmp.append(getAddedOrder()); tmp.append('}'); return tmp.toString(); } }
public RepositoryClassLoader newClassLoader(final URL url, final URL origURL, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = new UnifiedClassLoader3(url, origURL, this); if (addToRepository) this.registerClassLoader(ucl); return ucl; }
/** Construct a UnifiedClassLoader and associate it with 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 parent the parent class loader to use * @param repository the repository this classloader delegates to */ public UnifiedClassLoader3(URL url, URL origURL, ClassLoader parent, LoaderRepository repository) { super(url, origURL, parent); // set the repository reference this.setRepository(repository); }
public RepositoryClassLoader newClassLoader(final URL url, final URL origURL, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = new UnifiedClassLoader3(url, origURL, this); if (addToRepository) this.registerClassLoader(ucl); return ucl; }
/** Construct a UnifiedClassLoader and associate it with 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 parent the parent class loader to use * @param repository the repository this classloader delegates to */ public UnifiedClassLoader3(URL url, URL origURL, ClassLoader parent, LoaderRepository repository) { super(url, origURL, parent); // set the repository reference this.setRepository(repository); }
/** * Initialisation */ private void init() { // Include a class loader with a parent to the system class loader ClassLoader loader = RepositoryClassLoader.class.getClassLoader(); RepositoryClassLoader ucl = null; if( loader instanceof RepositoryClassLoader ) ucl = (RepositoryClassLoader) loader; else ucl = new UnifiedClassLoader3(null, null, HeirarchicalLoaderRepository3.this); packageClassLoader = new PkgClassLoader(ucl, 3); }
/** * Initialisation */ private void init() { // Include a class loader with a parent to the system class loader ClassLoader loader = RepositoryClassLoader.class.getClassLoader(); RepositoryClassLoader ucl = null; if( loader instanceof RepositoryClassLoader ) ucl = (RepositoryClassLoader) loader; else ucl = new UnifiedClassLoader3(null, null, HeirarchicalLoaderRepository3.this); packageClassLoader = new PkgClassLoader(ucl, 3); }
public RepositoryClassLoader newClassLoader(final URL url, final URL origURL, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = null; if( java2ParentDelegation == false ) ucl = new UnifiedClassLoader3(url, origURL, new NoParentClassLoader(), this); else ucl = new UnifiedClassLoader3(url, origURL, this); if( addToRepository ) { this.addClassLoader(ucl); } return ucl; }
public RepositoryClassLoader newClassLoader(final URL url, final URL origURL, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = null; if( java2ParentDelegation == false ) ucl = new UnifiedClassLoader3(url, origURL, new NoParentClassLoader(), this); else ucl = new UnifiedClassLoader3(url, origURL, this); if( addToRepository ) { this.addClassLoader(ucl); } return ucl; }
public RepositoryClassLoader newClassLoader(final URL url, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = null; if( java2ParentDelegation == false ) ucl = new UnifiedClassLoader3(url, null, new NoParentClassLoader(), this); else ucl = new UnifiedClassLoader3(url, null, this); if( addToRepository ) { this.addClassLoader(ucl); } return ucl; } public RepositoryClassLoader newClassLoader(final URL url, final URL origURL, boolean addToRepository)
public RepositoryClassLoader newClassLoader(final URL url, boolean addToRepository) throws Exception { UnifiedClassLoader3 ucl = null; if( java2ParentDelegation == false ) ucl = new UnifiedClassLoader3(url, null, new NoParentClassLoader(), this); else ucl = new UnifiedClassLoader3(url, null, this); if( addToRepository ) { this.addClassLoader(ucl); } return ucl; } public RepositoryClassLoader newClassLoader(final URL url, final URL origURL, boolean addToRepository)
private void addURLClassLoader(URLClassLoader loader) { URL[] urls = loader.getURLs(); int count = urls != null && urls.length > 0 ? urls.length : 0; URL origURL = count > 0 ? urls[0] : null; UnifiedClassLoader3 ucl3 = new UnifiedClassLoader3(origURL, origURL, this); addRepositoryClassLoader(ucl3); synchronized (classLoaders) { nonUCLClassLoader.put(loader, ucl3); } for (int i = 1; i < count; i++) { this.addClassLoaderURL(ucl3, urls[i]); } }