[shrinkwrap-issues] [JBoss JIRA] Commented: (SHRINKWRAP-242) Get shrinkwrap to work from inside an OSGi framework

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Fri Mar 25 00:33:46 EDT 2011


    [ https://issues.jboss.org/browse/SHRINKWRAP-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591743#comment-12591743 ] 

Andrew Rubinger commented on SHRINKWRAP-242:
--------------------------------------------

To create an ArchiveFactory with a given ClassLoader:

final ClassLoader cl = null; // Use whatever CL
final ConfigurationBuilder builder  = new ConfigurationBuilder().classLoader(cl);
final Domain domain = ShrinkWrap.createDomain(builder);
final ArchiveFactory factory = domain.getArchiveFactory();

This will ensure that the specified CL will be used for creating impl instances of Archives; is this the same as "loading the impl-base module"?

Yes, there is the case where more than one module would need to be visible.  For instance, extension-sip adds archive types specific to SIP servlet grammars.  So the above assumes that the CL passed in has visibility to both extension-sip and impl-base.  If that's not true, then yes, we need a Collection of CLs to search.

> Get shrinkwrap to work from inside an OSGi framework
> ----------------------------------------------------
>
>                 Key: SHRINKWRAP-242
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-242
>             Project: ShrinkWrap
>          Issue Type: Task
>    Affects Versions: 1.0.0-alpha-11
>            Reporter: David Bosschaert
>            Assignee: David Bosschaert
>            Priority: Critical
>             Fix For: 1.0.0-beta-1
>
>
> Currently there are issues around the use of Shrinkwrap in an OSGi framework. The libraries don't contain the necessary Manifest headers and just adding them causes classloading problems as the TCCL is used during the boot process.
> Shrinkwrap should be usable from within OSGi.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the shrinkwrap-issues mailing list