aharvey wrote:
Our application places SessionFactory into JNDI and we've found this to be problematic for testing our business logic with JUnit. We're consider just storing SessionFactory as a static in a singleton helper class. Is there a downside to this that I am unaware of?
It's still possible to use in unit tests. Just populate context yourself.
Placing session factory in JNDI gives you advantages if you like to
be able to exchange / reconfigure session factory without restarting
web app, or share it between 2 webapps / ejb tiers / whatever