Shrinkwrap has a dependency on ThreadContext ClassLoader
--------------------------------------------------------
Key: ARQ-294
URL:
https://issues.jboss.org/browse/ARQ-294
Project: Arquillian
Issue Type: Bug
Components: OSGi Containers
Reporter: Thomas Diesler
The Shrinkrap API provided by the arquillian-osgi-bundle has a dependency on TCCL
See AbstractOSGiContainer
public Bundle installBundle(Archive<?> archive) throws BundleException
{
InputStream inputStream;
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try
{
// Read the archive in the context of the arquillian-osgi-bundle
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
ZipExporter exporter = archive.as(ZipExporter.class);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter.exportZip(baos);
inputStream = new ByteArrayInputStream(baos.toByteArray());
}
finally
{
Thread.currentThread().setContextClassLoader(ctxLoader);
}
return context.installBundle(archive.getName(), inputStream);
}
As long as this internal code needs to set the TCCL, user code that works on the Archive
will also need to do that.
The likely resolution is, to remove TCCL dependency iin shrinkwrap.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: