That's a good decidion, but it doesn't fit either. I'll explain situation. I have a webapp that uses main configuration file to work with MS SQL server. And I have a test method that is supposed to use an in-memory database (HSQL DB) to test some queries. But when I create configuration instnace (new Configuration()), it loads the main config file and throws some exceptions because environment doesn't contain necessary settings.
That's the reason I need to load _only_ my configuration file.
max wrote:
well, put the properties in a cfg.xml and use one of the methods to load it explicitly and it will override settings in global defined hibernate.properties