Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-22 Thread Romain Manni-Bucau
Hi Daniel, Cause there are some commands using a webapp like classloader and it would fail in this mode in general - we have the same hack for tomee embedded i think, just not triggered the same way. Feel free to revisit it and unify it with what you are doing. Likely what was planned:

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-22 Thread Daniel Cunha
Hi Romain, I get your point now... Question: Why do we need to do it[1]? if (loader != null) { Thread.currentThread().setContextClassLoader(loader); if (loader != ClassLoader.getSystemClassLoader()) { System.setProperty("openejb.classloader.first.disallow-system-loading",

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-20 Thread Daniel Cunha
Hi Romain, Ok, I'll create a scenario for it. Thank you. Em ter, 20 de nov de 2018 às 17:29, Romain Manni-Bucau < rmannibu...@gmail.com> escreveu: > Hi Daniel > > Do you think you can assert the classloader in the execution thread didnt > change after the call? Was one concern and i didnt find

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-20 Thread Romain Manni-Bucau
Hi Daniel Do you think you can assert the classloader in the execution thread didnt change after the call? Was one concern and i didnt find the matching assert Le mar. 20 nov. 2018 20:00, Daniel Cunha a écrit : > Hi folks, > > I've added a new test with JAXRS, calling a command in my endpoint

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-20 Thread Daniel Cunha
Hi folks, I've added a new test with JAXRS, calling a command in my endpoint from Bootstrap CLI. Please review the changes on my PR[1] and let me know what do you think about it. Thank you. :) [1] https://github.com/apache/tomee/pull/176 Em seg, 19 de nov de 2018 às 13:57, Daniel Cunha

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-19 Thread Daniel Cunha
Hi Jon, ok. I got it! :) Em seg, 19 de nov de 2018 às 13:49, Jonathan Gallimore < jonathan.gallim...@gmail.com> escreveu: > On Mon, Nov 19, 2018 at 4:30 PM Daniel Cunha wrote: > > > Hi guys, > > > > I updated the PR with some chages: > > 1 - Move BasicURLClassPath.CustomizableURLClassLoader to

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-19 Thread Jonathan Gallimore
On Mon, Nov 19, 2018 at 4:30 PM Daniel Cunha wrote: > Hi guys, > > I updated the PR with some chages: > 1 - Move BasicURLClassPath.CustomizableURLClassLoader to be public. > 2 - I'm using BasicURLClassPath.CustomizableURLClassLoader instead of > DynamicClassLoader (class that I created) > 3-

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-19 Thread Daniel Cunha
Hi guys, I updated the PR with some chages: 1 - Move BasicURLClassPath.CustomizableURLClassLoader to be public. 2 - I'm using BasicURLClassPath.CustomizableURLClassLoader instead of DynamicClassLoader (class that I created) 3- DynamicClassLoader is not needed anymore. Was removed from the PR. 3 -

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-11-02 Thread Jonathan Gallimore
I'm following this thread with some interest. What would be some good tests to make sure these cases are covered off? Some suggestions in addition to the existing test: * Standalone client that has its own main and delegates to the CLI main * As above, but perhaps with the standalone client

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-10-31 Thread Romain Manni-Bucau
Le mer. 31 oct. 2018 à 14:52, Daniel Cunha a écrit : > Em seg, 29 de out de 2018 às 14:01, Jonathan Gallimore < > jonathan.gallim...@gmail.com> escreveu: > > > We should write a test case for both of these, and agree on them. I'd > like > > to be able to merge this in with confidence, and

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-10-31 Thread Daniel Cunha
Em seg, 29 de out de 2018 às 14:01, Jonathan Gallimore < jonathan.gallim...@gmail.com> escreveu: > We should write a test case for both of these, and agree on them. I'd like > to be able to merge this in with confidence, and without the tests I don't > see how we can do that. > > Jon > > On Mon,

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-10-29 Thread Jonathan Gallimore
We should write a test case for both of these, and agree on them. I'd like to be able to merge this in with confidence, and without the tests I don't see how we can do that. Jon On Mon, Oct 29, 2018 at 3:35 PM Romain Manni-Bucau wrote: > Hi Daniel, > > the point is that this code is reused in

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-10-29 Thread Romain Manni-Bucau
Hi Daniel, the point is that this code is reused in several places so we must be as clean as we can, here the cases I had in mind: 1. reused main in another main (so an app calls the main): here the pitfall is that the property openejb.classloader.first.disallow-system-load is not resetted and

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-10-29 Thread Daniel Cunha
Hi, I updated the PR with tests! Em seg, 29 de out de 2018 às 08:27, Jonathan Gallimore < jonathan.gallim...@gmail.com> escreveu: > I saw your note on the PR regarding Romain's feedback. > > For visibility here, Romain is querying whether this patch will cause an > issue with folks calling the

Re: TOMEE-2253 - tomee.sh -version not working properly with Java 11

2018-10-29 Thread Jonathan Gallimore
I saw your note on the PR regarding Romain's feedback. For visibility here, Romain is querying whether this patch will cause an issue with folks calling the CLI with a custom classpath using `java -cp ...` under Java 8. I'd suggest we add a test for it, which looks to be what Daniel is doing.