⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configuration.pot

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 POT
📖 第 1 页 / 共 4 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""POT-Creation-Date: 2007-10-19 10:31-0500\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#: configuration.xml:5(title) msgid "Configuration"msgstr ""#: configuration.xml:7(para) msgid "Because Hibernate is designed to operate in many different environments, there are a large number of configuration parameters. Fortunately, most have sensible default values and Hibernate is distributed with an example <literal>hibernate.properties</literal> file in <literal>etc/</literal> that shows the various options. Just put the example file in your classpath and customize it."msgstr ""#: configuration.xml:16(title) msgid "Programmatic configuration"msgstr ""#: configuration.xml:18(para) msgid "An instance of <literal>org.hibernate.cfg.Configuration</literal> represents an entire set of mappings of an application's Java types to an SQL database. The <literal>Configuration</literal> is used to build an (immutable) <literal>SessionFactory</literal>. The mappings are compiled from various XML mapping files."msgstr ""#: configuration.xml:26(para) msgid "You may obtain a <literal>Configuration</literal> instance by instantiating it directly and specifying XML mapping documents. If the mapping files are in the classpath, use <literal>addResource()</literal>:"msgstr ""#: configuration.xml:36(para) msgid "An alternative (sometimes better) way is to specify the mapped class, and let Hibernate find the mapping document for you:"msgstr ""#: configuration.xml:45(para) msgid "Then Hibernate will look for mapping files named <literal>/org/hibernate/auction/Item.hbm.xml</literal> and <literal>/org/hibernate/auction/Bid.hbm.xml</literal> in the classpath. This approach eliminates any hardcoded filenames."msgstr ""#: configuration.xml:52(para) msgid "A <literal>Configuration</literal> also allows you to specify configuration properties:"msgstr ""#: configuration.xml:64(para) msgid "This is not the only way to pass configuration properties to Hibernate. The various options include:"msgstr ""#: configuration.xml:71(para) msgid "Pass an instance of <literal>java.util.Properties</literal> to <literal>Configuration.setProperties()</literal>."msgstr ""#: configuration.xml:77(para) msgid "Place <literal>hibernate.properties</literal> in a root directory of the classpath."msgstr ""#: configuration.xml:83(para) msgid "Set <literal>System</literal> properties using <literal>java -Dproperty=value</literal>."msgstr ""#: configuration.xml:89(para) msgid "Include <literal>&lt;property&gt;</literal> elements in <literal>hibernate.cfg.xml</literal> (discussed later)."msgstr ""#: configuration.xml:96(para) msgid "<literal>hibernate.properties</literal> is the easiest approach if you want to get started quickly."msgstr ""#: configuration.xml:101(para) msgid "The <literal>Configuration</literal> is intended as a startup-time object, to be discarded once a <literal>SessionFactory</literal> is created."msgstr ""#: configuration.xml:109(title) msgid "Obtaining a SessionFactory"msgstr ""#: configuration.xml:111(para) msgid "When all mappings have been parsed by the <literal>Configuration</literal>, the application must obtain a factory for <literal>Session</literal> instances. This factory is intended to be shared by all application threads:"msgstr ""#: configuration.xml:119(para) msgid "Hibernate does allow your application to instantiate more than one <literal>SessionFactory</literal>. This is useful if you are using more than one database."msgstr ""#: configuration.xml:128(title) msgid "JDBC connections"msgstr ""#: configuration.xml:130(para) msgid "Usually, you want to have the <literal>SessionFactory</literal> create and pool JDBC connections for you. If you take this approach, opening a <literal>Session</literal> is as simple as:"msgstr ""#: configuration.xml:138(para) msgid "As soon as you do something that requires access to the database, a JDBC connection will be obtained from the pool."msgstr ""#: configuration.xml:143(para) msgid "For this to work, we need to pass some JDBC connection properties to Hibernate. All Hibernate property names and semantics are defined on the class <literal>org.hibernate.cfg.Environment</literal>. We will now describe the most important settings for JDBC connection configuration."msgstr ""#: configuration.xml:150(para) msgid "Hibernate will obtain (and pool) connections using <literal>java.sql.DriverManager</literal> if you set the following properties:"msgstr ""#: configuration.xml:156(title) msgid "Hibernate JDBC Properties"msgstr ""#: configuration.xml:162(entry) configuration.xml:258(entry) configuration.xml:360(entry) configuration.xml:551(entry) configuration.xml:747(entry) configuration.xml:854(entry) configuration.xml:942(entry) msgid "Property name"msgstr ""#: configuration.xml:163(entry) configuration.xml:259(entry) configuration.xml:361(entry) configuration.xml:552(entry) configuration.xml:748(entry) configuration.xml:855(entry) configuration.xml:943(entry) msgid "Purpose"msgstr ""#: configuration.xml:169(literal) msgid "hibernate.connection.driver_class"msgstr ""#: configuration.xml:172(emphasis) msgid "JDBC driver class"msgstr ""#: configuration.xml:177(literal) msgid "hibernate.connection.url"msgstr ""#: configuration.xml:180(emphasis) msgid "JDBC URL"msgstr ""#: configuration.xml:185(literal) configuration.xml:289(literal) msgid "hibernate.connection.username"msgstr ""#: configuration.xml:188(emphasis) configuration.xml:292(emphasis) msgid "database user"msgstr ""#: configuration.xml:193(literal) configuration.xml:297(literal) msgid "hibernate.connection.password"msgstr ""#: configuration.xml:196(emphasis) configuration.xml:300(emphasis) msgid "database user password"msgstr ""#: configuration.xml:201(literal) msgid "hibernate.connection.pool_size"msgstr ""#: configuration.xml:204(emphasis) msgid "maximum number of pooled connections"msgstr ""#: configuration.xml:211(para) msgid "Hibernate's own connection pooling algorithm is however quite rudimentary. It is intended to help you get started and is <emphasis>not intended for use in a production system</emphasis> or even for performance testing. You should use a third party pool for best performance and stability. Just replace the <literal>hibernate.connection.pool_size</literal> property with connection pool specific settings. This will turn off Hibernate's internal pool. For example, you might like to use C3P0."msgstr ""#: configuration.xml:221(para) msgid "C3P0 is an open source JDBC connection pool distributed along with Hibernate in the <literal>lib</literal> directory. Hibernate will use its <literal>C3P0ConnectionProvider</literal> for connection pooling if you set <literal>hibernate.c3p0.*</literal> properties. If you'd like to use Proxool refer to the packaged <literal>hibernate.properties</literal> and the Hibernate web site for more information."msgstr ""#: configuration.xml:230(para) msgid "Here is an example <literal>hibernate.properties</literal> file for C3P0:"msgstr ""#: configuration.xml:244(para) msgid "For use inside an application server, you should almost always configure Hibernate to obtain connections from an application server <literal>Datasource</literal> registered in JNDI. You'll need to set at least one of the following properties:"msgstr ""#: configuration.xml:252(title) msgid "Hibernate Datasource Properties"msgstr ""#: configuration.xml:265(literal) msgid "hibernate.connection.datasource"msgstr ""#: configuration.xml:268(emphasis) msgid "datasource JNDI name"msgstr ""#: configuration.xml:273(literal) msgid "hibernate.jndi.url"msgstr ""#: configuration.xml:276(emphasis) msgid "URL of the JNDI provider"msgstr ""#: configuration.xml:275(entry) configuration.xml:283(entry) configuration.xml:291(entry) configuration.xml:299(entry) msgid "<placeholder-1/> (optional)"msgstr ""#: configuration.xml:281(literal) msgid "hibernate.jndi.class"msgstr ""#: configuration.xml:284(literal) configuration.xml:733(literal) msgid "InitialContextFactory"msgstr ""#: configuration.xml:284(emphasis) msgid "class of the JNDI <placeholder-1/>"msgstr ""#: configuration.xml:307(para) msgid "Here's an example <literal>hibernate.properties</literal> file for an application server provided JNDI datasource:"msgstr ""#: configuration.xml:319(para) msgid "JDBC connections obtained from a JNDI datasource will automatically participate in the container-managed transactions of the application server."msgstr ""#: configuration.xml:324(para) msgid "Arbitrary connection properties may be given by prepending \"<literal>hibernate.connection</literal>\" to the property name. For example, you may specify a <literal>charSet</literal> using <literal>hibernate.connection.charSet</literal>."msgstr ""#: configuration.xml:330(para) msgid "You may define your own plugin strategy for obtaining JDBC connections by implementing the interface <literal>org.hibernate.connection.ConnectionProvider</literal>. You may select a custom implementation by setting <literal>hibernate.connection.provider_class</literal>."msgstr ""#: configuration.xml:339(title) msgid "Optional configuration properties"msgstr ""#: configuration.xml:341(para) msgid "There are a number of other properties that control the behaviour of Hibernate at runtime. All are optional and have reasonable default values."msgstr ""#: configuration.xml:346(para) msgid "<emphasis>Warning: some of these properties are \"system-level\" only.</emphasis> System-level properties can be set only via <literal>java -Dproperty=value</literal> or <literal>hibernate.properties</literal>. They may <emphasis>not</emphasis> be set by the other techniques described above."msgstr ""#: configuration.xml:354(title) msgid "Hibernate Configuration Properties"msgstr ""#: configuration.xml:367(literal) msgid "hibernate.dialect"msgstr ""#: configuration.xml:370(literal) configuration.xml:1045(entry) msgid "Dialect"msgstr ""#: configuration.xml:374(emphasis) configuration.xml:413(emphasis) configuration.xml:426(emphasis) configuration.xml:439(emphasis) configuration.xml:600(emphasis) configuration.xml:644(emphasis) configuration.xml:657(emphasis) configuration.xml:671(emphasis) configuration.xml:759(emphasis) configuration.xml:774(emphasis) configuration.xml:786(emphasis) configuration.xml:800(emphasis) configuration.xml:813(emphasis) configuration.xml:825(emphasis) configuration.xml:838(emphasis) configuration.xml:868(emphasis) configuration.xml:882(emphasis) configuration.xml:896(emphasis) configuration.xml:984(emphasis) msgid "eg."msgstr ""#: configuration.xml:375(literal) msgid "full.classname.of.Dialect"msgstr ""#: configuration.xml:369(entry) msgid "The classname of a Hibernate <placeholder-1/> which allows Hibernate to generate SQL optimized for a particular relational database. <placeholder-2/>"msgstr ""#: configuration.xml:381(literal) msgid "hibernate.show_sql"msgstr ""#: configuration.xml:385(literal) configuration.xml:1247(literal) msgid "org.hibernate.SQL"msgstr ""#: configuration.xml:386(literal) msgid "debug"msgstr ""#: configuration.xml:387(para) configuration.xml:399(para) configuration.xml:493(para) configuration.xml:506(para) configuration.xml:519(para) configuration.xml:532(para) configuration.xml:586(para) configuration.xml:613(para) configuration.xml:627(para) configuration.xml:682(para) configuration.xml:910(para) configuration.xml:925(para) configuration.xml:1015(para) msgid "<emphasis role=\"strong\">eg.</emphasis><literal>true</literal> | <literal>false</literal>"msgstr ""#: configuration.xml:383(entry) msgid "Write all SQL statements to console. This is an alternative to setting the log category <placeholder-1/> to <placeholder-2/>. <placeholder-3/>"msgstr ""#: configuration.xml:395(literal) msgid "hibernate.format_sql"msgstr ""#: configuration.xml:397(entry) msgid "Pretty print the SQL in the log and console. <placeholder-1/>"msgstr ""#: configuration.xml:407(literal) msgid "hibernate.default_schema"msgstr ""#: configuration.xml:414(literal) msgid "SCHEMA_NAME"msgstr ""#: configuration.xml:409(entry) msgid "Qualify unqualified table names with the given schema/tablespace in generated SQL. <placeholder-1/>"msgstr ""#: configuration.xml:420(literal) msgid "hibernate.default_catalog"msgstr ""#: configuration.xml:427(literal) msgid "CATALOG_NAME"msgstr ""#: configuration.xml:422(entry) msgid "Qualify unqualified table names with the given catalog in generated SQL. <placeholder-1/>"msgstr ""#: configuration.xml:433(literal) msgid "hibernate.session_factory_name"msgstr ""#: configuration.xml:436(literal) configuration.xml:478(literal) configuration.xml:995(literal) configuration.xml:997(literal) msgid "SessionFactory"msgstr ""#: configuration.xml:440(literal) configuration.xml:883(literal) msgid "jndi/composite/name"msgstr ""#: configuration.xml:435(entry) msgid "The <placeholder-1/> will be automatically bound to this name in JNDI after it has been created. <placeholder-2/>"msgstr ""#: configuration.xml:446(literal) msgid "hibernate.max_fetch_depth"msgstr ""#: configuration.xml:451(literal) msgid "0"msgstr ""#: configuration.xml:452(para) msgid "<emphasis role=\"strong\">eg.</emphasis> recommended values between <literal>0</literal> and <literal>3</literal>"msgstr ""#: configuration.xml:448(entry) msgid "Set a maximum \"depth\" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A <placeholder-1/> disables default outer join fetching. <placeholder-2/>"msgstr ""#: configuration.xml:461(literal) msgid "hibernate.default_batch_fetch_size"msgstr ""#: configuration.xml:465(para) msgid "<emphasis role=\"strong\">eg.</emphasis> recommended values <literal>4</literal>, <literal>8</literal>, <literal>16</literal>"msgstr ""#: configuration.xml:463(entry) msgid "Set a default size for Hibernate batch fetching of associations. <placeholder-1/>"msgstr ""#: configuration.xml:474(literal) msgid "hibernate.default_entity_mode"msgstr ""#: configuration.xml:479(para) msgid "<literal>dynamic-map</literal>, <literal>dom4j</literal>, <literal>pojo</literal>"msgstr ""#: configuration.xml:476(entry) msgid "Set a default mode for entity representation for all sessions opened from this <placeholder-1/><placeholder-2/>"msgstr ""#: configuration.xml:487(literal) 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -