Doing local debugging of an application on TomEE 1.7.0 using JAX-RS and EJBs, after unloading, I traced back strong references via the jaxrs-field-proxy-map. Some of these got fixed in CXF 3.0 by this commit:
However, org.apache.cxf.jaxrs.model.AbstractResourceInfo's addToMap() creates a HashMap instead of a WeakHashMap, so strong references to fields still remain and prevent GC.
In order to validate fixing these issues, I also had to modify my thread pooling to see that the last remaining strong reference, via a Stateless pool thread's threadLocals, got removed:
<Container id="myStatelessContainer" type="STATELESS">
MaxSize = 0
StrictPooling = false