dufoli commented on a change in pull request #721:
URL: https://github.com/apache/cxf/pull/721#discussion_r532486696
##########
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:
I have start to code something for that.
1) I think that it can be used on cxf side too by having a tool like the
wsdl2java tool but to pregenerate all classes.
2) I have code something with start and restore to save all class bytes and
classNames. and restore but my issue with the 2 maps (always them).
For CLASS_MAP, I can store the key classname and restore must find original
class so I think to Class.forName but not sur it will work.
summary :
```java
public interface ClassGeneratorCapture {
void save(String className, Class<?> cls, byte[] bytes);
Map<? extends Class<?>,? extends
WeakReference<ClassGeneratorClassLoader.TypeHelperClassLoader>> getClassMap();
Map<? extends ClassLoader,? extends
WeakReference<ClassGeneratorClassLoader.TypeHelperClassLoader>> getLoaderMap();
}
```
So previously loaded side will change.
Because Instead of inherit of GeneratedClassClassLoader, I will inherit to
ClassGeneratorClassLoader (same as generation part). It is more consistent but
restore of classloader map is not doable I think. I need to see if we can move
all to class map
----------------------------------------------------------------
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]