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



##########
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:
       I do not get the point that this is quarkus specific 
   1. indeed it is not quarkus specific but graal specific because can be used 
by spring boot too. Or any system which can provide class directly to avoid 
class generation. Anyway, It was the other proposition in the jira. But I found 
that less intrusive. The issue if I do so, I will have to do it for more class 
(wrapper helper, exception,...) which are generated. That s why I choose this 
solution.
   
   2.  If I understand correctly, I create a class factory proxy static which 
provide creator which return Class<T> and if not in Map<String, Class<?>> . and 
each time, AsmHelper is used, I add this ProxyClassFactory in between. And in 
my code I just call ProxyClassFactory.getProxies().put(...);
   
   Sorry, I do not know what you mean by "SPI set as cxf bus extension" ?
   Do you mean, adding interface and implementation in bus-extensions.txt and 
adding interface for ASMHelper and inherit ASMHelper an implemtnation for each 
asm version in getASMClass ?
   It seems a big refactoring and not related to the proxy need for quarkus ?
   I agree that static class is not a good solution for ASMHelper and it is 
better to have factory pattern but I need a little help on that to have more 
explanation to respect the cxf pattern (bus-extensions.txt and factory). Do you 
have any document / guide ?




----------------------------------------------------------------
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