[cdi-dev] [Vote] for CDI-527 / PR 271 allow proxying of classes with non-private final methods

Mark Struberg struberg at yahoo.de
Fri Feb 12 10:35:00 EST 2016


José, the whole CDI spec requires proxying since almost the earliest betas (was about early 2008 when we introduced NormalScope). The UnPROXYableResolutionException + the wording about this implementation detail also exists since then. This is really nothing I freshly introduced (as your answer seemed to imply).

Proxying is a design pattern and has not much to do with j.l.r.Proxy and it’s problems. jlr.Proxy (as most reflect stuff) also already became 100x faster since it’s introduction in java-1.3. The impl in older java versions was not great, but the API itself is not that bad. Of course it misses lambdas, etc. But all that doesn’t matter as we don’t use it anyway. proxying as pattern != jlr.Proxy

Of course we miss an easy and portable way to create subclassing proxies in Java. I totally agree with Rémy regarding this. But if you look at CDI-580 then we already proposed to introduce this feature. It has potential to be an own JSR but due to the overhead in the JCP and the limited time we could also do this as part of the CDI EG. Kind of how the Transaction, Interceptor and early JPA spec got handled inside the EJB EG.

LieGrue,
strub


> Am 12.02.2016 um 16:03 schrieb José Paumard <jose.paumard at gmail.com>:
> 
> Sorry Mark I dont have the time nor the energy to go through one more useless polemic with you. 
> 
> You can check this: https://www.jfokus.se/jfokus15/preso/proxy2.pdf. 
> 
> 2016-02-12 15:55 GMT+01:00 Mark Struberg <struberg at yahoo.de>:
> I have no clue where some folks get the idea that I introduced a new concept!
> The term ‚proxy‘ is well defined both in the the whole Java universe (see java.lang.reflect.Proxy) and also got introduced in the CDI spec as early as 2008. That makes 8 years now… Wanna get rid of all that?
> 
> > it has poor performance, and
> FUD and not true anymore since ages!
> It’s an implementation detail. In OpenWebBeans we do 10 MILLION proxy invocations in 20 milliseconds on my notebook. I don’t call that slow…
> 
> LieGrue,
> strub
> 
> 
> > Am 12.02.2016 um 15:41 schrieb José Paumard <jose.paumard at gmail.com>:
> >
> > -1
> >
> > For me it looks like setting implementation details in the specification, a really wrong idea imho.
> >
> > Plus, what does "proxy" mean ? We need to define the term in the spec. Does it refer to java.lang.Proxy ? We all know that this class has been written a long time ago, it has poor performance, and has already submitted replacements based on MethodHandle and INDY.
> >
> > José
> >
> >
> > 2016-02-11 12:09 GMT+01:00 George Gastaldi <ggastald at redhat.com>:
> > +1
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
> >
> >
> >
> > --
> > Java le soir Cours Java en ligne
> > Twitter Paris JUG
> > M : +33 6 76 82 91 47
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
> 
> 
> 
> 
> -- 
> Java le soir Cours Java en ligne
> Twitter Paris JUG
> M : +33 6 76 82 91 47




More information about the cdi-dev mailing list