configuration.setProperty("connection.url", newJdbcUrl) fails

Description

It appears that, after

Configuration configuration = new Configuration().configure(cfgFileName);

but before

new SchemaExport(configuration).create(false,true);
sessionFactory = configuration.buildSessionFactory()

the JDBC Connection URL can't be changed with

configuration.setProperty("connection.url", newJdbcUrl)

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.

Environment

WinXP, Tomcat 5.5, MySQL 5, Hibernate 3.1.2

Attachments

Assignee

Unassigned

Reporter

PerP

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure