I'm trying to determine when a hibernate session is actually available...
At the start of my program, i'm creating a sessionfactory using the configuration params in my cfg.xml file. Thing is I've deliberately specified a non-existant database name so I can trap that error, to let the user know the database cannot be found.. The problem is , I still get a sessionfactory object and I can still call openSession() without an exception...
Do I need to make a manual
jdbc connection just to
test if the db can be found or not, or is there some property in one of the hibernate objects I can simply use...
Thanks,