From: Gavin_King/Cirrus%<CI...@ci...> - 2002-06-13 03:04:51
|
Hi Brad >were u thinking of leaving the option to configure programmatically in? Absolutely. There will always be people who need to do things their own way. Remember we aren't making any assumptions about architecture here. >using hibernate in the container, u then need multiple configuration >files - each file needs a different name and then how do u to tell >hibernate to use the correct file for a particular app; or u need one >configuration file that can contain the configuration for each >application - hibernate still needs to be told which app it is dealing >with. Actually in what I've implemented, this is okay, I think. (depending upon exact arrangement of ClassLoaders.) You can configure multiple SessionFactorys in the same file, with different JNDI names. Then the application looks up its own SessionFactory in JNDI, specifying the correct name for that application. Otherwise, instead of calling Hibernate.configure(), perhaps we could let you call: new Configuration("my/application/hibernate.cfg.xml").configure(); but that would be for special cases. I wish this stuff was in CVS so you can have a look ... it will be there tonight :) >ideally we want to have an application's configuration all in once place >- including the configuration of third-party frameworks. to achieve >this we have writen a wrapper/utility class for hibernate that (among >other things) integrates with our application's configuration framework. I promise this code will continue to work well past version 1. Having never recieved a single complaint/suggestion for the whole Datastore/SessionFactory API, I'm quite convinced it is serving people well. Hence I have no intention of changing/removing it. peace Gavin |