title: How can I create a custom NHibernate configuration property?
body: <p>I'm currently working on creating a custom connection provider for HNibernate very similar to the one mentioned <a href="https://stackoverflow.com/questions/2416813/nhibernate-and-database-connection-failover">here</a>.  In it, they specify a separate connection string within the hibernate.cfg.xml parameters.  However, when I go to add this new parameter, like so...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" &gt;
      &lt;session-factory&gt;
          &lt;property name="connection.provider"&gt;MyNameSpace.FailoverConnectionProvider&lt;/property&gt;
          &lt;property name="dialect"&gt;NHibernate.Dialect.MsSql2008Dialect,NHibernate&lt;/property&gt;
          &lt;property name="connection.driver_class"&gt;NHibernate.Driver.SqlClientDriver&lt;/property&gt;
          &lt;property name="connection.connection_string"&gt;[primary connection string]&lt;/property&gt;
          &lt;property name="connection.failover_connection_string"&gt;[failover connection string]&lt;/property&gt;
          &lt;property name="proxyfactory.factory_class"&gt;NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle&lt;/property&gt;
          ...
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>... I am treated to this exception message:</p>
  
  <pre><code>InnerException  {"The 'name' attribute is invalid - The value 'connection.failover_connection_string' is invalid according to its datatype 'String' - The Enumeration constraint failed."}  System.Exception {System.Xml.Schema.XmlSchemaValidationException}
  </code></pre>
  
  <p>My question is: is it even possible to add custom properties to the NHibernate configuration file?  If so, how?</p>
  
  <p>Thanks!</p>