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



##########
File path: 
rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperNamespaceClassGeneratorTest.java
##########
@@ -119,5 +126,170 @@ public void testForXmlList() throws Exception {
         assertTrue("The generated response wrapper class is not correct", 
bout.toString().contains(expected));
 
     }
+    public class CustomClassLoader extends ClassLoader {

Review comment:
       If it moves to services it does not need the weak reference since the 
classloader life time will be the bus lifetime.
   Can need a destroy() callback called when the bus is destroyed (don't recall 
if extensions can implement autocloseable but can be an option, worse case you 
can add a bus lifecycle listener to call it from the listener when getting the 
bus instance).
   I'm also pretty sure it does not need to be in the contract, contract only 
needs Map<String, byte[]> to export the generated classes.
   Internally the generator class can use a map of classloaders but it must not 
leak outside the implementation IMHO.
   Typically for build time generation, most flat classpath deployments - 
including quarkus - it willl not be needed and will just make it more complex 
with no real gain for end user and our integration code. 
   
   About how to generate, I spoke earlier of doing a new mojo to complete the 
e2e feature, think it still makes sense (ensure to extract in a "tool" class 
what you need in your quarkus build step so can be a Runnable which will be 
called in the mojo and your build step) but I don't think it should be merged 
to any existing mojo. It should be usable "alone" probably.
   
   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