惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News | PayPal Newsroom
S
Security Affairs
T
Tor Project blog
P
Proofpoint News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
H
Heimdal Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
U
Unit 42
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
Cisco Talos Blog
Cisco Talos Blog
量子位
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
有赞技术团队
有赞技术团队
T
Troy Hunt's Blog
P
Privacy & Cybersecurity Law Blog
Forbes - Security
Forbes - Security
人人都是产品经理
人人都是产品经理
L
Lohrmann on Cybersecurity
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
腾讯CDC
AI
AI
Last Week in AI
Last Week in AI
Latest news
Latest news
Google Online Security Blog
Google Online Security Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
Martin Fowler
Martin Fowler
Blog — PlanetScale
Blog — PlanetScale
V2EX - 技术
V2EX - 技术
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - 不搽雪花膏

linux网关设置 <!DOCTYPE>标签与table高度100% (转) linux运行apache出现403错误 Ubuntu 12.10 Tty (字符终端) 显示中文,和字体大小设置 64位系统下组件服务的查看 ActiveRecord返回部分字段的查询 转 Web前端性能优化全攻略 Castle ActiveRecord 笔记 - 不搽雪花膏 WQL测试工具 [转载]HttpModule与HttpHandler详解 转载 云计算七问七答 [转]整理.net程序集加载方法 MySQL(5.0)导出导入 .NET代码编写规范 [转]PKCS 证书 细数.net3.0的各项新特性 Jquery示例 Jquery入门 [转]Response.End、Response.Redirect 或 Server.Transfer 方法与 ThreadAbortException 异常
Hibernate配置参数
不搽雪花膏 · 2008-11-18 · via 博客园 - 不搽雪花膏

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="${jdbc.driverClassName}" /> //连接驱动
    <property name="url" value="${jdbc.url}" />                                           //连接url,
    <property name="username" value="${jdbc.username}" />               //连接用户名
    <property name="password" value="${jdbc.password}" />               //连接密码
</bean>

<bean id="hbSessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="configLocation">
        <value>WEB-INF/hibernate.cfg.xml</value>                    //hibernate配置文件位置
    </property>
    <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
    <property name="hibernateProperties">
        <props>
            <prop key="hibernate.dialect">                          //针对oracle数据库的方言,特定的关系数据库生成优化的SQL
                org.hibernate.dialect.OracleDialect
            </prop>
            <prop key="hibernate.query.factory_class">              //选择HQL解析器的实现
                org.hibernate.hql.ast.ASTQueryTranslatorFactory
            </prop>
            <prop key="hibernate.show_sql">true</prop>              //是否在控制台打印sql语句
            <prop key="hibernate.use_outer_join">true</prop>        //在Hibernate系统参数中hibernate.use_outer_join被打开的情况下,该参数用来允许使用outer join来载入此集合的数据。
            <prop key="hibernate.cglib.use_reflection_optimizer">true</prop>     //默认打开,启用cglib反射优化。cglib是用来在Hibernate中动态生成PO字节码的,打开优化可以加快字节码构造的速度
            <prop key="hibernate.format_sql">true</prop>            //输出格式化后的sql,更方便查看
            <prop key="hibernate.connection.useUnicode">true</prop> //“useUnicode”和“characterEncoding”决定了它是否在客户端和服务器端传输过程中进行Encode,以及如何进行Encode
            <prop key="hibernate.cache.use_query_cache">false</prop>//允许查询缓存, 个别查询仍然需要被设置为可缓存的.
            <prop key="hibernate.default_batch_fetch_size">16</prop>
            <prop key="hibernate.dbcp.maxActive">100</prop>         //连接池的最大活动个数
            <prop key="hibernate.dbcp.whenExhaustedAction">1</prop> //当连接池中的连接已经被耗尽的时候,DBCP将怎样处理(0 = 失败,1 = 等待,2  =  增长)
            <prop key="hibernate.dbcp.maxWait">1200</prop>          //最大等待时间
            <prop key="hibernate.dbcp.maxIdle">10</prop>            //没有人用连接的时候,最大闲置的连接个数
            ##以下是对prepared statement的处理,同上。
            <prop key="hibernate.dbcp.ps.maxActive">100</prop>
            <prop key="hibernate.dbcp.ps.whenExhaustedAction">1</prop>
            <prop key="hibernate.dbcp.ps.maxWait">1200</prop>
            <prop key="hibernate.dbcp.ps.maxIdle">10</prop>
        </props>
    </property>
</bean>