rmannibucau commented on a change in pull request #721:
URL: https://github.com/apache/cxf/pull/721#discussion_r521310494



##########
File path: core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
##########
@@ -342,7 +342,10 @@ public ClassWriter createClassWriter() {
         TypeHelperClassLoader loader = getTypeHelperClassLoader(l);
         return loader.lookupDefinedClass(className);
     }
-
+    public static void addExternalClass(String className, ClassLoader l, 
Class<?> cls) {

Review comment:
       @dufoli:
   
   1. it is quarkus specific until you have the generator in cxf codebase 
(which is not the case in the pr) so it is quarkus specific ;). In other words, 
current PR is a quarkus extension point because it is feature incomplete for 
all other env and there is no real reason for that - don't get me wrong, I 
understand you got stucked and solve your issue but I think to integrate 
mainstream code it should go a bit further otherwise there is no benefit to get 
it in cxf land.
   2. you actually don't need this map, you just do a classloader.loadClass 
(take care it is not the tccl but cxf classloader, can be in bus extensions). 
Only small thing to take care is to not do it at runtime but only deploy time 
but it should already be the case (or with a lazy init pattern but only once). 
In quarkus land you just generate the class at build time and put it in runtime 
classes (as other proxies).
   3. the spi point is to avoid to have to handle ow2.asm, xbean.asm7, 
xbean.asm8, xbean.asm9 etc.
   4. to not make it global it must be in cxf bus extensions IMHO (as 
ClassUnwrapper for example). Each time a class is generated, it has a bus not 
far so it should be easy to read from there.
   
   hope it makes sense
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to