<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    kapok

    垃圾桶,嘿嘿,我藏的這么深你們還能找到啊,真牛!

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      455 隨筆 :: 0 文章 :: 76 評論 :: 0 Trackbacks
    The Hibernate Session implements transparent write behind. Changes to the domain
    model made in the scope of a Session aren’t immediately propagated to the database.
    This allows Hibernate to coalesce many changes into a minimal number of
    database requests, helping minimize the impact of network latency.
    For example, if a single property of an object is changed twice in the same
    Transaction, Hibernate only needs to execute one SQL UPDATE. Another example
    of the usefulness of transparent write behind is that Hibernate can take
    advantage of the JDBC batch API when executing multiple UPDATE, INSERT, or
    DELETE statements.
    Hibernate flushes occur only at the following times:
    ■ When a Transaction is committed
    ■ Sometimes before a query is executed
    ■ When the application calls Session.flush() explicitly

    Flushing the Session state to the database at the end of a database transaction is
    required in order to make the changes durable and is the common case. Hibernate
    doesn’t flush before every query. However, if there are changes held in memory that
    would affect the results of the query, Hibernate will, by default, synchronize first.
    You can control this behavior by explicitly setting the Hibernate FlushMode via a
    call to session.setFlushMode(). The flush modes are as follows:
    ■ FlushMode.AUTO—The default. Enables the behavior just described.
    ■ FlushMode.COMMIT—Specifies that the session won’t be flushed before query
    execution (it will be flushed only at the end of the database transaction). Be
    aware that this setting may expose you to stale data: modifications you made
    to objects only in memory may conflict with the results of the query.
    ■ FlushMode.NEVER—Lets you specify that only explicit calls to flush() result
    in synchronization of session state with the database.
    We don’t recommend that you change this setting from the default.(OpenSessionInview需要仔細考慮) It’s provided
    to allow performance optimization in rare cases. Likewise, most applications rarely
    need to call flush() explicitly. This functionality is useful when you’re working
    with triggers, mixing Hibernate with direct JDBC, or working with buggy JDBC drivers.
    You should be aware of the option but not necessarily look out for use cases.
    Now that you understand the basic usage of database transactions with the
    Hibernate Transaction interface, let’s turn our attention more closely to the subject
    of concurrent data access.
    It seems as though you shouldn’t have to care about transaction isolation—the
    term implies that something either is or is not isolated. This is misleading. Complete
    isolation of concurrent transactions is extremely expensive in terms of application
    scalability, so databases provide several degrees of isolation. For most applications,
    incomplete transaction isolation is acceptable. It’s important to understand the
    degree of isolation you should choose for an application that uses Hibernate and
    how Hibernate integrates with the transaction capabilities of the database.
    posted on 2005-05-30 16:09 笨笨 閱讀(1274) 評論(1)  編輯  收藏 所屬分類: J2EEHibernateAndSpringALL

    評論

    # re: Hibernate FlushMode 2008-06-12 15:50 往往
    怎末不翻譯啊?  回復(fù)  更多評論
      

    主站蜘蛛池模板: 国产一级大片免费看| 久久精品国产亚洲av日韩| 久久国产精品免费一区| 亚洲爆乳无码一区二区三区| 国产成人精品免费视频大| 久久精品国产亚洲AV| 亚洲欧洲∨国产一区二区三区| 久草视频免费在线| fc2成年免费共享视频网站| 日木av无码专区亚洲av毛片| 日本人护士免费xxxx视频| 国产免费网站看v片在线| 91丁香亚洲综合社区| 久久久久一级精品亚洲国产成人综合AV区| 97在线视频免费公开观看| 亚洲av无码片vr一区二区三区| 亚洲av无码乱码国产精品fc2| 午夜老司机免费视频| 永久免费av无码入口国语片| 亚洲精品V天堂中文字幕| 无码国产精品一区二区免费模式| 亚洲在成人网在线看| 亚洲综合色在线观看亚洲| 免费A级毛片无码免费视| 日韩精品无码免费专区网站| 激情无码亚洲一区二区三区| 久久精品国产亚洲av高清漫画| 亚洲国产精品人人做人人爽| 97视频热人人精品免费| A片在线免费观看| 成人免费视频一区二区| 亚洲中文字幕无码爆乳app| 亚洲高清在线视频| 亚洲欧洲中文日韩久久AV乱码| 永久免费毛片在线播放| 99精品视频在线观看免费播放| 一级午夜免费视频| 精品亚洲福利一区二区| 亚洲色成人四虎在线观看| 亚洲女人初试黑人巨高清| 亚洲av成人无码久久精品|