use of org.mule.runtime.deployment.model.internal.nativelib.DefaultNativeLibraryFinderFactory in project mule by mulesoft.
the class IsolatedClassLoaderFactory method createApplicationArtifactClassLoader.
/**
* Creates an {@link ArtifactClassLoader} for the application.
*
* @param parent the parent class loader to be assigned to the new one created here
* @param childClassLoaderLookupPolicy look policy to be used
* @param artifactsUrlClassification the url classifications to get plugins urls
* @param pluginsArtifactClassLoaders the classloaders of the plugins used by the application
* @return the {@link ArtifactClassLoader} to be used for running the test
*/
protected ArtifactClassLoader createApplicationArtifactClassLoader(ClassLoader parent, ClassLoaderLookupPolicy childClassLoaderLookupPolicy, ArtifactsUrlClassification artifactsUrlClassification, List<ArtifactClassLoader> pluginsArtifactClassLoaders) {
List<URL> applicationUrls = new ArrayList<>();
applicationUrls.addAll(artifactsUrlClassification.getApplicationLibUrls());
applicationUrls.addAll(artifactsUrlClassification.getApplicationSharedLibUrls());
logClassLoaderUrls("APP", applicationUrls);
return new MuleApplicationClassLoader(APP_NAME, new ArtifactDescriptor(APP_NAME), parent, new DefaultNativeLibraryFinderFactory().create(APP_NAME, applicationUrls.toArray(new URL[applicationUrls.size()])), applicationUrls, childClassLoaderLookupPolicy, pluginsArtifactClassLoaders);
}
Aggregations