| I'm not (yet at least) using hibernate-osgi and this is one is not about proxies, but you could ask if this is really the concern of Hibernate core or should this be simplified by letting Aries/Hibernate OSGi deal with this alone. What I first observed was that classPool prefilling was done only halfways so I fixed that first with my original patch. I should have been asking myself why this had to be done in the first place. I'm now mimicking the PersistenceUnitInfo.getNewTempClassLoader that has proper visibility to both hibernate internals and persistence unit so now the original patch has sort of lost it's value. Before closing this issue I hope that you consider to do something about the loadCtClassFromClass. The test branch at least contains a coherent way of dealing with the loading, but I guess one could live without the method completely. The current approach lead me to believe that there is something wrong in the hibernate internals. |