wolli wrote:
Hi Dmitry, I also have a windows service that uses hibernate and I use App.config. Do you have separate projects for your service and the "domain logic" ? I think in that case you have to add the App.config to your service project, not the project you call Configure() in.
Hi, Wolfgang! Thank you for your reply :)
Actually, what I have is as follows:
1. a class NHLogEntry which, as far as I understand, is a persistent class in terms of NH. The NHLogEntry lives in a separate project with the same name.
2. an auto-generated class (Log) which is in fact an
ICE adapter responsible for acquiring log data from clients, instantiating NHLogEntry instances with data received and storing that data via NH using the NHLogEntry instances.
App.Config file is compiled in the NHLogEntry project. I did try compile it into the Log project as well but in vain - no result. As soon as ICE run-time instantiates the Log class the NH starts looking for the hibernate.cfg.xml file totally ignoring the App.Config.
I'm looking, actually, for another way of configuring the NH - not via a compiled-in xml files...
Regards,
Dmitry.