You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2014/08/13 10:10:11 UTC

[jira] [Commented] (TOMEE-1292) Support OSGi bundleresource:/ protocol in TomEE

    [ https://issues.apache.org/jira/browse/TOMEE-1292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095266#comment-14095266 ] 

Romain Manni-Bucau commented on TOMEE-1292:
-------------------------------------------

One constraint on the whole code is no mandatory osgi dependencies. Also I'd like no osgi dependency at all in container and tomee modules

We can add in SystemInstance components a fallback jar handler or something like that for this purpose instead



> Support OSGi bundleresource:/ protocol in TomEE
> -----------------------------------------------
>
>                 Key: TOMEE-1292
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1292
>             Project: TomEE
>          Issue Type: Improvement
>    Affects Versions: 1.6.0.2
>         Environment: TomEE in OSGi environments, say, Equinox. 
>            Reporter: Kasun Gajasinghe
>         Attachments: TOMEE-1292.patch
>
>
> Currently, when TomEE scans it's libraries for TLDs etc. via the URLClassLoader, it gets a list of URLs pointing to jar files. To process these TomEE converts these URLs to actual file paths. As seen in this code [1], TomEE only processes URLs that have jar:/ or file:/ protocol. This works fine in a non-OSGi environment.
> But in OSGi environments, they have OSGi bundles instead of jars. So, what the URLClassloader returns is a set of URLs with bundleresource:/ protocol pointing to the bundles. We can in fact get the actual file path from the bundleresource:/ protocol as well.
> So, I'm asking the kind folks at TomEE to consider supporting bundleresource:/ protocol as well. I will provide a patch for this herewith. The patch worked fine in my OSGi enabled runtime based on Equinox.
> Thanks!
> Kasun Gajasinghe



--
This message was sent by Atlassian JIRA
(v6.2#6252)