Lessons learned – Memory leak in webservices with JAXB

After a particularly bad performance day, we took a memory dump from our systems. It seemed the garbage collection seemed to work overtime and had difficulty cleaning up after itself. We, as such, suspected a memory leak somewhere in our code. We bumped into the following code:

Now, after reading the documentation surrounding JAXB