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

David Bosschaert (JIRA) jira-events at lists.jboss.org
Fri Mar 18 08:30:46 EDT 2011


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

David Bosschaert commented on SHRINKWRAP-242:
---------------------------------------------

On the reinitialization - maybe I'm not understanding this properly but there is still a chance that the service is not configured correctly when I try to access it as the reconfiguration hasn't happened yet.

So yes, in that case you probably need to inject something which is properly configured and this is precisely what I did in my service-based approach. However what I did instead of injecting a Domain was I injected a 'ShrinkWrapService' which had more or less the same API as the static ShrinkWrap class. So when using that you would get something like:

@Inject
ShrinkWrapService sws;

sws.create(JavaArchive.class);

They only way in which I can see that static usage is still possible is to make it stateless and independent of the TCCL or any state anywhere else so that there would be no initialization at all and the methods become simple utility methods. This would certainly be the simplest from a user's point of view. Not quite sure how to achieve this, but one way would be by merging some of the sw modules so that initialization becomes unnecessary, but in the total spectrum of solutions I might be missing something...

> 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