It appears that, after
Configuration configuration = new Configuration().configure(cfgFileName);
sessionFactory = configuration.buildSessionFactory()
the JDBC Connection URL can't be changed with
Trying to do so causes configuration.getProperty to return the new value,
but the SessionFactory gets confused and appears to use the old value.
I have the impression that configure(cfgFileName) sets the properties
of the Configuration in some "hard" way, so that later calls to setProperty
are mostly ignored (except that getProperty returns the new value).
The attached file attempts to do this, and fails.
WinXP, Tomcat 5.5, MySQL 5, Hibernate 3.1.2