`
ssg108
  • 浏览: 51425 次
  • 性别: Icon_minigender_2
  • 来自: 郑州
社区版块
存档分类
最新评论

hibernate 配置项

阅读更多
public static final String CONNECTION_PROVIDER ="hibernate.connection.provider_class";
	/**
	 * JDBC driver class
	 */
	public static final String DRIVER ="hibernate.connection.driver_class";
	/**
	 * JDBC transaction isolation level
	 */
	public static final String ISOLATION ="hibernate.connection.isolation";
	/**
	 * JDBC URL
	 */
	public static final String URL ="hibernate.connection.url";
	/**
	 * JDBC user
	 */
	public static final String USER ="hibernate.connection.username";
	/**
	 * JDBC password
	 */
	public static final String PASS ="hibernate.connection.password";
	/**
	 * JDBC autocommit mode
	 */
	public static final String AUTOCOMMIT ="hibernate.connection.autocommit";
	/**
	 * Maximum number of inactive connections for Hibernate's connection pool
	 */
	public static final String POOL_SIZE ="hibernate.connection.pool_size";
	/**
	 * <tt>java.sql.Datasource</tt> JNDI name
	 */
	public static final String DATASOURCE ="hibernate.connection.datasource";
	/**
	 * prefix for arbitrary JDBC connection properties
	 */
	public static final String CONNECTION_PREFIX = "hibernate.connection";

	/**
	 * JNDI initial context class, <tt>Context.INITIAL_CONTEXT_FACTORY</tt>
	 */
	public static final String JNDI_CLASS ="hibernate.jndi.class";
	/**
	 * JNDI provider URL, <tt>Context.PROVIDER_URL</tt>
	 */
	public static final String JNDI_URL ="hibernate.jndi.url";
	/**
	 * prefix for arbitrary JNDI <tt>InitialContext</tt> properties
	 */
	public static final String JNDI_PREFIX = "hibernate.jndi";
	/**
	 * JNDI name to bind to <tt>SessionFactory</tt>
	 */
	public static final String SESSION_FACTORY_NAME = "hibernate.session_factory_name";

	/**
	 * Hibernate SQL <tt>Dialect</tt> class
	 */
	public static final String DIALECT ="hibernate.dialect";
	/**
	 * A default database schema (owner) name to use for unqualified tablenames
	 */
	public static final String DEFAULT_SCHEMA = "hibernate.default_schema";
	/**
	 * A default database catalog name to use for unqualified tablenames
	 */
	public static final String DEFAULT_CATALOG = "hibernate.default_catalog";

	/**
	 * Enable logging of generated SQL to the console
	 */
	public static final String SHOW_SQL ="hibernate.show_sql";
	/**
	 * Enable formatting of SQL logged to the console
	 */
	public static final String FORMAT_SQL ="hibernate.format_sql";
	/**
	 * Add comments to the generated SQL
	 */
	public static final String USE_SQL_COMMENTS ="hibernate.use_sql_comments";
	/**
	 * Maximum depth of outer join fetching
	 */
	public static final String MAX_FETCH_DEPTH = "hibernate.max_fetch_depth";
	/**
	 * The default batch size for batch fetching
	 */
	public static final String DEFAULT_BATCH_FETCH_SIZE = "hibernate.default_batch_fetch_size";
	/**
	 * Use <tt>java.io</tt> streams to read / write binary data from / to JDBC
	 */
	public static final String USE_STREAMS_FOR_BINARY = "hibernate.jdbc.use_streams_for_binary";
	/**
	 * Use JDBC scrollable <tt>ResultSet</tt>s. This property is only necessary when there is
	 * no <tt>ConnectionProvider</tt>, ie. the user is supplying JDBC connections.
	 */
	public static final String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset";
	/**
	 * Tells the JDBC driver to attempt to retrieve row Id with the JDBC 3.0 PreparedStatement.getGeneratedKeys()
	 * method. In general, performance will be better if this property is set to true and the underlying
	 * JDBC driver supports getGeneratedKeys().
	 */
	public static final String USE_GET_GENERATED_KEYS = "hibernate.jdbc.use_get_generated_keys";
	/**
	 * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database
	 * when more rows are needed. If <tt>0</tt>, JDBC driver default settings will be used.
	 */
	public static final String STATEMENT_FETCH_SIZE = "hibernate.jdbc.fetch_size";
	/**
	 * Maximum JDBC batch size. A nonzero value enables batch updates.
	 */
	public static final String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size";
	/**
	 * Select a custom batcher.
	 */
	public static final String BATCH_STRATEGY = "hibernate.jdbc.factory_class";
	/**
	 * Should versioned data be included in batching?
	 */
	public static final String BATCH_VERSIONED_DATA = "hibernate.jdbc.batch_versioned_data";
	/**
	 * An XSLT resource used to generate "custom" XML
	 */
	public static final String OUTPUT_STYLESHEET ="hibernate.xml.output_stylesheet";

	/**
	 * Maximum size of C3P0 connection pool
	 */
	public static final String C3P0_MAX_SIZE = "hibernate.c3p0.max_size";
	/**
	 * Minimum size of C3P0 connection pool
	 */
	public static final String C3P0_MIN_SIZE = "hibernate.c3p0.min_size";

	/**
	 * Maximum idle time for C3P0 connection pool
	 */
	public static final String C3P0_TIMEOUT = "hibernate.c3p0.timeout";
	/**
	 * Maximum size of C3P0 statement cache
	 */
	public static final String C3P0_MAX_STATEMENTS = "hibernate.c3p0.max_statements";
	/**
	 * Number of connections acquired when pool is exhausted
	 */
	public static final String C3P0_ACQUIRE_INCREMENT = "hibernate.c3p0.acquire_increment";
	/**
	 * Idle time before a C3P0 pooled connection is validated
	 */
	public static final String C3P0_IDLE_TEST_PERIOD = "hibernate.c3p0.idle_test_period";

	/**
	 * Proxool/Hibernate property prefix
	 */
	public static final String PROXOOL_PREFIX = "hibernate.proxool";
	/**
	 * Proxool property to configure the Proxool Provider using an XML (<tt>/path/to/file.xml</tt>)
	 */
	public static final String PROXOOL_XML = "hibernate.proxool.xml";
	/**
	 * Proxool property to configure the Proxool Provider  using a properties file (<tt>/path/to/proxool.properties</tt>)
	 */
	public static final String PROXOOL_PROPERTIES = "hibernate.proxool.properties";
	/**
	 * Proxool property to configure the Proxool Provider from an already existing pool (<tt>true</tt> / <tt>false</tt>)
	 */
	public static final String PROXOOL_EXISTING_POOL = "hibernate.proxool.existing_pool";
	/**
	 * Proxool property with the Proxool pool alias to use
	 * (Required for <tt>PROXOOL_EXISTING_POOL</tt>, <tt>PROXOOL_PROPERTIES</tt>, or
	 * <tt>PROXOOL_XML</tt>)
	 */
	public static final String PROXOOL_POOL_ALIAS = "hibernate.proxool.pool_alias";

	/**
	 * Enable automatic session close at end of transaction
	 */
	public static final String AUTO_CLOSE_SESSION = "hibernate.transaction.auto_close_session";
	/**
	 * Enable automatic flush during the JTA <tt>beforeCompletion()</tt> callback
	 */
	public static final String FLUSH_BEFORE_COMPLETION = "hibernate.transaction.flush_before_completion";
	/**
	 * Specifies how Hibernate should release JDBC connections.
	 */
	public static final String RELEASE_CONNECTIONS = "hibernate.connection.release_mode";
	/**
	 * Context scoping impl for {@link org.hibernate.SessionFactory#getCurrentSession()} processing.
	 */
	public static final String CURRENT_SESSION_CONTEXT_CLASS = "hibernate.current_session_context_class";
	/**
	 * <tt>TransactionFactory</tt> implementor to use for creating <tt>Transaction</tt>s
	 */
	public static final String TRANSACTION_STRATEGY = "hibernate.transaction.factory_class";
	/**
	 * <tt>TransactionManagerLookup</tt> implementor to use for obtaining the <tt>TransactionManager</tt>
	 */
	public static final String TRANSACTION_MANAGER_STRATEGY = "hibernate.transaction.manager_lookup_class";
	/**
	 * JNDI name of JTA <tt>UserTransaction</tt> object
	 */
	public static final String USER_TRANSACTION = "jta.UserTransaction";

	/**
	 * The <tt>CacheProvider</tt> implementation class
	 */
	public static final String CACHE_PROVIDER = "hibernate.cache.provider_class";
	/**
	 * The <tt>CacheProvider</tt> implementation class
	 */
	public static final String CACHE_PROVIDER_CONFIG = "hibernate.cache.provider_configuration_file_resource_path";
	/**
	 * The <tt>CacheProvider</tt> JNDI namespace, if pre-bound to JNDI.
	 */
	public static final String CACHE_NAMESPACE = "hibernate.cache.jndi";
	/**
	 * Enable the query cache (disabled by default)
	 */
	public static final String USE_QUERY_CACHE = "hibernate.cache.use_query_cache";
	/**
	 * The <tt>QueryCacheFactory</tt> implementation class.
	 */
	public static final String QUERY_CACHE_FACTORY = "hibernate.cache.query_cache_factory";
	/**
	 * Enable the second-level cache (enabled by default)
	 */
	public static final String USE_SECOND_LEVEL_CACHE = "hibernate.cache.use_second_level_cache";
	/**
	 * Optimize the cache for mimimal puts instead of minimal gets
	 */
	public static final String USE_MINIMAL_PUTS = "hibernate.cache.use_minimal_puts";
	/**
	 * The <tt>CacheProvider</tt> region name prefix
	 */
	public static final String CACHE_REGION_PREFIX = "hibernate.cache.region_prefix";
	/**
	 * Enable use of structured second-level cache entries
	 */
	public static final String USE_STRUCTURED_CACHE = "hibernate.cache.use_structured_entries";

	/**
	 * Enable statistics collection
	 */
	public static final String GENERATE_STATISTICS = "hibernate.generate_statistics";

	public static final String USE_IDENTIFIER_ROLLBACK = "hibernate.use_identifier_rollback";

	/**
	 * Use bytecode libraries optimized property access
	 */
	public static final String USE_REFLECTION_OPTIMIZER = "hibernate.bytecode.use_reflection_optimizer";

	/**
	 * The classname of the HQL query parser factory
	 */
	public static final String QUERY_TRANSLATOR = "hibernate.query.factory_class";
	/**
	 * A comma-seperated list of token substitutions to use when translating a Hibernate
	 * query to SQL
	 */
	public static final String QUERY_SUBSTITUTIONS = "hibernate.query.substitutions";
	/**
	 * Auto export/update schema using hbm2ddl tool. Valid values are <tt>update</tt>,
	 * <tt>create</tt>, <tt>create-drop</tt> and <tt>validate</tt>.
	 */
	public static final String HBM2DDL_AUTO = "hibernate.hbm2ddl.auto";

	/**
	 * The {@link org.hibernate.exception.SQLExceptionConverter} to use for converting SQLExceptions
	 * to Hibernate's JDBCException hierarchy.  The default is to use the configured
	 * {@link org.hibernate.dialect.Dialect}'s preferred SQLExceptionConverter.
	 */
	public static final String SQL_EXCEPTION_CONVERTER = "hibernate.jdbc.sql_exception_converter";

	/**
	 * Enable wrapping of JDBC result sets in order to speed up column name lookups for
	 * broken JDBC drivers
	 */
	public static final String WRAP_RESULT_SETS = "hibernate.jdbc.wrap_result_sets";

	/**
	 * Enable ordering of update statements by primary key value
	 */
	public static final String ORDER_UPDATES = "hibernate.order_updates";

	/**
	 * The EntityMode in which set the Session opened from the SessionFactory.
	 */
    public static final String DEFAULT_ENTITY_MODE = "hibernate.default_entity_mode";

    /**
     * The jacc context id of the deployment
     */
    public static final String JACC_CONTEXTID = "hibernate.jacc_context_id";

	public static final String BYTECODE_PROVIDER = "hibernate.bytecode.provider";

	public static final String JPAQL_STRICT_COMPLIANCE= "hibernate.query.jpaql_strict_compliance";

 

分享到:
评论

相关推荐

    Hibernate可选配置大全

    #### 一、Hibernate配置项概览 Hibernate作为一款优秀的Java持久层框架,提供了丰富的配置选项,以适应不同场景下的需求。本文档将详细解析Hibernate的各种可选配置,帮助开发者深入了解并合理利用这些配置,提升...

    hibernate配置文件详解

    这些配置项是 Hibernate 建立对象关系映射所需的基本信息。 Hibernate 配置文件是其核心组件之一,用于定义 Hibernate 的运行期参数。通过 hibernate.cfg.xml 和 .hbm.xml 文件,我们可以定义 Hibernate 的基本连接...

    hibernate配置参数大全

    ### Hibernate配置参数详解 #### 一、数据库连接配置(JDBC) 在Hibernate中,与数据库交互的第一步就是正确地配置数据库连接。以下是一些关键的配置参数及其含义: 1. **`hibernate.connection.driver_class`**...

    Hibernate配置文件

    ### Hibernate配置文件详解 #### 一、概述 Hibernate是一个开源的对象关系映射(ORM)框架,它简化了Java应用程序与数据库交互的过程。在使用Hibernate的过程中,一个关键的配置文件是`hibernate.cfg.xml`。这个文件...

    ssh整合带hibernate配置文件

    -- 其他配置项... --&gt; &lt;!-- 配置Hibernate事务管理器 --&gt; &lt;bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager"&gt; ``` 在上述配置中,`sessionFactory` ...

    用myeclipse自动生成hibernate配置文件

    MyEclipse作为一款强大的集成开发环境,提供了自动生成Hibernate配置文件的功能,帮助开发者快速构建项目。以下是使用MyEclipse自动生成Hibernate配置文件的详细步骤: 1. **创建数据库表**: 在开始之前,需要先...

    hibernate配置参数详解

    ### Hibernate配置参数详解 #### 一、数据库连接配置 在Hibernate框架中,为了与数据库进行交互,必须正确地配置数据库连接参数。以下是一些关键的配置项及其含义: 1. **`hibernate.connection.driver_class`**:...

    hibernate配置连接池大全

    1. C3P0:配置项以`hibernate.c3p0.`开头,如`hibernate.c3p0.min_size`、`hibernate.c3p0.max_size`等。 2. DBCP:Apache的另一个连接池实现,配置项以`hibernate.dbcp.`开头。 3. Druid:阿里巴巴开源的数据库连接...

    Eclipse数据库hibernate反向生成数据库类

    然后,重新启动Eclipse,在File-&gt;New-&gt;Other中,我们可以看到Hibernate配置项,表明安装成功。 但是,如果安装完成后仍然无法看到Hibernate的影子,可以尝试删除Eclipse目录下的configuration文件夹中的org.eclipse...

    Hibernate 参数配置详解

    本文档将深入探讨 Hibernate 的核心配置参数及其功能,帮助开发者更好地理解并利用这些配置项以优化应用性能。 #### 二、Hibernate JDBC 和连接(connection)属性 ##### 1. SQL 方言 (Dialect) - **名称**:`...

    Hibernate配置数据库连接

    ### Hibernate配置数据库连接知识点详解 #### 一、Hibernate简介与作用 Hibernate 是一款开源的对象关系映射(Object Relational Mapping, ORM)框架,用于 Java 应用程序与关系型数据库之间的交互。它允许开发者以...

    Hibernate自动生成配置文件

    ### Hibernate自动生成配置文件详解 #### 一、Hibernate与自动生成配置文件的重要性 ...因此,掌握并熟练运用MyEclipse中Hibernate配置文件的自动生成功能,对任何级别的Java开发者来说都是一项极为有价值的技能。

    Myeclipse自动生成Hibernate配置文件及实体类映射ORM

    Myeclipse 自动生成 Hibernate 配置文件及实体类映射 ORM 配置文件 Myeclipse 是一个功能强大的集成开发环境(IDE),它提供了许多实用的功能来简化软件开发过程。在这个示例中,我们将展示如何使用 Myeclipse 自动...

    HibernateADD (hibernate和spring整合,使用dbcp连接池方式连接数据库)

    -- 其他Hibernate配置项... --&gt; &lt;!-- Hibernate实体类的映射文件或包路径... --&gt; &lt;!-- 使用TransactionManager进行事务管理 --&gt; &lt;bean id="transactionManager" class="org.springframework.orm....

    hibernate配置文件hibernate.cfg.xml的详细解释

    #### 三、具体配置项详解 ##### 3.1 数据库连接配置 - **Driver Class**: `&lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;` 指定了用于连接MySQL数据库的JDBC驱动类。 - **...

    Hibernate配置所需jar包

    本篇将详细阐述`Hibernate配置所需jar包`的相关知识点,以及如何正确地配置这些jar包。 首先,我们要明白`hibernate配置时所需全部jar包`是为了确保Hibernate框架能够正常运行。以下是一些常见的Hibernate依赖库,...

    为Spring集成的Hibernate配置二级缓存

    下面我们将详细探讨如何为Spring集成的Hibernate配置二级缓存。 首先,我们需要了解Hibernate的二级缓存机制。一级缓存是每个Session内部的缓存,而二级缓存则是SessionFactory级别的,它可以被多个Session共享。二...

    Spring+Hibernate+Struts2

    -- 更多Hibernate配置项 --&gt; &lt;bean id="hibernateTemplate" class="org.springframework.orm.hibernate5.HibernateTemplate"&gt; ``` **1.3 使用示例** ```java public class UserServiceImpl extends ...

    Hibernate配置数据连接

    ### Hibernate配置数据连接详解 #### 一、概述 在Java持久化框架中,Hibernate是非常流行的ORM(对象关系映射)工具之一。为了更好地管理和优化数据库连接资源,Hibernate支持多种连接池技术,例如c3p0和Proxool等...

    hibernate配置连接池整理

    **标题:“Hibernate配置连接池整理”** 在Java开发中,数据访问层的性能优化往往离不开高效的数据连接管理,而连接池就是实现这一目标的关键技术。Hibernate作为一款强大的对象关系映射(ORM)框架,它提供了与...

Global site tag (gtag.js) - Google Analytics