[arquillian-issues] [JBoss JIRA] Resolved: (ARQ-294) Shrinkwrap has a dependency on ThreadContext ClassLoader

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Wed Apr 27 10:26:18 EDT 2011


     [ https://issues.jboss.org/browse/ARQ-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler resolved ARQ-294.
--------------------------------

    Resolution: Out of Date


Out of Date

> 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: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list