From: Michael D. <mik...@us...> - 2005-01-02 18:04:37
|
Update of /cvsroot/nhibernate/nhibernate/doc/reference/en/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24832 Modified Files: configuration.xml Log Message: More documentation about the various configuration settings. Index: configuration.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/doc/reference/en/modules/configuration.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configuration.xml 30 Dec 2004 16:38:51 -0000 1.2 --- configuration.xml 2 Jan 2005 18:04:21 -0000 1.3 *************** *** 197,207 **** <tbody> <row> <entry> <literal>hibernate.connection.driver_class</literal> </entry> <entry> ! Implementation of <literal>NHibernate.Driver.IDriver</literal> interface ! that NHibernate will use to get the implementation of IDbConnection ! , IDbCommand, and IDbDataParameter. </entry> </row> --- 197,225 ---- <tbody> <row> + <entry> + <literal>hibernate.connection.provider_class</literal> + </entry> + <entry> + The type of a custom <literal>IConnectionProvider</literal>. + <para> + <emphasis role="strong">eg.</emphasis> + <literal>full.classname.of.ConnectionProvider</literal> if the Provider + is built into NHibernate, or <literal>full.classname.of.ConnectionProvider, + assembly</literal> if using an implementation of IConnectionProvider not + included in NHibernate. + </para> + </entry> + </row> + <row> <entry> <literal>hibernate.connection.driver_class</literal> </entry> <entry> ! The type of a custom <literal>IDriver</literal>. ! <para> ! <literal>full.classname.of.Driver</literal> if the Driver ! is built into NHibernate, or <literal>full.classname.of.Driver, assembly</literal> ! if using an implementation of IDriver not included in NHibernate. ! </para> </entry> </row> *************** *** 214,218 **** </entry> </row> ! </tbody> </tgroup> </table> --- 232,250 ---- </entry> </row> ! <row> ! <entry> ! <literal>hibernate.connection.isolation</literal> ! </entry> ! <entry> ! Set the ADO.NET transaction isolation level. Check ! <literal>System.Data.IsolationLevel</literal> for meaningful values ! and the database's documentation to ensure that level is supported. ! <para> ! <emphasis role="strong">eg.</emphasis> ! <literal>Chaos, ReadCommitted, ReadUncommitted, RepeatableRead, Serializable, Unspecified </literal> ! </para> ! </entry> ! </row> ! </tbody> </tgroup> </table> *************** *** 254,268 **** </nhibernate> ! <!-- log4net and other app specific config follows --> </configuration> ]]></programlisting> - - <para> - You may define your own plugin strategy for obtaining ADO.NET connections by implementing the - interface <literal>NHibernate.Connection.IConnectionProvider</literal>. You may select - a custom implementation by setting <literal>hibernate.connection.provider_class</literal>. - </para> - </sect1> --- 286,293 ---- </nhibernate> ! <!-- log4net (required by NHibernate) and other app specific config follows --> </configuration> ]]></programlisting> </sect1> *************** *** 296,300 **** <para> <emphasis role="strong">eg.</emphasis> ! <literal>full.classname.of.Dialect</literal> </para> </entry> --- 321,327 ---- <para> <emphasis role="strong">eg.</emphasis> ! <literal>full.classname.of.Dialect</literal> if a Dialect built into ! NHibernate, or <literal>full.classname.of.Dialect, assembly</literal> ! if using an implementation of Dialect not included in NHibernate. </para> </entry> *************** *** 315,326 **** <row> <entry> ! <literal>hibernate.session_factory_name</literal> </entry> <entry> ! The <literal>SessionFactory</literal> will be automatically ! bound to this name after it has been created. <para> <emphasis role="strong">eg.</emphasis> ! <literal>some.name</literal> </para> </entry> --- 342,352 ---- <row> <entry> ! <literal>hibernate.prepare_sql</literal> </entry> <entry> ! Enables preparing of sql statements. <para> <emphasis role="strong">eg.</emphasis> ! <literal>true</literal> | <literal>false</literal> </para> </entry> *************** *** 328,364 **** <row> <entry> ! <literal>hibernate.use_outer_join</literal> </entry> <entry> ! Enables outer join fetching. <para> <emphasis role="strong">eg.</emphasis> ! <literal>true</literal> | <literal>false</literal> </para> </entry> </row> <row> - <entry> - <literal>hibernate.connection.isolation</literal> - </entry> - <entry> - Set the ADO.NET transaction isolation level. Check - <literal>System.Data.IsolationLevel</literal> for meaningful values but - note that most databases do not support all isolation levels. - <para> - <emphasis role="strong">eg.</emphasis> - <literal>Chaos, ReadCommitted, ReadUncommitted, RepeatableRead, Serializable, Unspecified </literal> - </para> - </entry> - </row> - <row> <entry> ! <literal>hibernate.connection.provider_class</literal> </entry> <entry> ! The type of a custom <literal>ConnectionProvider</literal>. <para> <emphasis role="strong">eg.</emphasis> ! <literal>typename.of.ConnectionProvider</literal> </para> </entry> --- 354,377 ---- <row> <entry> ! <literal>hibernate.session_factory_name</literal> </entry> <entry> ! The <literal>SessionFactory</literal> will be automatically ! bound to this name after it has been created. <para> <emphasis role="strong">eg.</emphasis> ! <literal>some.name</literal> </para> </entry> </row> <row> <entry> ! <literal>hibernate.use_outer_join</literal> </entry> <entry> ! Enables outer join fetching. <para> <emphasis role="strong">eg.</emphasis> ! <literal>true</literal> | <literal>false</literal> </para> </entry> *************** *** 372,376 **** <para> <emphasis role="strong">eg.</emphasis> ! <literal>typename.of.CacheProvider</literal> </para> </entry> --- 385,391 ---- <para> <emphasis role="strong">eg.</emphasis> ! <literal>full.classname.of.CacheProvider</literal> if the ICacheProvider is ! built into NHibernate, or <literal>full.classname.of.CacheProvider, assembly</literal> ! if using an implementation of ICacheProvider not included in NHibernate. </para> </entry> *************** *** 405,411 **** </table> ! <!-- resume at <sect2 id="configuration-optional-dialects"> --> </sect1> </chapter> \ No newline at end of file --- 420,587 ---- </table> ! <sect2 id="configuration-optional-dialects"> ! <title>SQL Dialects</title> ! ! <para> ! You should always set the <literal>hibernate.dialect</literal> property to the correct ! <literal>NHibernate.Dialect.Dialect</literal> subclass for your database. This is not ! strictly essential unless you wish to use <literal>native</literal> or ! <literal>sequence</literal> primary key generation or pessimistic locking (with, eg. ! <literal>ISession.Lock()</literal> or <literal>IQuery.SetLockMode()</literal>). ! However, if you specify a dialect, NHibernate will use sensible defaults for some of the ! other properties listed above, saving you the effort of specifying them manually. ! </para> ! ! <table frame="topbot" id="sql-dialects" revision="2"> ! <title>NHibernate SQL Dialects (<literal>hibernate.dialect</literal>)</title> ! <tgroup cols="2"> ! <colspec colwidth="1*"/> ! <colspec colwidth="2.5*"/> ! <thead> ! <row> ! <entry>RDBMS</entry> ! <entry>Dialect</entry> ! </row> ! </thead> ! <tbody> ! <row> ! <entry>DB2</entry> ! <entry><literal>NHibernate.Dialect.DB2Dialect</literal></entry> ! </row> ! <row> ! <entry>PostgreSQL</entry> ! <entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry> ! </row> ! <row> ! <entry>MySQL</entry> ! <entry><literal>NHibernate.Dialect.MySQLDialect</literal></entry> ! </row> ! <row> ! <entry>Oracle (any version)</entry> ! <entry><literal>NHibernate.Dialect.OracleDialect</literal></entry> ! </row> ! <row> ! <entry>Oracle 9/10g</entry> ! <entry><literal>NHibernate.Dialect.Oracle9Dialect</literal></entry> ! </row> ! <row> ! <entry>Sybase</entry> ! <entry><literal>NHibernate.Dialect.SybaseDialect</literal></entry> ! </row> ! <row> ! <entry>Microsoft SQL Server 2000</entry> ! <entry><literal>NHibernate.Dialect.MsSql2000Dialect</literal></entry> ! </row> ! <row> ! <entry>Microsoft SQL Server 7</entry> ! <entry><literal>NHibernate.Dialect.MsSql7Dialect</literal></entry> ! </row> ! <row> ! <entry>Firebird</entry> ! <entry><literal>NHibernate.Dialect.FirebirdDialect</literal></entry> ! </row> ! </tbody> ! </tgroup> ! </table> ! ! </sect2> ! ! <sect2 id="configuration-optional-outerjoin"> ! <title>Outer Join Fetching</title> ! ! <para> ! If your database supports ANSI or Oracle style outer joins, <emphasis>outer join ! fetching</emphasis> might increase performance by limiting the number of round ! trips to and from the database (at the cost of possibly more work performed by ! the database itself). Outer join fetching allows a graph of objects connected ! by many-to-one, one-to-many or one-to-one associations to be retrieved in a single ! SQL <literal>SELECT</literal>. ! </para> ! ! <para> ! By default, the fetched graph when loading an objects ends at leaf objects, ! collections, objects with proxies, or where circularities occur. ! </para> ! ! <para> ! For a <emphasis>particular association</emphasis>, fetching may be enabled ! or disabled (and the default behaviour overridden) by setting the ! <literal>outer-join</literal> attribute in the XML mapping. ! </para> ! ! <para> ! Outer join fetching may be disabled <emphasis>globally</emphasis> by setting ! the property <literal>hibernate.use_outer_join </literal> to <literal>false</literal>. ! A setting of <literal>true</literal> enables outer join fetching for ! all one-to-one and many-to-one associations, which are, also by default, set ! to <literal>auto</literal> outer join. However, one-to-many associations and ! collections are never fetched with an outer-join, unless explicitly declared ! for each particular association. This behavior can also be overriden at runtime ! with Hibernate queries. ! </para> ! ! </sect2> ! ! <sect2 id="configuration-optional-cacheprovider"> ! <title>Custom <literal>CacheProvider</literal></title> ! ! <para> ! You may integrate a second-level cache system by ! implementing the interface <literal>NHibernate.Cache.ICacheProvider</literal>. ! You may select the custom implementation by setting ! <literal>hibernate.cache.provider_class</literal>. ! </para> ! ! </sect2> ! ! <sect2 id="configuration-optional-querysubstitution"> ! <title>Query Language Substitution</title> ! ! <para> ! You may define new Hibernate query tokens using <literal>hibernate.query.substitutions</literal>. ! For example: ! </para> ! ! <programlisting>hibernate.query.substitutions true=1, false=0</programlisting> ! ! <para> ! would cause the tokens <literal>true</literal> and <literal>false</literal> to be translated to ! integer literals in the generated SQL. ! </para> ! ! <programlisting>hibernate.query.substitutions toLowercase=LOWER</programlisting> ! ! <para> ! would allow you to rename the SQL <literal>LOWER</literal> function. ! </para> ! ! </sect2> ! </sect1> + + <sect1 id="configuration-logging"> + <title>Logging</title> + + <para> + NHibernate logs various events using Apache log4net. + </para> + <para> + You may download log4net from <literal>http://logging.apache.org/log4net/</literal>. + To use log4net you will need a log4net configuration section in the app.config + or web.config. An example of the configuration section is distributed with + NHibernate in the <literal>src/NHibernate.Test</literal> project. + </para> + + <para> + We strongly recommend that you familiarize yourself with NHibernate's log + messages. A lot of work has been put into making the NHibernate log as + detailed as possible, without making it unreadable. It is an essential + troubleshooting device. + </para> + + </sect1> + + <!-- resume at <sect1 id="configuration-xmlconfig"> --> </chapter> \ No newline at end of file |