Release your entities

This post elaborates on an interesting Architecture bug (was made long time ago by unmet team) and the fix for it. To sum up it’s about entities purification out of the Persistence Context overhead when you need to use them outside of the container, serialize them and send them over RMI,SOAP and other protocols to other JVMs. The Problem You may found yourself in a situation where you don’t have DTOs (for whatever strange reason), there existing object-graph is large but you need to use entity objects outside of the managed scope....

February 22, 2012 · 6 min · Alexander Holbreich