From hibernate-commits at lists.jboss.org Thu Nov 1 16:47:08 2007 Content-Type: multipart/mixed; boundary="===============7338050406530569096==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14170 - in core/trunk/documentation/manual/en-US/src/main/docbook: content and 1 other directory. Date: Thu, 01 Nov 2007 16:47:08 -0400 Message-ID: --===============7338050406530569096== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2007-11-01 16:47:08 -0400 (Thu, 01 Nov 2007) New Revision: 14170 Modified: core/trunk/documentation/manual/en-US/src/main/docbook/content/configura= tion.xml core/trunk/documentation/manual/en-US/src/main/docbook/legal_notice.xml Log: content cleanup Modified: core/trunk/documentation/manual/en-US/src/main/docbook/content/co= nfiguration.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/en-US/src/main/docbook/content/configur= ation.xml 2007-11-01 10:29:37 UTC (rev 14169) +++ core/trunk/documentation/manual/en-US/src/main/docbook/content/configur= ation.xml 2007-11-01 20:47:08 UTC (rev 14170) @@ -16,17 +16,16 @@ Programmatic configuration = - An instance of org.hibernate.cfg.Configuration - represents an entire set of mappings of an application's Java = types to an - SQL database. The Configuration is used to = build an - (immutable) SessionFactory. The mappings ar= e compiled - from various XML mapping files. + An instance of org.hibernate.cfg.Configuration represents an entire set of mappings + of an application's Java types to an SQL database. The org.hibernate.cfg.Configuration + is used to build an (immutable) org.hibernate.S= essionFactory. The mappings + are compiled from various XML mapping files. = - You may obtain a Configuration instance by = instantiating = - it directly and specifying XML mapping documents. If the mappi= ng files are - in the classpath, use addResource(): + You may obtain a org.hibernate.cfg.Configuration instance by instantiating + it directly and specifying XML mapping documents. If the mappi= ng files are in the classpath, + use addResource(): = = - Then Hibernate will look for mapping files named - /org/hibernate/auction/Item.hbm.xml and - /org/hibernate/auction/Bid.hbm.xml in the c= lasspath. - This approach eliminates any hardcoded filenames. + Then Hibernate will look for mapping files named /or= g/hibernate/auction/Item.hbm.xml + and /org/hibernate/auction/Bid.hbm.xml in= the classpath. This approach eliminates any + hardcoded filenames. = - A Configuration also allows you to specify = configuration + A org.hibernate.cfg.Configuration also = allows you to specify configuration properties: = @@ -69,20 +67,18 @@ - Pass an instance of java.util.Properties to + Pass an instance of java.util.Properties to Configuration.setProperties(). - Place hibernate.properties in a roo= t directory = - of the classpath. + Place a file named hibernate.properties in a root directory of the classpath. - Set System properties using - java -Dproperty=3Dvalue. + Set System properties using java -Dproperty=3Dvalue. @@ -94,12 +90,11 @@ = - hibernate.properties is the easiest approac= h if you - want to get started quickly. + hibernate.properties is the easiest appro= ach if you want to get started quickly. = - The Configuration is intended as a startup-= time object, = + The org.hibernate.cfg.Configuration is = intended as a startup-time object, to be discarded once a SessionFactory is cr= eated. = @@ -109,8 +104,8 @@ Obtaining a SessionFactory = - When all mappings have been parsed by the Configurati= on, = - the application must obtain a factory for Session instances. = + When all mappings have been parsed by the org.hiber= nate.cfg.Configuration, + the application must obtain a factory for org.h= ibernate.Session instances. This factory is intended to be shared by all application threa= ds: = @@ -118,7 +113,7 @@ = Hibernate does allow your application to instantiate more than= one - SessionFactory. This is useful if you are u= sing more than = + org.hibernate.SessionFactory. T= his is useful if you are using more than one database. = @@ -128,27 +123,26 @@ JDBC connections = - Usually, you want to have the SessionFactory create and pool JDBC = - connections for you. If you take this approach, opening a Session = + Usually, you want to have the org.hibernate.Ses= sionFactory create and pool + JDBC connections for you. If you take this approach, opening a= org.hibernate.Session is as simple as: = = - As soon as you do something that requires access to the databa= se, a JDBC connection - will be obtained from the pool. + As soon as you do something that requires access to the databa= se, a JDBC connection will be obtained from + the pool. = - For this to work, we need to pass some JDBC connection propert= ies to Hibernate. - All Hibernate property names and semantics are defined on the = class = - org.hibernate.cfg.Environment. We will now = describe the most - important settings for JDBC connection configuration. + For this to work, we need to pass some JDBC connection propert= ies to Hibernate. All Hibernate property + names and semantics are defined on the class org.hi= bernate.cfg.Environment. We will + now describe the most important settings for JDBC connection c= onfiguration. = - Hibernate will obtain (and pool) connections using ja= va.sql.DriverManager = + Hibernate will obtain (and pool) connections using = java.sql.DriverManager if you set the following properties: = @@ -166,7 +160,7 @@ - hibernate.connection.driver_class + hibernate.connection.driver_class JDBC driver class @@ -174,7 +168,7 @@ - hibernate.connection.url + hibernate.connection.url JDBC URL @@ -182,7 +176,7 @@ - hibernate.connection.username + hibernate.connection.username database user @@ -190,7 +184,7 @@ - hibernate.connection.password + hibernate.connection.password database user password @@ -198,7 +192,7 @@ - hibernate.connection.pool_size + hibernate.connection.pool_size maximum number of pooled connections @@ -213,22 +207,21 @@ It is intended to help you get started and is not in= tended for use = in a production system or even for performance test= ing. You should use a third party pool for best performance and stability. Jus= t replace the = - hibernate.connection.pool_size property wit= h connection = + hibernate.connection.pool_size property w= ith connection pool specific settings. This will turn off Hibernate's interna= l pool. For example, you might like to use C3P0. = - C3P0 is an open source JDBC connection pool distributed along = with = - Hibernate in the lib directory. Hibernate w= ill use its - C3P0ConnectionProvider for connection pooli= ng if you set = - hibernate.c3p0.* properties. If you'd like = to use Proxool - refer to the packaged hibernate.properties = and the Hibernate - web site for more information. + C3P0 is an open source JDBC connection pool distributed along = with Hibernate in the lib + directory. Hibernate will use its org.hibernate.con= nection.C3P0ConnectionProvider + for connection pooling if you set hibernate.c3p0.* properties. If you'd like to use Proxool + refer to the packaged hibernate.properties and the Hibernate web site for more + information. = - Here is an example hibernate.properties fil= e for C3P0: + Here is an example hibernate.properties f= ile for C3P0: = = - For use inside an application server, you should almost always= configure = - Hibernate to obtain connections from an application server = - Datasource registered in JNDI. You'll need = to set at - least one of the following properties: + For use inside an application server, you should almost always= configure Hibernate to obtain connections + from an application server javax.sql.Datasource= registered in JNDI. You'll + need to set at least one of the following properties: = @@ -262,7 +254,7 @@ - hibernate.connection.datasource + hibernate.connection.datasource datasource JNDI name @@ -270,7 +262,7 @@ - hibernate.jndi.url + hibernate.jndi.url URL of the JNDI provider (optiona= l) @@ -278,7 +270,7 @@ - hibernate.jndi.class + hibernate.jndi.class class of the JNDI InitialContextFac= tory (optional) @@ -286,7 +278,7 @@ - hibernate.connection.username + hibernate.connection.username database user (optional) @@ -294,7 +286,7 @@ - hibernate.connection.password + hibernate.connection.password database user password (optional) @@ -305,8 +297,8 @@
= - Here's an example hibernate.properties file= for an - application server provided JNDI datasource: + Here's an example hibernate.properties fi= le for an application server provided JNDI + datasource: = = - Arbitrary connection properties may be given by prepending - "hibernate.connection" to the property name= . For example, you - may specify a charSet using hibern= ate.connection.charSet. + Arbitrary connection properties may be given by prepending "hibernate.connection" to the + connection property name. For example, you may specify a charSet + connection property using hibernate.connection.charS= et. = You may define your own plugin strategy for obtaining JDBC con= nections by implementing the - interface org.hibernate.connection.ConnectionProvider= . You may select - a custom implementation by setting hibernate.connecti= on.provider_class. + interface org.hibernate.connection.ConnectionPr= ovider, and specifying your + custom implementation via the hibernate.connection.p= rovider_class property. = @@ -339,15 +331,14 @@ Optional configuration properties = - There are a number of other properties that control the behavi= our of Hibernate - at runtime. All are optional and have reasonable default value= s. + There are a number of other properties that control the behavi= our of Hibernate at runtime. All are optional + and have reasonable default values. = - Warning: some of these properties are "system-level" on= ly. - System-level properties can be set only via java -Dpr= operty=3Dvalue or - hibernate.properties. They may no= t be set by - the other techniques described above. + Warning: some of these properties are "system-level" on= ly. System-level properties can + be set only via java -Dproperty=3Dvalue or = hibernate.properties. They + may not be set by the other techniques de= scribed above. = @@ -364,21 +355,25 @@ - hibernate.dialect + hibernate.dialect - The classname of a Hibernate Dialect<= /literal> which = - allows Hibernate to generate SQL optimized for= a particular - relational database. + The classname of a Hibernate org.hi= bernate.dialect.Dialect which + allows Hibernate to generate SQL optimized for= a particular relational database. eg. = full.classname.of.Dialect + + In most cases Hibernate will actually be a= ble to chose the correct + org.hibernate.dialect.Dialect implementation to use based on the + JDBC metadata returned = by the JDBC driver. + - hibernate.show_sql + hibernate.show_sql Write all SQL statements to console. This is a= n alternative @@ -392,7 +387,7 @@ - hibernate.format_sql + hibernate.format_sql Pretty print the SQL in the log and console. @@ -404,7 +399,7 @@ - hibernate.default_schema + hibernate.default_schema Qualify unqualified table names with the given= schema/tablespace @@ -417,7 +412,7 @@ - hibernate.default_catalog + hibernate.default_catalog Qualify unqualified table names with the given= catalog @@ -430,10 +425,10 @@ - hibernate.session_factory_name + hibernate.session_factory_name - The SessionFactory will be = automatically + The org.hibernate.SessionFactor= y will be automatically bound to this name in JNDI after it has been c= reated. eg. = @@ -443,7 +438,7 @@ - hibernate.max_fetch_depth + hibernate.max_fetch_depth Set a maximum "depth" for the outer join fetch= tree @@ -458,7 +453,7 @@ - hibernate.default_batch_fetch_size + hibernate.default_batch_fetch_size Set a default size for Hibernate batch fetchin= g of associations. @@ -471,7 +466,7 @@ - hibernate.default_entity_mode + hibernate.default_entity_mode Set a default mode for entity representation f= or all sessions @@ -484,7 +479,7 @@ - hibernate.order_updates + hibernate.order_updates Force Hibernate to order SQL updates by the pr= imary key value @@ -498,7 +493,7 @@ - hibernate.generate_statistics + hibernate.generate_statistics If enabled, Hibernate will collect statistics = useful for @@ -511,7 +506,7 @@ - hibernate.use_identifier_rollback + hibernate.use_identifier_rollback If enabled, generated identifier properties wi= ll be @@ -524,7 +519,7 @@ - hibernate.use_sql_comments + hibernate.use_sql_comments If turned on, Hibernate will generate comments= inside the SQL, for @@ -555,7 +550,7 @@ - hibernate.jdbc.fetch_size + hibernate.jdbc.fetch_size A non-zero value determines the JDBC fetch siz= e (calls @@ -564,7 +559,7 @@ - hibernate.jdbc.batch_size + hibernate.jdbc.batch_size A non-zero value enables use of JDBC2 batch up= dates by Hibernate. @@ -576,7 +571,7 @@ - hibernate.jdbc.batch_versioned_data + hibernate.jdbc.batch_versioned_data<= /property> Set this property to true i= f your JDBC driver returns @@ -591,10 +586,10 @@ - hibernate.jdbc.factory_class + hibernate.jdbc.factory_class - Select a custom Batcher. Mo= st applications + Select a custom org.hibernate.j= dbc.Batcher. Most applications will not need this configuration property. eg. @@ -604,7 +599,7 @@ - hibernate.jdbc.use_scrollable_results= et + hibernate.jdbc.use_scrollable_result= set Enables use of JDBC2 scrollable resultsets by = Hibernate. @@ -618,12 +613,11 @@ - hibernate.jdbc.use_streams_for_binary= + hibernate.jdbc.use_streams_for_binar= y - Use streams when writing/reading bina= ry - or serializable types to/fr= om JDBC - (system-level property). + Use streams when writing/reading bina= ry or serializable + types to/from JDBC. *system-level pr= operty* eg. true | false @@ -632,7 +626,7 @@ - hibernate.jdbc.use_get_generated_keys= + hibernate.jdbc.use_get_generated_key= s Enable use of JDBC3 PreparedStatement= .getGeneratedKeys() @@ -648,11 +642,11 @@ - hibernate.connection.provider_class + hibernate.connection.provider_class<= /property> - The classname of a custom ConnectionP= rovider which provides - JDBC connections to Hibernate. + The classname of a custom org.h= ibernate.connection.ConnectionProvider + which provides JDBC connections to Hibernate. eg. = classname.of.ConnectionProvider @@ -661,12 +655,12 @@ - hibernate.connection.isolation + hibernate.connection.isolation - Set the JDBC transaction isolation level. Check - java.sql.Connection for meaning= ful values but - note that most databases do not support all isolat= ion levels. + Set the JDBC transaction isolation level. Check java.sql.Connection + for meaningful values but note that most databases= do not support all isolation levels and some + define additional, non-standard isolations. eg. = 1, 2, 4, 8 @@ -675,7 +669,7 @@ - hibernate.connection.autocommit + hibernate.connection.autocommit Enables autocommit for JDBC pooled connections= (not recommended). @@ -687,7 +681,7 @@ - hibernate.connection.release_mode + hibernate.connection.release_mode Specify when Hibernate should release JDBC con= nections. By default, = @@ -716,17 +710,17 @@ - - hibernate.connection.= <propertyName> - - - Pass the JDBC property <propertyName&= gt; - to DriverManager.getConnection(). - + + hibernate.connection.<propertyName> + + + Pass the JDBC property <propertyN= ame> + to DriverManager.getConnection(). + - hibernate.jndi.&l= t;propertyName> + hibernate.jndi.= <propertyName> Pass the property <propertyName&g= t; to Modified: core/trunk/documentation/manual/en-US/src/main/docbook/legal_noti= ce.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/en-US/src/main/docbook/legal_notice.xml= 2007-11-01 10:29:37 UTC (rev 14169) +++ core/trunk/documentation/manual/en-US/src/main/docbook/legal_notice.xml= 2007-11-01 20:47:08 UTC (rev 14170) @@ -29,7 +29,7 @@ - Copyright 2007 by Red = Hat, Inc. This material may be distributed only subject to the terms and co= nditions set forth in the Open Publication License, V1.0 or later (the late= st version is presently available at http://www.opencontent.org/openpub/). + Copyright 2007 by Red Hat, Inc. T= his material may be distributed only subject to the terms and conditions se= t forth in the Open Publication License, V1.0 or later (the latest version = is presently available at http://www.opencontent.org/openpub/). Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder. --===============7338050406530569096==--