From: Per L. (JIRA) <no...@at...> - 2006-05-09 12:18:28
|
configuration.setProperty("connection.url", newJdbcUrl) fails ------------------------------------------------------------- Key: HHH-1731 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1731 Project: Hibernate3 Type: Bug Components: core Versions: 3.1.2 Environment: WinXP, Tomcat 5.5, MySQL 5, Hibernate 3.1.2 Reporter: Per Lindberg Attachments: HibernateDatabase.java 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |