-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Using custom configuration files
PostPosted: Thu Jan 12, 2006 10:16 am 
Newbie

Joined: Thu Aug 11, 2005 5:58 pm
Posts: 6
Hi there,

I'm using NHibernate 1.0.1 frequently together with App.config based configuration. Now I would like to use a custom configuration file for a particular reason.

However, I cannot find a way to direct NHibernate to another file which I'd like to use. In log4net for example, one can use a C# attribute to point log4net to another configuration file.

The question is whether there already is such a possibility (which I missed) or whether this is a planned feature for one of the next versions.

regs,

Stephan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 10:55 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Configuration.Configure("path\\to\\my\\hibernate.cfg.xml");


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 11:04 am 
Newbie

Joined: Thu Aug 11, 2005 5:58 pm
Posts: 6
sergey wrote:
Configuration.Configure("path\\to\\my\\hibernate.cfg.xml");


ok, I understand. Could you tell me why a typical App.config and a typical hibernate.cfg.xml look so different? Imho, they should look the same, apart from the appsettings which are present in App.config?

This would make it much easier to use the same file (or the same kind of file) for both cases (let it be with App.config or with dedicated configuration loading). This is what basically confused me.

regs,

Stephan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.