Hi A couple of issues has been reported recently against JAXBElementProvider, to do with various ClassLoader related issues.
All of them are to do with CXF libs being located in the shared lib folder of the (servlet) container. JAXBElementProvider strongly references class-level and package JAXBContexts in a static map. Thus it's effectively shared across multiple web apps. WeakHashMap was used initially but it was reported that it was causing the excessive GB activity with a lot of requests coming in. I can see JAXBDataBinding uses a CachedMap. Does it work with CXF libs located in the shared folder ? JAXBProvider uses : private static Map<String, JAXBContext> packageContexts = new HashMap<String, JAXBContext>(); private static Map<Class<?>, JAXBContext> classContexts = new HashMap<Class<?>, JAXBContext>(); private static Map<Package, JAXBContext> packageContexts = new HashMap<Package, JAXBContext>(); will probably fix an issue like https://issues.apache.org/jira/browse/CXF-3339 at the cost of duplicating the JAXBContext for a given package (the patch is going to work too) but may cause an issue with reloading the same war : https://issues.apache.org/jira/browse/CXF-2939. I'm going to do some investigation during the next couple of weeks, but would appreciate some advice in meantime... thanks, Sergey
