From: <tu...@us...> - 2003-04-26 20:42:08
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv30978/src Modified Files: session_configuration.xml Log Message: Fixed intendation and added JNDI tip Index: session_configuration.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/session_configuration.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** session_configuration.xml 22 Apr 2003 11:11:36 -0000 1.10 --- session_configuration.xml 26 Apr 2003 20:42:04 -0000 1.11 *************** *** 508,515 **** </tgroup> </table> ! ! <sect2 id="session-configuration-s5-1"> ! <title>SQL Dialects</title> ! <para> You should always set the <literal>hibernate.dialect</literal> property to the correct --- 508,515 ---- </tgroup> </table> ! ! <sect2 id="session-configuration-s5-1"> ! <title>SQL Dialects</title> ! <para> You should always set the <literal>hibernate.dialect</literal> property to the correct *************** *** 590,596 **** </sect2> ! <sect2 id="session-configuration-s5-2"> ! <title>Outer Join Fetching</title> ! <para> If your database supports ANSI or Oracle style outerjoins, <emphasis>outer join --- 590,596 ---- </sect2> ! <sect2 id="session-configuration-s5-2"> ! <title>Outer Join Fetching</title> ! <para> If your database supports ANSI or Oracle style outerjoins, <emphasis>outer join *************** *** 601,635 **** The fetched graph ends at leaf objects, objects with proxies or where circular references occur. This behaviour may be disabled for a particular association ! by setting <literal>outer-join="false"</literal>. </para> ! ! </sect2> ! ! <sect2 id="session-configuration-s5-3"> ! <title>Binary Streams</title> ! <para> Oracle limits the size of <literal>byte</literal> arrays that may be passed to/from its JDBC driver. If you wish to use large instances of ! <literal>binary</literal> or <literal>serializable</literal> type, you should enable <literal>hibernate.jdbc.use_streams_for_binary</literal>. <emphasis>This is a JVM-level setting only.</emphasis> </para> ! </sect2> - <sect2 id="session-configuration-s5-4"> - <title>SQL Logging to Console</title> - <para> ! <literal>hibernate.show_sql</literal> forces Hibernate to write SQL statements to the console. This is provided as an easy alternative to enabling logging. </para> ! </sect2> - <sect2 id="session-configuration-s5-5"> - <title>Custom <literal>ConnectionProvider</literal></title> - <para> ! You may define your own plugin strategy for obtaining JDBC connections by implementing the interface <literal>net.sf.hibernate.connection.ConnectionProvider</literal>. --- 601,634 ---- The fetched graph ends at leaf objects, objects with proxies or where circular references occur. This behaviour may be disabled for a particular association ! by setting <literal>outer-join="false"</literal> in the XML mapping metadata. </para> ! </sect2> ! ! <sect2 id="session-configuration-s5-3"> ! <title>Binary Streams</title> ! <para> Oracle limits the size of <literal>byte</literal> arrays that may be passed to/from its JDBC driver. If you wish to use large instances of ! <literal>binary</literal> or <literal>serializable</literal> type, you should enable <literal>hibernate.jdbc.use_streams_for_binary</literal>. <emphasis>This is a JVM-level setting only.</emphasis> </para> ! </sect2> ! ! <sect2 id="session-configuration-s5-4"> ! <title>SQL Logging to Console</title> <para> ! <literal>hibernate.show_sql</literal> forces Hibernate to write SQL statements to the console. This is provided as an easy alternative to enabling logging. </para> ! </sect2> ! ! <sect2 id="session-configuration-s5-5"> ! <title>Custom <literal>ConnectionProvider</literal></title> <para> ! You may define your own plugin strategy for obtaining JDBC connections by implementing the interface <literal>net.sf.hibernate.connection.ConnectionProvider</literal>. *************** *** 637,752 **** <literal>hibernate.connection.provider_class</literal>. </para> ! </sect2> ! <sect2 id="session-configuration-s5-6"> ! <title>Transaction Strategy</title> ! ! <para> ! If you wish to use the Hibernate <literal>Transaction</literal> API, you must ! specify a factory class for <literal>Transaction</literal> instances by ! setting the property <literal>hibernate.transaction.factory_class</literal>. ! There are two standard (built-in) choices: ! <variablelist spacing="compact"> ! <varlistentry> ! <term><literal>net.sf.hibernate.transaction.JDBCTransactionFactory</literal></term> ! <listitem> ! <para>delegates to database (JDBC) transactions</para> ! </listitem> ! </varlistentry> ! <varlistentry> ! <term><literal>net.sf.hibernate.transaction.JTATransactionFactory</literal></term> ! <listitem> ! <para>delegates to JTA (if an existing transaction is underway, the <literal>Session</literal> ! performs its work in that context, otherwise a new transaction is started)</para> ! </listitem> ! </varlistentry> ! </variablelist> ! </para> ! <para> ! You may also define your own transaction strategies (for a CORBA transaction service, ! for example). ! </para> ! <para> ! If you wish to use JVM-level caching of mutable data in a JTA environment, you must specify ! a strategy for obtaining the JTA <literal>TransactionManager</literal>. ! </para> ! <table frame="all"> ! <title>JTA TransactionManagers</title> ! <tgroup cols="2"> ! <colspec colwidth="2.5*"/> ! <colspec colwidth="1*"/> ! <thead> ! <row> ! <entry>Transaction Factory</entry> ! <entry align="center">Application Server</entry> ! </row> ! </thead> ! <tbody> ! <row> ! <entry><literal>net.sf.hibernate.transaction.JBossTransactionManagerLookup</literal></entry> ! <entry align="center">JBoss</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry> ! <entry align="center">Weblogic</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry> ! <entry align="center">WebSphere</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.OrionTransactionManagerLookup</literal></entry> ! <entry align="center">Orion</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.ResinTransactionManagerLookup</literal></entry> ! <entry align="center">Resin</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry> ! <entry align="center">JRun4</entry> ! </row> ! </tbody> ! </tgroup> ! </table> </sect2> - - <sect2 id="session-configuration-s5-7"> - <title>JNDI-bound <literal>SessionFactory</literal></title> - - - <para> - If you wish to have the <literal>SessionFactory</literal> bound to a JNDI namespace, specify - a name (eg. <literal>hibernate/session_factory</literal>) as using the property - <literal>hibernate.session_factory_name</literal>. Then EJBs, for example, may obtain the - <literal>SessionFactory</literal> using a JNDI lookup. Hibernate will use - <literal>hibernate.jndi.url</literal>, <literal>hibernate.jndi.class</literal> to instantiate - an initial context. - </para> - </sect2> - - <sect2 id="session-configuration-s5-8"> - <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> --- 636,761 ---- <literal>hibernate.connection.provider_class</literal>. </para> ! </sect2> ! <sect2 id="session-configuration-s5-6"> ! <title>Transaction Strategy</title> ! <para> ! If you wish to use the Hibernate <literal>Transaction</literal> API, you must ! specify a factory class for <literal>Transaction</literal> instances by ! setting the property <literal>hibernate.transaction.factory_class</literal>. ! There are two standard (built-in) choices: ! <variablelist spacing="compact"> ! <varlistentry> ! <term><literal>net.sf.hibernate.transaction.JDBCTransactionFactory</literal></term> ! <listitem> ! <para>delegates to database (JDBC) transactions</para> ! </listitem> ! </varlistentry> ! <varlistentry> ! <term><literal>net.sf.hibernate.transaction.JTATransactionFactory</literal></term> ! <listitem> ! <para>delegates to JTA (if an existing transaction is underway, the <literal>Session</literal> ! performs its work in that context, otherwise a new transaction is started)</para> ! </listitem> ! </varlistentry> ! </variablelist> ! </para> ! <para> ! You may also define your own transaction strategies (for a CORBA transaction service, ! for example). ! </para> ! <para> ! If you wish to use JVM-level caching of mutable data in a JTA environment, you must specify ! a strategy for obtaining the JTA <literal>TransactionManager</literal>. ! </para> ! ! <table frame="all"> ! <title>JTA TransactionManagers</title> ! <tgroup cols="2"> ! <colspec colwidth="2.5*"/> ! <colspec colwidth="1*"/> ! <thead> ! <row> ! <entry>Transaction Factory</entry> ! <entry align="center">Application Server</entry> ! </row> ! </thead> ! <tbody> ! <row> ! <entry><literal>net.sf.hibernate.transaction.JBossTransactionManagerLookup</literal></entry> ! <entry align="center">JBoss</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry> ! <entry align="center">Weblogic</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry> ! <entry align="center">WebSphere</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.OrionTransactionManagerLookup</literal></entry> ! <entry align="center">Orion</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.ResinTransactionManagerLookup</literal></entry> ! <entry align="center">Resin</entry> ! </row> ! <row> ! <entry><literal>net.sf.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry> ! <entry align="center">JRun4</entry> ! </row> ! </tbody> ! </tgroup> ! </table> </sect2> ! <sect2 id="session-configuration-s5-7"> ! <title>JNDI-bound <literal>SessionFactory</literal></title> ! ! <para> ! If you wish to have the <literal>SessionFactory</literal> bound to a JNDI namespace, specify ! a name (eg. <literal>java:comp/env/hibernate/SessionFactory</literal>) as using the property ! <literal>hibernate.session_factory_name</literal>. ! </para> ! ! <para> ! If the attribute or property is omitted, the <literal>SessionFactory</literal> will not be ! bound to JNDI, this is especially useful in environments with a read-only JNDI default ! implementation, ie. Tomcat. ! </para> ! ! <para> ! If you use JNDI, EJBs or any other utility class may obtain the <literal>SessionFactory</literal> ! using a JNDI lookup. Hibernate will use <literal>hibernate.jndi.url</literal>, ! <literal>hibernate.jndi.class</literal> to instantiate an initial context. ! </para> ! ! </sect2> ! ! <sect2 id="session-configuration-s5-8"> ! <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> *************** *** 772,776 **** <!-- a SessionFactory instance listed as /jndi/name --> ! <session-factory name="/jndi/name"> <!-- properties --> --- 781,785 ---- <!-- a SessionFactory instance listed as /jndi/name --> ! <session-factory name="java:comp/env/hibernate/SessionFactory"> <!-- properties --> |