Hi folks, 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 segment [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 have attached a patch for this in this jira [2]. The patch worked fine in my OSGi enabled runtime based on Equinox. One caveat of this patch is that it adds Equinox as a compile-time dependency. But the TomEE runtime can function without this dependency. I hope this is the proper channel to talk about this. I'd value your feedback very much! [1] https://github.com/apache/tomee/blob/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java#L391 [2] https://issues.apache.org/jira/browse/TOMEE-1292 Thanks, KasunG -- ~~~*******'''''''''''''*******~~~ *Kasun Gajasinghe* Software Engineer; WSO2 Inc.; http://wso2.com, *linked-in: *http://lk.linkedin.com/in/gajasinghe *blog: **http://blog.kasunbg.org* <http://blog.kasunbg.org/> *twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
