Need a good reason not to look at OSGi? Then just consider the fact that using Hibernate (or anything that does dynamic classloading) will fail unless you provide some obscure workaround, which you’ll probably regret later on – and which will probably also block all the advantages of actually using OSGi. Does that suck? Yes.
There are some problems with using Hibernate with OSGi, mostly centred around the assumptions it makes about class visibility which break down in a modular environment. However, rather than resorting to obscure workarounds, you can use SpringSource dm Server where Hibernate just works without the need to do anything special in your application code.
If you’re interested in seeing more, we have a version of our PetClinic sample application that uses Hibernate. You can find the sample and dm Server at http://www.springsource.org/dmserver.
Andy Wilkinson
SpringSource