Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-06 Thread Romain Manni-Bucau
it is because the quick and dirty change leds to use 2 services instance so
test is right there and quick and dirty change is wrong ;)

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mer. 6 oct. 2021 à 10:21, Jean-Louis MONTEIRO  a
écrit :

> Quick and dirty change in AbstractProxyFactory
>
> definingService = new ClassLoaderProxyService(webBeansContext); //
> webBeansContext.getService(DefiningClassService.class);
>
> `mvn clean install` under JDK8
>
> [ERROR] Failures:
> > [ERROR]   ClassLoaderProxyServiceTest.defineInProxy:45
> >
> expected: >
> > but
> >
> was: > >
> > [ERROR]   InterceptorAnnotatedDiscoveryTest.discover:62 expected:<[foo]>
> > but was:<[bar]>
> > [ERROR]   NormalScopeProxyFactoryTest.testProtectedMethod:321
> > expected:<42> but was:<0>
> > [ERROR] Errors:
> > [ERROR]
> >
> InterceptionOfBeanWithConstructorInjectionTest.checkBeanWasBuiltWithItsConstructorAndIntercepted:54->AbstractUnitTest.startContainer:231->AbstractUnitTest.inject:251
> > » IllegalState
> > [INFO]
> > [ERROR] Tests run: 589, Failures: 3, Errors: 1, Skipped: 5
> > [
>
>
>  Haven't got time to debug and look at why yet
>
> Le mer. 6 oct. 2021 à 10:14, Jean-Louis MONTEIRO  a
> écrit :
>
> > Haven't look quickly but I can easily change the default again and run
> the
> > build again.
> >
> > Le mer. 6 oct. 2021 à 08:10, Romain Manni-Bucau 
> a
> > écrit :
> >
> >> It is the only identified/expected one at least, did you spot another
> one?
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau  |  Blog
> >>  | Old Blog
> >>  | Github <
> >> https://github.com/rmannibucau> |
> >> LinkedIn  | Book
> >> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >> >
> >>
> >>
> >> Le mar. 5 oct. 2021 à 22:07, Jean-Louis MONTEIRO  a
> >> écrit :
> >>
> >> > I'm not sure it's only package scope methods ...
> >> >
> >> > Le mar. 5 oct. 2021 à 21:59, Romain Manni-Bucau <
> rmannibu...@gmail.com>
> >> a
> >> > écrit :
> >> >
> >> > > Well it is a config in owb.properties but as mentionned it will not
> >> > support
> >> > > package scope methods proxying by design (but it is in the spec).
> >> > >
> >> > > For this, add-opens are required (or a fake module-info workaround).
> >> > >
> >> > > Le mar. 5 oct. 2021 à 21:48, Jean-Louis MONTEIRO <
> jeano...@gmail.com>
> >> a
> >> > > écrit :
> >> > >
> >> > > > Here is what I have done 
> >> > > >
> >> > > > Switch from Unsafe to ClassLoaderProxyService in the
> >> > > AbstractProxyFactory.
> >> > > > Then, command line and run `mvn clean install`
> >> > > >
> >> > > > It fails under JDK 8 and under JDK17
> >> > > >
> >> > > > Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau <
> >> rmannibu...@gmail.com
> >> > >
> >> > > a
> >> > > > écrit :
> >> > > >
> >> > > > > Hi,
> >> > > > >
> >> > > > > Not sure what you mean but we should build on jdk 8 and run on
> >> 8-18.
> >> > > > >
> >> > > > > Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro <
> >> > > > jlmonte...@tomitribe.com
> >> > > > > >
> >> > > > > a écrit :
> >> > > > >
> >> > > > > > Hi,
> >> > > > > >
> >> > > > > > While investigating some OWB issues, I tried moving default
> >> Unsafe
> >> > to
> >> > > > > > ClassLoaderProxyService, but it looks like I can't build OWB
> >> > anymore,
> >> > > > on
> >> > > > > > JDK8 or even JDK17.
> >> > > > > >
> >> > > > > > Isn't it supposed to be working out of the box?
> >> > > > > >
> >> > > > > >
> >> > > > > > --
> >> > > > > > Jean-Louis Monteiro
> >> > > > > > http://twitter.com/jlouismonteiro
> >> > > > > > http://www.tomitribe.com
> >> > > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Jean-Louis
> >> > > >
> >> > >
> >> >
> >> >
> >> > --
> >> > Jean-Louis
> >> >
> >>
> >
> >
> > --
> > Jean-Louis
> >
>
>
> --
> Jean-Louis
>


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-06 Thread Jean-Louis MONTEIRO
Quick and dirty change in AbstractProxyFactory

definingService = new ClassLoaderProxyService(webBeansContext); //
webBeansContext.getService(DefiningClassService.class);

`mvn clean install` under JDK8

[ERROR] Failures:
> [ERROR]   ClassLoaderProxyServiceTest.defineInProxy:45
> expected:
> but
> was: >
> [ERROR]   InterceptorAnnotatedDiscoveryTest.discover:62 expected:<[foo]>
> but was:<[bar]>
> [ERROR]   NormalScopeProxyFactoryTest.testProtectedMethod:321
> expected:<42> but was:<0>
> [ERROR] Errors:
> [ERROR]
> InterceptionOfBeanWithConstructorInjectionTest.checkBeanWasBuiltWithItsConstructorAndIntercepted:54->AbstractUnitTest.startContainer:231->AbstractUnitTest.inject:251
> » IllegalState
> [INFO]
> [ERROR] Tests run: 589, Failures: 3, Errors: 1, Skipped: 5
> [


 Haven't got time to debug and look at why yet

Le mer. 6 oct. 2021 à 10:14, Jean-Louis MONTEIRO  a
écrit :

> Haven't look quickly but I can easily change the default again and run the
> build again.
>
> Le mer. 6 oct. 2021 à 08:10, Romain Manni-Bucau  a
> écrit :
>
>> It is the only identified/expected one at least, did you spot another one?
>>
>> Romain Manni-Bucau
>> @rmannibucau  |  Blog
>>  | Old Blog
>>  | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn  | Book
>> <
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >
>>
>>
>> Le mar. 5 oct. 2021 à 22:07, Jean-Louis MONTEIRO  a
>> écrit :
>>
>> > I'm not sure it's only package scope methods ...
>> >
>> > Le mar. 5 oct. 2021 à 21:59, Romain Manni-Bucau 
>> a
>> > écrit :
>> >
>> > > Well it is a config in owb.properties but as mentionned it will not
>> > support
>> > > package scope methods proxying by design (but it is in the spec).
>> > >
>> > > For this, add-opens are required (or a fake module-info workaround).
>> > >
>> > > Le mar. 5 oct. 2021 à 21:48, Jean-Louis MONTEIRO 
>> a
>> > > écrit :
>> > >
>> > > > Here is what I have done 
>> > > >
>> > > > Switch from Unsafe to ClassLoaderProxyService in the
>> > > AbstractProxyFactory.
>> > > > Then, command line and run `mvn clean install`
>> > > >
>> > > > It fails under JDK 8 and under JDK17
>> > > >
>> > > > Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau <
>> rmannibu...@gmail.com
>> > >
>> > > a
>> > > > écrit :
>> > > >
>> > > > > Hi,
>> > > > >
>> > > > > Not sure what you mean but we should build on jdk 8 and run on
>> 8-18.
>> > > > >
>> > > > > Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro <
>> > > > jlmonte...@tomitribe.com
>> > > > > >
>> > > > > a écrit :
>> > > > >
>> > > > > > Hi,
>> > > > > >
>> > > > > > While investigating some OWB issues, I tried moving default
>> Unsafe
>> > to
>> > > > > > ClassLoaderProxyService, but it looks like I can't build OWB
>> > anymore,
>> > > > on
>> > > > > > JDK8 or even JDK17.
>> > > > > >
>> > > > > > Isn't it supposed to be working out of the box?
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > > Jean-Louis Monteiro
>> > > > > > http://twitter.com/jlouismonteiro
>> > > > > > http://www.tomitribe.com
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > Jean-Louis
>> > > >
>> > >
>> >
>> >
>> > --
>> > Jean-Louis
>> >
>>
>
>
> --
> Jean-Louis
>


-- 
Jean-Louis


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-06 Thread Jean-Louis MONTEIRO
Haven't look quickly but I can easily change the default again and run the
build again.

Le mer. 6 oct. 2021 à 08:10, Romain Manni-Bucau  a
écrit :

> It is the only identified/expected one at least, did you spot another one?
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github <
> https://github.com/rmannibucau> |
> LinkedIn  | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le mar. 5 oct. 2021 à 22:07, Jean-Louis MONTEIRO  a
> écrit :
>
> > I'm not sure it's only package scope methods ...
> >
> > Le mar. 5 oct. 2021 à 21:59, Romain Manni-Bucau 
> a
> > écrit :
> >
> > > Well it is a config in owb.properties but as mentionned it will not
> > support
> > > package scope methods proxying by design (but it is in the spec).
> > >
> > > For this, add-opens are required (or a fake module-info workaround).
> > >
> > > Le mar. 5 oct. 2021 à 21:48, Jean-Louis MONTEIRO 
> a
> > > écrit :
> > >
> > > > Here is what I have done 
> > > >
> > > > Switch from Unsafe to ClassLoaderProxyService in the
> > > AbstractProxyFactory.
> > > > Then, command line and run `mvn clean install`
> > > >
> > > > It fails under JDK 8 and under JDK17
> > > >
> > > > Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau <
> rmannibu...@gmail.com
> > >
> > > a
> > > > écrit :
> > > >
> > > > > Hi,
> > > > >
> > > > > Not sure what you mean but we should build on jdk 8 and run on
> 8-18.
> > > > >
> > > > > Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro <
> > > > jlmonte...@tomitribe.com
> > > > > >
> > > > > a écrit :
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > While investigating some OWB issues, I tried moving default
> Unsafe
> > to
> > > > > > ClassLoaderProxyService, but it looks like I can't build OWB
> > anymore,
> > > > on
> > > > > > JDK8 or even JDK17.
> > > > > >
> > > > > > Isn't it supposed to be working out of the box?
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Jean-Louis Monteiro
> > > > > > http://twitter.com/jlouismonteiro
> > > > > > http://www.tomitribe.com
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jean-Louis
> > > >
> > >
> >
> >
> > --
> > Jean-Louis
> >
>


-- 
Jean-Louis


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-06 Thread Romain Manni-Bucau
It is the only identified/expected one at least, did you spot another one?

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mar. 5 oct. 2021 à 22:07, Jean-Louis MONTEIRO  a
écrit :

> I'm not sure it's only package scope methods ...
>
> Le mar. 5 oct. 2021 à 21:59, Romain Manni-Bucau  a
> écrit :
>
> > Well it is a config in owb.properties but as mentionned it will not
> support
> > package scope methods proxying by design (but it is in the spec).
> >
> > For this, add-opens are required (or a fake module-info workaround).
> >
> > Le mar. 5 oct. 2021 à 21:48, Jean-Louis MONTEIRO  a
> > écrit :
> >
> > > Here is what I have done 
> > >
> > > Switch from Unsafe to ClassLoaderProxyService in the
> > AbstractProxyFactory.
> > > Then, command line and run `mvn clean install`
> > >
> > > It fails under JDK 8 and under JDK17
> > >
> > > Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau  >
> > a
> > > écrit :
> > >
> > > > Hi,
> > > >
> > > > Not sure what you mean but we should build on jdk 8 and run on 8-18.
> > > >
> > > > Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro <
> > > jlmonte...@tomitribe.com
> > > > >
> > > > a écrit :
> > > >
> > > > > Hi,
> > > > >
> > > > > While investigating some OWB issues, I tried moving default Unsafe
> to
> > > > > ClassLoaderProxyService, but it looks like I can't build OWB
> anymore,
> > > on
> > > > > JDK8 or even JDK17.
> > > > >
> > > > > Isn't it supposed to be working out of the box?
> > > > >
> > > > >
> > > > > --
> > > > > Jean-Louis Monteiro
> > > > > http://twitter.com/jlouismonteiro
> > > > > http://www.tomitribe.com
> > > > >
> > > >
> > >
> > >
> > > --
> > > Jean-Louis
> > >
> >
>
>
> --
> Jean-Louis
>


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-05 Thread Jean-Louis MONTEIRO
I'm not sure it's only package scope methods ...

Le mar. 5 oct. 2021 à 21:59, Romain Manni-Bucau  a
écrit :

> Well it is a config in owb.properties but as mentionned it will not support
> package scope methods proxying by design (but it is in the spec).
>
> For this, add-opens are required (or a fake module-info workaround).
>
> Le mar. 5 oct. 2021 à 21:48, Jean-Louis MONTEIRO  a
> écrit :
>
> > Here is what I have done 
> >
> > Switch from Unsafe to ClassLoaderProxyService in the
> AbstractProxyFactory.
> > Then, command line and run `mvn clean install`
> >
> > It fails under JDK 8 and under JDK17
> >
> > Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau 
> a
> > écrit :
> >
> > > Hi,
> > >
> > > Not sure what you mean but we should build on jdk 8 and run on 8-18.
> > >
> > > Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro <
> > jlmonte...@tomitribe.com
> > > >
> > > a écrit :
> > >
> > > > Hi,
> > > >
> > > > While investigating some OWB issues, I tried moving default Unsafe to
> > > > ClassLoaderProxyService, but it looks like I can't build OWB anymore,
> > on
> > > > JDK8 or even JDK17.
> > > >
> > > > Isn't it supposed to be working out of the box?
> > > >
> > > >
> > > > --
> > > > Jean-Louis Monteiro
> > > > http://twitter.com/jlouismonteiro
> > > > http://www.tomitribe.com
> > > >
> > >
> >
> >
> > --
> > Jean-Louis
> >
>


-- 
Jean-Louis


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-05 Thread Romain Manni-Bucau
Well it is a config in owb.properties but as mentionned it will not support
package scope methods proxying by design (but it is in the spec).

For this, add-opens are required (or a fake module-info workaround).

Le mar. 5 oct. 2021 à 21:48, Jean-Louis MONTEIRO  a
écrit :

> Here is what I have done 
>
> Switch from Unsafe to ClassLoaderProxyService in the AbstractProxyFactory.
> Then, command line and run `mvn clean install`
>
> It fails under JDK 8 and under JDK17
>
> Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau  a
> écrit :
>
> > Hi,
> >
> > Not sure what you mean but we should build on jdk 8 and run on 8-18.
> >
> > Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro <
> jlmonte...@tomitribe.com
> > >
> > a écrit :
> >
> > > Hi,
> > >
> > > While investigating some OWB issues, I tried moving default Unsafe to
> > > ClassLoaderProxyService, but it looks like I can't build OWB anymore,
> on
> > > JDK8 or even JDK17.
> > >
> > > Isn't it supposed to be working out of the box?
> > >
> > >
> > > --
> > > Jean-Louis Monteiro
> > > http://twitter.com/jlouismonteiro
> > > http://www.tomitribe.com
> > >
> >
>
>
> --
> Jean-Louis
>


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-05 Thread Jean-Louis MONTEIRO
Here is what I have done 

Switch from Unsafe to ClassLoaderProxyService in the AbstractProxyFactory.
Then, command line and run `mvn clean install`

It fails under JDK 8 and under JDK17

Le mar. 5 oct. 2021 à 20:40, Romain Manni-Bucau  a
écrit :

> Hi,
>
> Not sure what you mean but we should build on jdk 8 and run on 8-18.
>
> Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro  >
> a écrit :
>
> > Hi,
> >
> > While investigating some OWB issues, I tried moving default Unsafe to
> > ClassLoaderProxyService, but it looks like I can't build OWB anymore, on
> > JDK8 or even JDK17.
> >
> > Isn't it supposed to be working out of the box?
> >
> >
> > --
> > Jean-Louis Monteiro
> > http://twitter.com/jlouismonteiro
> > http://www.tomitribe.com
> >
>


-- 
Jean-Louis


Re: Switching from Unsafe to ClassLoaderProxyService

2021-10-05 Thread Romain Manni-Bucau
Hi,

Not sure what you mean but we should build on jdk 8 and run on 8-18.

Le mar. 5 oct. 2021 à 20:29, Jean-Louis Monteiro 
a écrit :

> Hi,
>
> While investigating some OWB issues, I tried moving default Unsafe to
> ClassLoaderProxyService, but it looks like I can't build OWB anymore, on
> JDK8 or even JDK17.
>
> Isn't it supposed to be working out of the box?
>
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>


Switching from Unsafe to ClassLoaderProxyService

2021-10-05 Thread Jean-Louis Monteiro
Hi,

While investigating some OWB issues, I tried moving default Unsafe to
ClassLoaderProxyService, but it looks like I can't build OWB anymore, on
JDK8 or even JDK17.

Isn't it supposed to be working out of the box?


--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com