brianchandotcom/liferay-portal — pull request #7820 by shuyangzhou (2012-11-23 07:33:34+00:00)
Title: LPS-31186 Preload hibernate proxy classes with PortalClassLoader to allow plugin creating hibernate proxies

This is a nasty fix, I don't like it at all, but it is the only way to prevent saving portal classloader reference in plugin territory.

I am not sure whether I included all needed classes, at runtime hibernate may dynamically load up other classes, which may cause further errors, but we could not prevent it at all. Hibernate or javassist may even change their internal class structure, then all plugins with hibernate will break.

This is the price we have to pay for classloader based security. This will cause more and more maintain headache...