-->
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: Config Files
PostPosted: Wed Jan 06, 2010 1:31 pm 
Newbie

Joined: Wed Jan 06, 2010 1:12 pm
Posts: 2
Hi,

Is there any way of putting the NHibernate config section - normally found in the web.config file - into another file?

Thanks in advance,

Ryan, UK


Top
 Profile  
 
 Post subject: Re: Config Files
PostPosted: Sat Jan 23, 2010 6:45 am 
Newbie

Joined: Tue Jan 05, 2010 12:15 pm
Posts: 9
Instead of
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
  </configSections>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
...
  </hibernate-configuration>
</configuration>


you can use
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="hibernate-configuration"type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
  </configSections>
  <hibernate-configuration configSource="hibernate.config"/>
</configuration>

and provide a file (hibernate.config) with
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
...
</hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: Config Files
PostPosted: Thu Jan 28, 2010 9:28 am 
Newbie

Joined: Wed Jan 06, 2010 1:12 pm
Posts: 2
That's the exact answer I was looking for! It works perfectly. Thankyou very much!


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.