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

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

Kasun Gajasinghe created TOMEE-1292:
---------------------------------------

             Summary: 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


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 writing this mail to the kind folks at TomEE to consider supporting bundleresource:/ protocol as well. I will provide a patch for this herewith. All the tests of TomEE was passed successfully with the patch, and it worked fine in my OSGi enabled runtime based on Equinox.

Thanks!
Kasun Gajasinghe



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