??xml version="1.0" encoding="utf-8" standalone="yes"?>色网在线免费观看,黄动漫网站在线观看,欧美久久久久久http://www.aygfsteel.com/hllwuxin/category/25993.html刪除昨天啲煩?H選擇今天啲快樂.H設|明天啲q福.H?zh-cnThu, 20 Sep 2007 05:26:27 GMTThu, 20 Sep 2007 05:26:27 GMT60 Hibernate 参数讄一览表http://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146442.html優雅Qě頽?/dc:creator>優雅Qě頽?/author>Wed, 19 Sep 2007 05:28:00 GMThttp://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146442.htmlhttp://www.aygfsteel.com/hllwuxin/comments/146442.htmlhttp://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146442.html#Feedback0http://www.aygfsteel.com/hllwuxin/comments/commentRss/146442.htmlhttp://www.aygfsteel.com/hllwuxin/services/trackbacks/146442.htmlHibernate配置属?
属性名 用?
Dialectcd允许Hibernate针对特定的关pL据库生成优化的SQL. 取?/span> hibernate.show_sql 输出所有SQL语句到控制台. 有一个另外的选择是把debug?eg. false
true | hibernate.default_schema 在生成的SQL? 给定的schema/tablespace附加于非全限定名的表名上. 取?/span> hibernate.default_catalog 在生成的SQL? 给定的catalog附加于非全限定名的表名上. 取?/span> hibernate.session_factory_name jndi/composite/name
0意味着关闭默认的外连接抓? 取?/span> ?tt>3之间取?
4, 16
SessionFactory打开的所有Session指定默认的实体表现模? 取?/span> dom4j, hibernate.order_updates 强制Hibernate按照被更新数据的主键QؓSQL更新排序。这么做减在高ƈ发系l中事务的死锁?取?/span> false
true | hibernate.use_identifer_rollback 如果开? 在对象被删除时生成的标识属性将被重设ؓ默认? 取?/span> false
false. 取?/span> false

?nbsp;3.4.  Hibernate JDBC和连?connection)属?

属性名 用?
Statement.setFetchSize()).
5?tt>hibernate.jdbc.batch_versioned_data 如果你想让你的JDBC驱动?tt>true(开启这个选项通常是安全的). 同时QHibernateؓ自动版本化的数据使用扚wDML. 默认gؓtrue | hibernate.jdbc.factory_class 选择一个自定义?tt>classname.of.Batcher
true | hibernate.jdbc.use_streams_for_binary 在JDBCdserializable (可序列化) 的类型时使用?stream)(pȝU属?. 取?/span> false
PreparedStatement.getGeneratedKeys() 来获取数据库生成的key(?。需要JDBC3+驱动和JRE1.4+, 如果你的数据库驱动在使用Hibernate的标 识生成器旉到问题,请将此D为false. 默认情况下将使用q接的元数据来判定驱动的能力. 取?/span> hibernate.connection.provider_class 自定?tt>classname.of.ConnectionProvider
java.sql.Connection来了解各个值的具体意义, 但请注意多数数据库都不支持所有的隔离U别. 取?/span> hibernate.connection.autocommit 允许被缓存的JDBCq接开启自动提?autocommit) (不徏?. 取?/span> false
after_statement, q样在每ơJDBC调用后,都会d的释放连? 对于非JTA的连? 使用autoؓJTA和CMT事务{略选择after_transaction. 取?/span> after_transaction | auto
propertyName传递到hibernate.jndi.<propertyName> 属?tt>InitialContextFactory中去.

?nbsp;3.5.  Hibernate~存属?

属性名 用?
CacheProvider的类? 取?/span> hibernate.cache.use_minimal_puts 以频J的L作ؓ代h(hun), 优化二~存来最化写操? 在Hibernate3中,q个讄对的集群~存非常有用, 寚w缓存的实现而言Q默认是开启的. 取?/span> hibernate.cache.use_query_cache 允许查询~存, 个别查询仍然需要被讄为可~存? 取?/span> hibernate.cache.use_second_level_cache 能用来完全禁止用二U缓? 寚w些在cȝ映射定义中指?tt>true|false
QueryCache接口的类? 默认为内建的classname.of.QueryCache
prefix
true|false

?nbsp;3.6.  Hibernate事务属?

属性名 用?
TransactionFactory的类? 用于Hibernate JDBCTransactionFactory). 取?/span> jta.UserTransaction 一个JNDI名字Q被UserTransaction. 取?/span> hibernate.transaction.manager_lookup_class 一?tt>classname.of.TransactionManagerLookup
true | hibernate.transaction.auto_close_session 如果开? session在事务完成后被自动关闭?现在更好的方法是使用自动session上下文管理?span>取?/span> false

?nbsp;3.7.  其他属?

属性名 用?
jta | custom.Class
org.hibernate.hql.ast.ASTQueryTranslatorFactory or hibernate.query.substitutions Hibernate查询中的W号映射到SQL查询中的W号 (W号可能是函数名或常量名?. 取?/span> hibernate.hbm2ddl.auto ?tt>create-drop?在显式关?tt>validate | create | hibernate.cglib.use_reflection_optimizer 开启CGLIB来替代运行时反射机制(pȝU属?. 反射机制有时在除错时比较有用. 注意即关闭q个优化, Hibernateq是需要CGLIB. 你不能在true | hibernate.dialect属性设|成正确?hibernate.dialect)

RDBMS 方言
DB2 org.hibernate.dialect.DB2400Dialect
DB2 OS390 org.hibernate.dialect.PostgreSQLDialect
MySQL org.hibernate.dialect.MySQLInnoDBDialect
MySQL with MyISAM org.hibernate.dialect.OracleDialect
Oracle 9i/10g org.hibernate.dialect.SybaseDialect
Sybase Anywhere org.hibernate.dialect.SQLServerDialect
SAP DB org.hibernate.dialect.InformixDialect
HypersonicSQL org.hibernate.dialect.IngresDialect
Progress org.hibernate.dialect.MckoiDialect
Interbase org.hibernate.dialect.PointbaseDialect
FrontBase org.hibernate.dialect.FirebirdDialect

?nbsp;3.9.  Hibernate日志cd

cd 功能
org.hibernate.type 为所有JDBC参数记录日志
org.hibernate.pretty 在session清洗(flush)Ӟ为所有与其关联的实体(最?0?的状态记录日?
org.hibernate.transaction Z务相关的zd记录日志
org.hibernate.hql.AST 在解析查询的时?记录HQL和SQL的AST分析日志
org.hibernate ZQ何Hibernate相关信息做日?(信息量较? 但对查错非常有帮?

?nbsp;3.10. JTA TransactionManagers

Transaction工厂c? 应用E序服务?
JBoss
Weblogic
WebSphere
WebSphere 6
Orion
Resin
JOTM
JOnAS
JRun4
Borland ES


]]> Hibernate包祥?/title><link>http://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146441.html</link><dc:creator>優雅Qě頽?/dc:creator><author>優雅Qě頽?/author><pubDate>Wed, 19 Sep 2007 05:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146441.html</guid><wfw:comment>http://www.aygfsteel.com/hllwuxin/comments/146441.html</wfw:comment><comments>http://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146441.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/hllwuxin/comments/commentRss/146441.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/hllwuxin/services/trackbacks/146441.html</trackback:ping><description><![CDATA[<div id="wmqeeuq" class="g_t_left c07 content" id="blogtext__fks_sffsilOSxkt7XcaYhGmeVKEcy4pTW4C2"> <p style="text-indent: 2em">Hibernate一共包括了23个jar包,令hD~ؕ。本文将详细讲解Hibernate每个jar包的作用Q便于你在应用中Ҏ(gu)自己的需要进行取舍?</p> <p style="text-indent: 2em">  下蝲HibernateQ例?.0.3E_版本Q解压羃Q可以看C个hibernate2.jar和lib目录下有22个jar包: </p> <p style="text-indent: 2em">  hibernate2.jar: </p> <p style="text-indent: 2em">  Hibernate的库Q没有什么可说的Q必M用的jar?</p> <p style="text-indent: 2em">  cglib-asm.jar: </p> <p style="text-indent: 2em">  CGLIB库,Hibernate用它来实现PO字节码的动态生成,非常核心的库Q必M用的jar?</p> <p style="text-indent: 2em">  dom4j.jar: </p> <p style="text-indent: 2em">  dom4j是一个Java的XML APIQ类gjdomQ用来读写XML文g的。dom4j是一个非帔R怼U的Java XML APIQ具有性能优异、功能强大和极端易用使用的特点,同时它也是一个开放源代码的YӞ可以在SourceForge上找到它。在IBM developerWorks上面可以扑ֈ一文章,对主的Java XML APIq行的性能、功能和易用性的评测Qdom4j无论在那个方面都是非常出色的。我早在近两年之前开始用dom4jQ直到现在。如今你可以看到来多的Java软g都在使用dom4j来读写XMLQ特别值得一提的是连Sun的JAXM也在用dom4j。这是必M用的jar包,Hibernate用它来读写配|文件?</p> <p style="text-indent: 2em">  odmg.jar: </p> <p style="text-indent: 2em">  ODMG是一个ORM的规范,Hibernate实现了ODMG规范Q这是一个核心的库,必须使用的jar包?</p> <p style="text-indent: 2em">  commons-collections.jarQ?</p> <p style="text-indent: 2em">  Apache Commons包中的一个,包含了一些Apache开发的集合c,功能比java.util.*强大。必M用的jar包?</p> <p style="text-indent: 2em">  commons-beanutils.jarQ?</p> <p style="text-indent: 2em">  Apache Commons包中的一个,包含了一些Bean工具cȝ。必M用的jar包?</p> <p style="text-indent: 2em">  commons-lang.jar: </p> <p style="text-indent: 2em">  Apache Commons包中的一个,包含了一些数据类型工LQ是java.lang.*的扩展。必M用的jar包?</p> <p style="text-indent: 2em">  commons-logging.jar: </p> <p style="text-indent: 2em">  Apache Commons包中的一个,包含了日志功能,必须使用的jar包。这个包本n包含了一个Simple LoggerQ但是功能很弱。在q行的时候它会先在CLASSPATH找log4jQ如果有Q就使用log4jQ如果没有,找JDK1.4带的java.util.loggingQ如果也找不到就用Simple Logger。commons-logging.jar的出现是一个历史的的遗留的遗憾Q当初Apache极力游说Sun把log4j加入JDK1.4Q然而JDK1.4目组已经接近发布JDK1.4产品的时间了Q因此拒l了Apache的要求,使用自己的java.util.loggingQ这个包的功能比log4j差的很远Q性能也一般?/p> <p style="text-indent: 2em">  后来Apache开发出来了commons-logging.jar用来兼容两个logger。因此用commons-logging.jar写的logE序Q底层的Logger是可以切换的Q你可以选择log4jQjava.util.logging或者它自带的Simple Logger。不q我仍然强烈使用log4jQ因为log4j性能很高Qlog输出信息旉几乎{于System.outQ而处理一条logq_只需?us。你可以在Hibernate的src目录下找到Hibernate已经Z准备好了的log4j的配|文Ӟ你只需要到Apache |站M载log4j可以了。commons-logging.jar也是必须的jar包?</p> <p style="text-indent: 2em">  使用Hibernate必须的jar包就是以上的q几个,剩下的都是可选的?</p> <p style="text-indent: 2em">  ant.jar: </p> <p style="text-indent: 2em">  Ant~译工具的jar包,用来~译Hibernate源代码的。如果你不准备修改和~译Hibernate源代码,那么没有什么用Q可选的jar?</p> <p style="text-indent: 2em">  optional.jarQ?</p> <p style="text-indent: 2em">  Ant的一个辅助包?</p> <p style="text-indent: 2em">  c3p0.jarQ?</p> <p style="text-indent: 2em">  C3PO是一个数据库q接池,Hibernate可以配置Z用C3POq接池。如果你准备用这个连接池Q就需要这个jar包?</p> <p style="text-indent: 2em">  proxool.jarQ?</p> <p style="text-indent: 2em">  也是一个连接池Q同上?</p> <p style="text-indent: 2em">  commons-pool.jar, commons-dbcp.jar: </p> <p style="text-indent: 2em">  DBCP数据库连接池QApache的Jakartal织开发的QTomcat4的连接池也是DBCP?</p> <p style="text-indent: 2em">  实际上Hibernate自己也实C一个非帔R常简单的数据库连接池Q加上上?个,你实际上可以在Hibernate上选择4U不同的数据库连接池Q选择哪一个看个h的偏好,不过DBCP可能更通用一些。另外强调一点,如果在EJB中用HibernateQ一定要用App Server的连接池Q不要用以上4U连接池Q否则容器管理事务不起作用?</p> <p style="text-indent: 2em">  connector.jar: </p> <p style="text-indent: 2em">  JCA 规范Q如果你在App Server上把Hibernate配置为Connector的话Q就需要这个jar。不q实际上一般App Server肯定会带上这个包Q所以实际上是多余的包?</p> <p style="text-indent: 2em">  jaas.jar: </p> <p style="text-indent: 2em">  JAAS是用来进行权限验证的Q已l包含在JDK1.4里面了。所以实际上是多余的包?</p> <p style="text-indent: 2em">  jcs.jarQ?</p> <p style="text-indent: 2em">  如果你准备在Hibernate中用JCS的话Q那么必d括它Q否则就不用?</p> <p style="text-indent: 2em">  jdbc2_0-stdext.jar: </p> <p style="text-indent: 2em">  JDBC2.0的扩展包Q一般来说数据库q接池会用上它。不qApp Server都会带上Q所以也是多余的?</p> <p style="text-indent: 2em">  jta.jarQ?</p> <p style="text-indent: 2em">  JTA规范Q当Hibernate使用JTA的时候需要,不过App Server都会带上Q所以也是多余的?</p> <p style="text-indent: 2em">  junit.jar: </p> <p style="text-indent: 2em">  Junit包,当你q行Hibernate自带的测试代码的时候需要,否则׃用?</p> <p style="text-indent: 2em">  xalan.jar, xerces.jar, xml-apis.jar: </p> <p style="text-indent: 2em">  Xerces是XML解析器,Xalan是格式化器,xml-apis实际上是JAXP。一般App Server都会带上QJDK1.4也包含了解析器,不过不是XercesQ是CrimsonQ效率比较差Q不qHibernate用XML只不q是d配置文gQ性能没什么紧要的Q所以也是多余的?/p> </div> <img src ="http://www.aygfsteel.com/hllwuxin/aggbug/146441.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/hllwuxin/" target="_blank">優雅Qě頽?/a> 2007-09-19 13:26 <a href="http://www.aygfsteel.com/hllwuxin/archive/2007/09/19/146441.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank">ʯ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˶</a>| <a href="http://" target="_blank">΢ɽ</a>| <a href="http://" target="_blank">°</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ⶫ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">䰲</a>| <a href="http://" target="_blank">º</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƾ</a>| <a href="http://" target="_blank">Ҷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˳</a>| <a href="http://" target="_blank">ʳ</a>| <a href="http://" target="_blank">Ӣɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ǩ</a>| <a href="http://" target="_blank">γ</a>| <a href="http://" target="_blank">±</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽʡ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>