Hi Romain,

Please see my comments in-line.


On Wed, Aug 13, 2014 at 1:36 PM, Romain Manni-Bucau <[email protected]>
wrote:

> Hi
>
> Main issue then is you don't support OSGi in TomEE, just a few places
> so container is still broken (we use jar/file everywhere) - and in
> this case using plain tomcat is surely enough.
>
>
Yes, that's true.


> Equinox is nice but we need to ensure we run in karaf without issues
> (no conflicts with its added layer)
>
>
I did not look into how this works in Karaf. I will test this in Karaf, and
see how it works.


> One try to make openejb OSGi friendly was
> http://svn.apache.org/repos/asf/tomee/karafee/ but code changed a lot
> since this code was written and that's my next comment:




> if we don't
> have a lot of tests then this code will not be maintained at all and
> then I prefer to not support it rather than releasing broken code each
> time.
>

Yes, I understand your concern. I'm all in for writing test cases to make
sure that this will be maintained properly. I'd also like to point out that
the patch for this change is small so the impact is not big. My gut feeling
says that this code will not have an affect in Tomcat because of the
explicit checks we do. I could also see the possibility of adapting Daniel's
suggestion on checking the FRAMEWORK_VENDOR.

I can write a unit test for this by having a mock object to simulate the
BundleURLConnection. I did not dig deep into see how test cases work in
TomEE, so I'd like to know from where I could start. Do you have any other
suggestion on how we can achieve this?



>
> Last point: tld code was totally rewritten on trunk so where do you
> want this support: trunk or 1.7.x?
>

This given code is independent of TLD code. This particular method that I'm
patching is used for reading configuration files by several frameworks
including JSF. MyFaces in particular uses this code (via
TomEEFacesConfigResourceProvider)  to get find libs that will be used later
on to find META-INF/faces-config.xml files.

We've been doing the development on 1.6.x and will soon move on to 1.7.x.
So, this is targeted for 1.7.x.

Thanks,
KasunG


>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-08-13 9:33 GMT+02:00 Kasun Gajasinghe <[email protected]>:
> > 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>
>



-- 
~~~*******'''''''''''''*******~~~
*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>

Reply via email to