|
Hibernate example source code file (transactions.po)
This example Hibernate source code file (transactions.po) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Hibernate transactions.po source code
# translation of Collection_Mapping.po to
# Xi HUANG <xhuang@redhat.com>, 2007, 2010.
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-11T05:38:16\n"
"PO-Revision-Date: 2010-01-13 11:23+1000\n"
"Last-Translator: Xi HUANG <xhuang@redhat.com>\n"
"Language-Team: <en@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#, fuzzy, no-c-format
msgid "Transactions and Concurrency"
msgstr "トランザクションã¨ä¸¦è¡Œæ€§"
#. Tag: para
#, no-c-format
msgid ""
"The most important point about Hibernate and concurrency control is that it "
"is easy to understand. Hibernate directly uses JDBC connections and JTA "
"resources without adding any additional locking behavior. It is recommended "
"that you spend some time with the JDBC, ANSI, and transaction isolation "
"specification of your database management system."
msgstr ""
"Hibernate ã¨åŒæ™‚実行制御ã«ã¤ã„ã¦æœ€ã‚‚é‡è¦ãªç‚¹ã¯ã€å®¹æ˜“ã«ç†è§£ã§ãã‚‹ã“ã¨ã§ã™ã€‚ "
"Hibernate ã¯æ–°ãŸãªãƒãƒƒã‚¯ã®æŒ¯ã‚‹èˆžã„ã‚’è¿½åŠ ã—ã¦ãŠã‚‰ãšã€ç›´æŽ¥ JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã¨ "
"JTA リソースを使用ã—ã¾ã™ã€‚ JDBC 〠ANSI ã€ãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ "
"(DBMS)ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³åˆ†é›¢ã®ä»•æ§˜ã‚’å°‘ã—時間をã‹ã‘ã¦å‹‰å¼·ã™ã‚‹ã“ã¨ã‚’å¼·ã推奨"
"ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Hibernate does not lock objects in memory. Your application can expect the "
"behavior as defined by the isolation level of your database transactions. "
"Through <literal>Session, which is also a transaction-scoped "
"cache, Hibernate provides repeatable reads for lookup by identifier and "
"entity queries and not reporting queries that return scalar values."
msgstr ""
"Hibernate ã¯ãƒ¡ãƒ¢ãƒªå†…ã®ã‚ªãƒ–ジェクトをãƒãƒƒã‚¯ã—ã¾ã›ã‚“。アプリケーションã¯ã€ãƒ‡ãƒ¼"
"タベーストランザクションã®åˆ†é›¢ãƒ¬ãƒ™ãƒ«ã§å®šç¾©ã—ãŸæŒ¯ã‚‹èˆžã„を期待ã§ãã¾ã™ã€‚トラン"
"ザクションスコープã®ã‚ャッシュã§ã‚‚ã‚ã‚‹ <literal>Session ã®ãŠé™°ã§ã€"
"è˜åˆ¥åやクエリã«ã‚ˆã‚Šæ¤œç´¢ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒªãƒ”ータブルリードã«ãªã‚Šã¾ã™ï¼ˆã‚¹ã‚«"
"ラー値を返ã™ã‚ˆã†ãªãƒ¬ãƒãƒ¼ãƒˆã‚¯ã‚¨ãƒªã¯é•ã„ã¾ã™ï¼‰ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"In addition to versioning for automatic optimistic concurrency control, "
"Hibernate also offers, using the <literal>SELECT FOR UPDATE "
"syntax, a (minor) API for pessimistic locking of rows. Optimistic "
"concurrency control and this API are discussed later in this chapter."
msgstr ""
"ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã«ã‚ˆã‚‹è‡ªå‹•çš„ãªæ¥½è¦³çš„åŒæ™‚実行制御ã«åŠ ãˆã¦ã€ <literal>SELECT FOR "
"UPDATE</literal> 文を使用ã—ã¦ã€è¡Œã‚’悲観的ãƒãƒƒã‚¯ã™ã‚‹ãŸã‚ã®ï¼ˆãƒžã‚¤ãƒŠãƒ¼ãªï¼‰ API "
"ã‚‚æä¾›ã—ã¾ã™ã€‚楽観的åŒæ™‚実行制御ã¨ã“ã® API ã«ã¤ã„ã¦ã¯ã€ã“ã®ç« ã®å¾Œã®ã»ã†ã§è°è«–"
"ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The discussion of concurrency control in Hibernate begins with the "
"granularity of <literal>Configuration, SessionFactorySession, as well as database transactions "
"and long conversations."
msgstr ""
"データベーストランザクションや長ã„対話(conversationã€ãƒãƒ³ã‚°ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§"
"ン)ã ã‘ã§ãªã〠<literal>Configurationã€SessionFactorySession ã¨ã„ã†ç²’度㧠Hibernate ãŒè¡Œã†åŒæ™‚"
"実行制御ã®è°è«–を始ã‚ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Session and transaction scopes"
msgstr "session スコープ㨠transaction スコープ"
#. Tag: para
#, no-c-format
msgid ""
"A <literal>SessionFactory is an expensive-to-create, threadsafe "
"object, intended to be shared by all application threads. It is created "
"once, usually on application startup, from a <literal>Configuration ã¯ç”Ÿæˆã™ã‚‹ã“ã¨ãŒé«˜ä¾¡ã§ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ãªã‚ª"
"ブジェクトã§ã™ã€‚よã£ã¦ã€ã‚¢ãƒ—リケーションã®ã™ã¹ã¦ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§å…±æœ‰ã™ã¹ãã§ã™ã€‚"
"通常ã€ã‚¢ãƒ—リケーションã®èµ·å‹•æ™‚ã«ã€ <literal>Configuration インスタ"
"ンスã‹ã‚‰ï¼‘度ã ã‘生æˆã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"A <literal>Session is an inexpensive, non-threadsafe object that "
"should be used once and then discarded for: a single request, a conversation "
"or a single unit of work. A <literal>Session will not obtain a "
"JDBC <literal>Connection, or a Datasource, "
"unless it is needed. It will not consume any resources until used."
msgstr ""
"<literal>Session ã¯é«˜ä¾¡ã§ã¯ãªãã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ãªã‚ªãƒ–ジェクトã§ã‚‚ã‚"
"ã‚Šã¾ã›ã‚“。よã£ã¦ã€ï¼‘ã¤ã®è¦æ±‚や1ã¤ã®å¯¾è©±ã€ï¼‘ã¤ã®ä½œæ¥å˜ä½ï¼ˆunit of work)ã«å¯¾"
"ã—ã¦ï¼‘度ã ã‘使ã„ã€ãã®å¾Œã§æ¨ã¦ã‚‹ã¹ãã§ã™ã€‚ <literal>Session ã¯å¿…è¦"
"ã«ãªã‚‹ã¾ã§ã€ JDBC <literal>Connection(もã—ã㯠"
"<literal>DataSource)をç²å¾—ã—ã¾ã›ã‚“。ゆãˆã«ã€å®Ÿéš›ã«ä½¿ç”¨ã™ã‚‹ã¨ãã¾ã§"
"リソースを消費ã—ã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"In order to reduce lock contention in the database, a database transaction "
"has to be as short as possible. Long database transactions will prevent your "
"application from scaling to a highly concurrent load. It is not recommended "
"that you hold a database transaction open during user think time until the "
"unit of work is complete."
msgstr ""
"ã“ã®çŠ¶æ³ã‚’完了ã•ã›ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã‚‚考ãˆãªã‘ã‚Œ"
"ã°ãªã‚Šã¾ã›ã‚“。データベース内ã®ãƒãƒƒã‚¯ã®ç«¶åˆã‚’å°‘ãªãã™ã‚‹ãŸã‚ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆ"
"ランザクションã¯å¯èƒ½ãªé™ã‚ŠçŸãã™ã‚‹ã¹ãã§ã™ã€‚é•·ã„データベーストランザクション"
"ã¯ã€ã‚¢ãƒ—リケーションã®é«˜ã„並列実行性を阻害ã—ã¾ã™ã€‚ゆãˆã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè€ƒãˆã¦ã„"
"る間(作æ¥å˜ä½ãŒå®Œäº†ã™ã‚‹ã¾ã§ï¼‰ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’é–‹ã„ãŸã¾ã¾ã«ã™ã‚‹"
"ã®ã¯ã€ãŸã„ã¦ã„ã®å ´åˆã‚ˆã„è¨è¨ˆã¨ã¯ã„ãˆã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"What is the scope of a unit of work? Can a single Hibernate "
"<literal>Session span several database transactions, or is this a "
"one-to-one relationship of scopes? When should you open and close a "
"<literal>Session and how do you demarcate the database transaction "
"boundaries? These questions are addressed in the following sections."
msgstr ""
"作æ¥å˜ä½ã¨ã„ã†ã‚¹ã‚³ãƒ¼ãƒ—ã¨ã¯ä½•ã§ã—ょã†ã‹ï¼Ÿï¼‘ã¤ã® Hibernate <literal>SessionPoEAA antipattern: do "
"not open and close a <literal>Session for every simple database "
"call in a single thread. The same is true for database transactions. "
"Database calls in an application are made using a planned sequence; they are "
"grouped into atomic units of work. This also means that auto-commit after "
"every single SQL statement is useless in an application as this mode is "
"intended for ad-hoc SQL console work. Hibernate disables, or expects the "
"application server to disable, auto-commit mode immediately. Database "
"transactions are never optional. All communication with a database has to "
"occur inside a transaction. Auto-commit behavior for reading data should be "
"avoided, as many small transactions are unlikely to perform better than one "
"clearly defined unit of work. The latter is also more maintainable and "
"extensible."
msgstr ""
"1ã¤ç›®ã¯ã€ <emphasis>session-per-operation アンãƒãƒ‘ターンを使ã£ã¦"
"ã¯ã„ã‘ã¾ã›ã‚“。ã™ãªã‚ã¡ã€ï¼‘ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ä¸ã§ã€å˜ç´”ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å‘¼ã³å‡ºã—ã®åº¦"
"ã« <literal>Session ã‚’é–‹ã„ã¦ã€é–‰ã˜ã¦ã¯ã„ã‘ã¾ã›ã‚“。もã¡ã‚ã‚“ã€ãƒ‡ãƒ¼ã‚¿"
"ベーストランザクションã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ã€‚アプリケーションä¸ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å‘¼"
"ã³å‡ºã—ã¯ã€è¨ˆç”»ã•ã‚ŒãŸã‚·ãƒ¼ã‚±ãƒ³ã‚¹ï¼ˆplanned sequence)を使ã„ã€ã‚¢ãƒˆãƒŸãƒƒã‚¯ãªä½œæ¥å˜"
"ä½ã«åˆ†é¡žã•ã‚Œã¾ã™ã€‚(1ã¤ã® SQL æ–‡ã”ã¨ã«ã‚³ãƒŸãƒƒãƒˆã™ã‚‹è‡ªå‹•ã‚³ãƒŸãƒƒãƒˆãŒã€ä½¿ã‚ã‚Œãªã„"
"ã¨ã„ã†æ„味ã§ã‚‚ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。自動コミットã¯ã€ SQL コンソールã§ã‚¢"
"ドホックãªä½œæ¥ã‚’ã™ã‚‹éš›ã«ä½¿ã†ã‚‚ã®ã§ã™ã€‚ Hibernate ã¯ç›´ã¡ã«è‡ªå‹•ã‚³ãƒŸãƒƒãƒˆãƒ¢ãƒ¼ãƒ‰ã‚’"
"無効ã«ã—ã¾ã™ã€‚ã‚‚ã—ãã¯ã€ã‚¢ãƒ—リケーションサーãƒãƒ¼ãŒç„¡åŠ¹åŒ–ã™ã‚‹ã“ã¨ã‚’期待ã—ã¾"
"ã™ã€‚)データベーストランザクションã¯ã‚ªãƒ—ションã§ã¯ã‚ã‚Šã¾ã›ã‚“。データベースã¨"
"ã®ã™ã¹ã¦ã®é€šä¿¡ã¯ã€ãƒ‡ãƒ¼ã‚¿ã®èªã¿è¾¼ã¿ã§ã‚ã£ã¦ã‚‚ã€æ›¸ãè¾¼ã¿ã§ã‚ã£ã¦ã‚‚ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯"
"ションã®ä¸ã§è¡Œã‚ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。説明ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿èªã¿è¾¼ã¿ã«å¯¾ã—ã¦ã€è‡ªå‹•"
"コミットã¯é¿ã‘ã‚‹ã¹ãã§ã™ã€‚ãªãœãªã‚‰ã€å¤šæ•°ã®å°ã•ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€æ˜Žç¢ºã«å®š"
"義ã•ã‚ŒãŸï¼‘ã¤ã®ä½œæ¥å˜ä½ã¨æ¯”ã¹ã¦ã€ãƒ‘フォーマンスãŒã‚ˆããªã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。後"
"者ã¯ä¿å®ˆæ€§ã‚„拡張性もよりã™ãã‚Œã¦ã„ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The most common pattern in a multi-user client/server application is "
"<emphasis>session-per-request. In this model, a request from the "
"client is sent to the server, where the Hibernate persistence layer runs. A "
"new Hibernate <literal>Session is opened, and all database "
"operations are executed in this unit of work. On completion of the work, and "
"once the response for the client has been prepared, the session is flushed "
"and closed. Use a single database transaction to serve the clients request, "
"starting and committing it when you open and close the <literal>Session ã§ã™ã€‚ã“ã®ãƒ¢ãƒ‡ãƒ«ã®ä¸"
"ã§ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ï¼ˆ Hibernate 永続化層ãŒå‹•ä½œã™ã‚‹ï¼‰ã‚µãƒ¼ãƒãƒ¼ã¸ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒ"
"é€ã‚‰ã‚Œã€æ–°ã—ã„ Hibernate <literal>Session ãŒé–‹ã‹ã‚Œã¾ã™ã€‚ãã—ã¦ã€ã“"
"ã®ä½œæ¥å˜ä½ã®ä¸ã§ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å‡¦ç†ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ã€‚作æ¥ãŒå®Œäº†ã—ãŸï¼ˆãã—"
"ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¸ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒæº–å‚™ã§ããŸï¼‰æ™‚点ã§ã€ session をフラッシュã—ã€"
"é–‰ã˜ã¾ã™ã€‚クライアントã®è¦æ±‚を処ç†ã™ã‚‹ãŸã‚ã«ã€ï¼‘ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯"
"ションを使用ã™ã‚‹ã§ã—ょã†ã€‚ <literal>Session ã‚’é–‹ãã€é–‰ã˜ã‚‹éš›ã«ã€"
"データベーストランザクションを開始ã—ã€ã‚³ãƒŸãƒƒãƒˆã—ã¾ã™ã€‚二ã¤ã®é–¢ä¿‚ã¯ä¸€å¯¾ä¸€ã§"
"ã™ã€‚ã“ã®ãƒ¢ãƒ‡ãƒ«ã¯å¤šãã®ã‚¢ãƒ—リケーションã«å®Œå…¨ã«é©åˆã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The challenge lies in the implementation. Hibernate provides built-in "
"management of the \"current session\" to simplify this pattern. Start a "
"transaction when a server request has to be processed, and end the "
"transaction before the response is sent to the client. Common solutions are "
"<literal>ServletFilter, AOP interceptor with a pointcut on the "
"service methods, or a proxy/interception container. An EJB container is a "
"standardized way to implement cross-cutting aspects such as transaction "
"demarcation on EJB session beans, declaratively with CMT. If you use "
"programmatic transaction demarcation, for ease of use and code portability "
"use the Hibernate <literal>Transaction API shown later in this "
"chapter."
msgstr ""
"以é™ã®å®Ÿè£…ã«ãƒãƒ£ãƒ¬ãƒ³ã‚¸ã—ã¦ãã ã•ã„。 Hibernate ã¯å˜ç´”ãªã“ã®ãƒ‘ターンã®ãŸã‚ã«ã€"
"予ã‚組ã¿è¾¼ã¾ã‚ŒãŸ \"current session\" ã®ç®¡ç†ã‚’æä¾›ã—ã¾ã™ã€‚サーãƒãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’"
"処ç†ã™ã‚‹éš›ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’開始ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。ãã—ã¦ã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’"
"クライアントã«é€ä¿¡ã™ã‚‹å‰ã«ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’終ã‚らã›ã¾ã™ã€‚好ããªæ–¹æ³•ã§å®Ÿç¾ã§"
"ãã¾ã™ã€‚一般的ãªè§£æ±ºç–㯠<literal>ServletFilter やサービスメソッド"
"ã‚’ãƒã‚¤ãƒ³ãƒˆã‚«ãƒƒãƒˆã—㦠AOP インターセプター〠proxy/interception コンテナã§"
"ã™ã€‚ EJB コンテナ㯠EJB セッション Bean をトランザクション境界ã¨ã—ã¦ã‚¢ã‚¹ãƒšã‚¯"
"トをクãƒã‚¹ã‚«ãƒƒãƒˆã™ã‚‹å®Ÿè£…ã®æ¨™æº–çš„ãªæ–¹æ³•ã§ã™ï¼ˆ CMT ã«ã‚ˆã‚‹å®£è¨€çš„)。プãƒã‚°ãƒ©ãƒ ã«"
"よるトランザクション境界を使ã†ã¨æ±ºã‚ãŸå ´åˆã€ç°¡å˜ã«ä½¿ã†ãŸã‚ã€äº’æ›æ€§ã®ã‚るコー"
"ドã«ã™ã‚‹ãŸã‚ã«ã€ã“ã®ç« ã®å¾Œã®ã»ã†ã«ã‚ã‚‹ Hibernate <literal>Transaction. "
"You will always get a <literal>Session scoped to the current "
"database transaction. This has to be configured for either resource-local or "
"JTA environments, see <xref linkend=\"architecture-current-session\" />."
msgstr ""
"アプリケーションã®ã‚³ãƒ¼ãƒ‰ã¯ã€å¿…è¦ãªã¨ãã«ã©ã“ã§ã‚‚ã€ä½•å›žã§ã‚‚ã€å˜ã« "
"<literal>sessionFactory.getCurrentSession() を呼ã³å‡ºã™ã ã‘ã§ã€Œç¾åœ¨"
"ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¸ã® "
"<literal>セッション を常ã«å–å¾—ã—ã¾ã™ã€‚リソースãƒãƒ¼ã‚«ãƒ«ãªç’°å¢ƒã€ã‚‚ã—"
"ã㯠JTA 環境を構æˆã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“ (<xref linkend=\"architecture-"
"current-session\"/> ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。"
#. Tag: para
#, no-c-format
msgid ""
"You can extend the scope of a <literal>Session and database "
"transaction until the \"view has been rendered\". This is especially useful "
"in servlet applications that utilize a separate rendering phase after the "
"request has been processed. Extending the database transaction until view "
"rendering, is achieved by implementing your own interceptor. However, this "
"will be difficult if you rely on EJBs with container-managed transactions. A "
"transaction will be completed when an EJB method returns, before rendering "
"of any view can start. See the Hibernate website and forum for tips and "
"examples relating to this <emphasis>Open Session in View pattern."
msgstr ""
"ã¨ãã©ãã€ã€Œãƒ“ューをæç”»ã™ã‚‹ã€ã¾ã§ <literal>セッション ã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼"
"ストランザクションã®ã‚¹ã‚³ãƒ¼ãƒ—ã‚’æ‹¡å¼µã™ã‚‹ã¨ä¾¿åˆ©ãªã“ã¨ãŒã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€è¦æ±‚ã®"
"処ç†ã¨æç”»ã®ãƒ•ã‚§ãƒ¼ã‚ºã‚’分ã‘ã¦ã„るサーブレットアプリケーションã«ãŠã„ã¦ç‰¹ã«å½¹ç«‹"
"ã¡ã¾ã™ã€‚独自ã®ã‚¤ãƒ³ã‚¿ãƒ¼ã‚»ãƒ—タを実装ã™ã‚Œã°ã€ãƒ“ューをæç”»ã™ã‚‹ã¾ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆ"
"ランザクションを拡張ã™ã‚‹ã®ã¯ç°¡å˜ã§ã™ã€‚ã—ã‹ã—ã€ã‚³ãƒ³ãƒ†ãƒŠç®¡ç†ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã® "
"EJB ã«é ¼ã‚‹å ´åˆã¯ã€ç°¡å˜ã«ã¯ã§ãã¾ã›ã‚“。ãªãœãªã‚‰ã€ãƒ“ューã®æ画を開始ã™ã‚‹å‰ã«ã€ "
"EJB ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒãƒªã‚¿ãƒ¼ãƒ³ã—ãŸéš›ã«ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Œäº†ã™ã‚‹ãŸã‚ã§ã™ã€‚ã“ã® "
"<emphasis>Open Session in View パターンã«é–¢é€£ã™ã‚‹ãƒ’ントã¨ä¾‹ã«ã¤ã„"
"ã¦ã¯ã€ Hibernate ã® Web サイトやフォーラムをå‚ç…§ã—ã¦ãã ã•ã„。"
#. Tag: title
#, no-c-format
msgid "Long conversations"
msgstr "é•·ã„対話"
#. Tag: para
#, no-c-format
msgid ""
"The session-per-request pattern is not the only way of designing units of "
"work. Many business processes require a whole series of interactions with "
"the user that are interleaved with database accesses. In web and enterprise "
"applications, it is not acceptable for a database transaction to span a user "
"interaction. Consider the following example:"
msgstr ""
"session-per-request パターンã¯ã€ä½œæ¥å˜ä½ã‚’è¨è¨ˆã™ã‚‹éš›ã«å½¹ç«‹ã¤è€ƒãˆã¨ã„ã†ã ã‘ã§"
"ã¯ã‚ã‚Šã¾ã›ã‚“。多ãã®ãƒ“ジãƒã‚¹ãƒ—ãƒã‚»ã‚¹ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã®ä¸€é€£ã®ç›¸äº’作用全体をè¦æ±‚"
"ã—ã¾ã™ã€‚ãã®ç›¸äº’作用ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹ãŒå«ã¾ã‚Œã¾ã™ã€‚ Web ã¨ã‚¨ãƒ³ã‚¿ãƒ¼ãƒ—"
"ライズアプリケーションã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã®ç›¸äº’作"
"用ã«ã¾ã§æ¸¡ã‚‹ã“ã¨ã¯è¨±ã•ã‚Œã¾ã›ã‚“。次ã®ä¾‹ã‚’よã考ãˆã¦ã¿ã¦ãã ã•ã„: "
#. Tag: para
#, no-c-format
msgid ""
"The first screen of a dialog opens. The data seen by the user has been "
"loaded in a particular <literal>Session and database transaction. "
"The user is free to modify the objects."
msgstr ""
"ダイアãƒã‚°ã®æœ€åˆã®ç”»é¢ãŒé–‹ãã€å€‹ã€…ã® <literal>Session ã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼"
"ストランザクションã®ä¸ã§ãƒãƒ¼ãƒ‰ã•ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚’ユーザーã«è¦‹ã›ã¾ã™ã€‚ユーザーã¯ã‚ª"
"ブジェクトを自由ã«ä¿®æ£ã§ãã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The user clicks \"Save\" after 5 minutes and expects their modifications to "
"be made persistent. The user also expects that they were the only person "
"editing this information and that no conflicting modification has occurred."
msgstr ""
"5分後ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ \"Save\" をクリックã—ã€ä¿®æ£ãŒæ°¸ç¶šåŒ–ã•ã‚Œã‚‹ã®ã‚’期待ã—ã¾ã™ã€‚ã¾"
"ãŸã€ã“ã®æƒ…å ±ã‚’ç·¨é›†ã—ãŸã®ã¯è‡ªåˆ†ï¼‘人ã ã‘ã§ã€ä¿®æ£ã®ã‚³ãƒ³ãƒ•ãƒªã‚¯ãƒˆã¯ç™ºç”Ÿã—ãªã„ã¨æœŸ"
"å¾…ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"From the point of view of the user, we call this unit of work a long-running "
"<emphasis>conversation or application transaction (もã—ã"
"ã¯ã€<emphasis>アプリケーショントランザクション )ã¨å‘¼ã³ã¾ã™ã€‚アプ"
"リケーションã«ã“れを実装ã™ã‚‹æ–¹æ³•ã¯ãŸãã•ã‚“ã‚ã‚Šã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"A first naive implementation might keep the <literal>Session and "
"database transaction open during user think time, with locks held in the "
"database to prevent concurrent modification and to guarantee isolation and "
"atomicity. This is an anti-pattern, since lock contention would not allow "
"the application to scale with the number of concurrent users."
msgstr ""
"最åˆã«æ€ã„ã¤ã実装ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè€ƒãˆã¦ã„る間〠<literal>Session ã¨"
"データベーストランザクションを開ã„ãŸã¾ã¾ã«ã—ã¦ãŠãã“ã¨ã§ã™ã€‚åŒæ™‚ã«ä¿®æ£ã•ã‚Œ"
"ãšã€åˆ†é›¢ã¨åŽŸå性ãŒä¿è¨¼ã•ã‚Œã‚‹ã‚ˆã†ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒãƒƒã‚¯ã¯ä¿æŒã—ãŸã¾ã¾ã«ã—"
"ã¾ã™ã€‚ã‚‚ã¡ã‚ã‚“ã€ã“ã‚Œã¯ã‚¢ãƒ³ãƒãƒ‘ターンã§ã™ã€‚ãªãœãªã‚‰ã€ãƒãƒƒã‚¯ã®ç«¶åˆãŒç™ºç”Ÿã™ã‚‹"
"ã¨ã€ã‚¢ãƒ—リケーションãŒåŒæ™‚ユーザー数ã«å¿œã˜ã¦ã‚¹ã‚±ãƒ¼ãƒ«ã‚¢ãƒƒãƒ—ã§ããªããªã‚‹ã‹ã‚‰ã§"
"ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"You have to use several database transactions to implement the conversation. "
"In this case, maintaining isolation of business processes becomes the "
"partial responsibility of the application tier. A single conversation "
"usually spans several database transactions. It will be atomic if only one "
"of these database transactions (the last one) stores the updated data. All "
"others simply read data (for example, in a wizard-style dialog spanning "
"several request/response cycles). This is easier to implement than it might "
"sound, especially if you utilize some of Hibernate's features:"
msgstr ""
"明らã‹ã«ã€å¯¾è©±ã‚’実装ã™ã‚‹ãŸã‚ã«ã¯ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’使"
"用ã™ã‚‹ã¹ãã§ã™ã€‚ã“ã®å ´åˆã€ãƒ“ジãƒã‚¹ãƒ—ãƒã‚»ã‚¹ã®åˆ†é›¢ã‚’ç¶æŒã™ã‚‹ã“ã¨ã¯ã€ã‚¢ãƒ—リケー"
"ション層ã®è²¬å‹™ã®ï¼‘ã¤ã«ãªã‚Šã¾ã™ã€‚1ã¤ã®å¯¾è©±ã¯ã€é€šå¸¸ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©"
"ンザクションã«åŠã³ã¾ã™ã€‚データベーストランザクションã®ï¼‘ã¤ã®ã¿ï¼ˆæœ€å¾Œã®ï¼‘ã¤ï¼‰"
"ãŒæ›´æ–°ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’ä¿å˜ã—ã€ä»–ã¯ãƒ‡ãƒ¼ã‚¿ã‚’èªã‚€ã ã‘ã§ã‚ã‚Œã°ã€ãã‚Œã¯ã‚¢ãƒˆãƒŸãƒƒã‚¯ã§ã™"
"(例ãˆã°ã€ã„ãã¤ã‹ã®è¦æ±‚ï¼å¿œç”ã‚’ç¹°ã‚Šè¿”ã™ã‚¦ã‚£ã‚¶ãƒ¼ãƒ‰å½¢å¼ã®ãƒ€ã‚¤ã‚¢ãƒã‚°ï¼‰ã€‚ã“ã‚Œã¯"
"èžãよりã€å®Ÿè£…ã—ãŸã»ã†ãŒç°¡å˜ã§ã™ã€‚ Hibernate ã®æ©Ÿèƒ½ã‚’使ã†ã®ã§ã‚ã‚Œã°ã€ç‰¹ã«ç°¡å˜"
"ã§ã™:"
#. Tag: para
#, no-c-format
msgid ""
"<emphasis>Automatic Versioning: Hibernate can perform automatic "
"optimistic concurrency control for you. It can automatically detect if a "
"concurrent modification occurred during user think time. Check for this at "
"the end of the conversation."
msgstr ""
"<emphasis>自動ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚° - Hibernate ã¯è‡ªå‹•çš„ã«æ¥½è¦³çš„åŒæ™‚実行"
"制御ãŒã§ãã¾ã™ã€‚ユーザーãŒè€ƒãˆã¦ã„ã‚‹é–“ã«åŒæ™‚ã«ä¿®æ£ãŒãŠããŸå ´åˆã€è‡ªå‹•çš„ã«æ¤œå‡º"
"ã§ãã¾ã™ã€‚通常ã€å¯¾è©±ã®çµ‚了時ã«ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã ã‘ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<emphasis>Detached Objects: if you decide to use the "
"<emphasis>session-per-request pattern, all loaded instances will "
"be in the detached state during user think time. Hibernate allows you to "
"reattach the objects and persist the modifications. The pattern is called "
"<emphasis>session-per-request-with-detached-objects. Automatic "
"versioning is used to isolate concurrent modifications."
msgstr ""
"<emphasis>分離(Detached)オブジェクト - ã™ã§ã«è°è«–ã—㟠"
"<emphasis>session-per-request パターンを使ã†ã¨æ±ºå®šã—ãŸå ´åˆã€ãƒãƒ¼ãƒ‰"
"ã•ã‚ŒãŸã™ã¹ã¦ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè€ƒãˆã¦ã„ã‚‹é–“ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‹ã‚‰åˆ†é›¢ã•"
"ã‚ŒãŸçŠ¶æ…‹ã«ãªã‚Šã¾ã™ã€‚オブジェクトをセッションã«å†è¿½åŠ ã—ã€ä¿®æ£ã‚’永続化ã§ãã¾"
"ã™ã€‚ã“れを <emphasis>session-per-request-with-detached-objects パ"
"ターンã¨å‘¼ã³ã¾ã™ã€‚自動ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã‚’使ã†ã“ã¨ã§ã€åŒæ™‚ã«è¡Œã‚れる修æ£ã‚’分離ã§"
"ãã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<emphasis>Extended (or Long) Session: the Hibernate "
"<literal>Session can be disconnected from the underlying JDBC "
"connection after the database transaction has been committed and reconnected "
"when a new client request occurs. This pattern is known as <emphasis>session-"
"per-conversation</emphasis> and makes even reattachment unnecessary. "
"Automatic versioning is used to isolate concurrent modifications and the "
"<literal>Session will not be allowed to be flushed automatically, "
"but explicitly."
msgstr ""
"<emphasis>拡張(もã—ãã¯ã€é•·ã„)セッション - Hibernate ã® "
"<literal>Session ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’コミットã—ãŸå¾Œã€"
"è£ã§çµã³ã¤ã„ã¦ã„ã‚‹ JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’切æ–ã§ãã¾ã™ã€‚ãã—ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰"
"ã®æ–°ã—ã„è¦æ±‚ãŒç™ºç”Ÿã—ãŸéš›ã«ã€å†æŽ¥ç¶šã§ãã¾ã™ã€‚ã“ã®ãƒ‘ターンã¯ã€ "
"<emphasis>session-per-conversation ã¨ã„ã†åã§çŸ¥ã‚‰ã‚Œã¦ãŠã‚Šã€ã‚ªãƒ–"
"ジェクトをセッションã¸å†è¿½åŠ ã™ã‚‹ã“ã¨ã•ãˆä¸è¦ã«ã—ã¾ã™ã€‚自動ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã‚’使"
"ã†ã“ã¨ã§ã€åŒæ™‚ã«è¡Œã‚れる修æ£ã‚’分離ã§ãã¾ã™ã€‚通常 <literal>Session "
"を自動的ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã•ã›ãšã€æ˜Žç¤ºçš„ã«ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Both <emphasis>session-per-request-with-detached-objects and "
"<emphasis>session-per-conversation have advantages and "
"disadvantages. These disadvantages are discussed later in this chapter in "
"the context of optimistic concurrency control."
msgstr ""
"<emphasis>session-per-request-with-detached-objects 㨠"
"<emphasis>session-per-conversation ã®ï¼’ã¤ã¯ã€åˆ©ç‚¹ã¨æ¬ 点をæŒã£ã¦ã„"
"ã¾ã™ã€‚ã“ã‚Œã«ã¤ã„ã¦ã¯ã€ã“ã®ç« ã®å¾Œã®ã»ã†ã§ã€æ¥½è¦³çš„åŒæ™‚実行制御ã®æ–‡è„ˆã®ä¸ã§è°è«–"
"ã—ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Considering object identity"
msgstr "オブジェクトè˜åˆ¥åを考ãˆã‚‹"
#. Tag: para
#, no-c-format
msgid ""
"An application can concurrently access the same persistent state in two "
"different <literal>Sessions. However, an instance of a persistent "
"class is never shared between two <literal>Session instances. It "
"is for this reason that there are two different notions of identity:"
msgstr ""
"アプリケーションã¯ã€ï¼’ã¤ã®ç•°ãªã‚‹ <literal>Session ã‹ã‚‰åŒã˜æ°¸ç¶šçŠ¶æ…‹"
"ã«åŒæ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ã—ã‹ã—ã€ï¼’ã¤ã® <literal>Session インスタ"
"ンスãŒæ°¸ç¶šæ€§ã‚¯ãƒ©ã‚¹ã®ï¼‘ã¤ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’共有ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ゆãˆã«ã€è˜"
"別åã«ã¯ï¼’ã¤ã®ç•°ãªã‚‹æ¦‚念ãŒã‚ã‚‹ã¨ã„ã†ã“ã¨ã«ãªã‚Šã¾ã™ã€‚"
#. Tag: term
#, no-c-format
msgid "Database Identity"
msgstr "データベースè˜åˆ¥å"
#. Tag: para
#, fuzzy, no-c-format
msgid "<literal>foo.getId().equals( bar.getId() )"
msgstr "<literal>foo.getId().equals( bar.getId() )"
#. Tag: term
#, no-c-format
msgid "JVM Identity"
msgstr "JVM è˜åˆ¥å"
#. Tag: para
#, no-c-format
msgid "<literal>foo==bar"
msgstr ""
#. Tag: para
#, no-c-format
msgid ""
"For objects attached to a <emphasis>particular SessionSession), the two "
"notions are equivalent and JVM identity for database identity is guaranteed "
"by Hibernate. While the application might concurrently access the \"same"
"\" (persistent identity) business object in two different sessions, the two "
"instances will actually be \"different\" (JVM identity). Conflicts are "
"resolved using an optimistic approach and automatic versioning at flush/"
"commit time."
msgstr ""
"<emphasis>特定ã®Session ã«è¿½åŠ ã•ã‚ŒãŸã‚ªãƒ–ジェク"
"トã«ã¨ã£ã¦ (ã™ãªã‚ã¡ã€ï¼‘ã¤ã® <literal>Session ã®ã‚¹ã‚³ãƒ¼ãƒ—ã®ä¸ã§"
"ã¯ï¼‰ ã€ï¼’ã¤ã®æ¦‚念ã¯åŒã˜ã§ã™ã€‚データベースåŒä¸€æ€§ã¨ JVM åŒä¸€æ€§ãŒä¸€è‡´ã™ã‚‹ã“ã¨"
"を〠Hibernate ãŒä¿è¨¼ã—ã¾ã™ã€‚ã—ã‹ã—ã€ã‚¢ãƒ—リケーションãŒï¼’ã¤ã®ç•°ãªã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³"
"ã‹ã‚‰ã€ŒåŒã˜ã€ï¼ˆæ°¸ç¶šæ€§è˜åˆ¥åã®ï¼‰ãƒ“ジãƒã‚¹ã‚ªãƒ–ジェクトã«åŒæ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹é™ã‚Šã€"
"ï¼’ã¤ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯å®Ÿéš›ã«ï¼ˆ JVM è˜åˆ¥åãŒï¼‰ã€Œç•°ãªã‚Šã€ã¾ã™ã€‚楽観的アプãƒãƒ¼ãƒã«"
"よã£ã¦ã€ (自動ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã®ï¼‰ フラッシュï¼ã‚³ãƒŸãƒƒãƒˆæ™‚ã«ã‚³ãƒ³ãƒ•ãƒªã‚¯ãƒˆãŒè§£æ±º"
"ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"This approach leaves Hibernate and the database to worry about concurrency. "
"It also provides the best scalability, since guaranteeing identity in single-"
"threaded units of work means that it does not need expensive locking or "
"other means of synchronization. The application does not need to synchronize "
"on any business object, as long as it maintains a single thread per "
"<literal>Session. Within a Session the "
"application can safely use <literal>== to compare objects."
msgstr ""
"ã“ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã§ã¯ã€ Hibernate ã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«åŒæ™‚実行ã«ã¤ã„ã¦ã®å¿ƒé…ãŒæ®‹ã‚Šã¾"
"ã™ã€‚一方ã§ã€æœ€é«˜ã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティãŒæä¾›ã•ã‚Œã¾ã™ã€‚ãªãœãªã‚‰ã€ï¼‘スレッドã®ä½œæ¥"
"å˜ä½ã®ä¸ã§ä¸€æ„性ãŒä¿è¨¼ã•ã‚Œã‚Œã°ã€é«˜ä¾¡ãªãƒãƒƒã‚¯ã‚„åŒæœŸåŒ–ãŒä¸è¦ã«ãªã‚‹ãŸã‚ã§ã™ã€‚ "
"<literal>Session ã”ã¨ã«ï¼‘ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’貼り付ã‘ã‚‹é™ã‚Šã€ã‚¢ãƒ—リケー"
"ションã¯ãƒ“ジãƒã‚¹ã‚ªãƒ–ジェクトを synchronize ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。 "
"<literal>Session 内ã§ã¯ã€ã‚¢ãƒ—リケーションã¯ã‚ªãƒ–ジェクトを比較ã™ã‚‹ãŸ"
"ã‚ã«ã€ <literal>== を安全ã«ä½¿ç”¨ã§ãã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"However, an application that uses <literal>== outside of a "
"<literal>Session might produce unexpected results. This might "
"occur even in some unexpected places. For example, if you put two detached "
"instances into the same <literal>Set, both might have the same "
"database identity (i.e., they represent the same row). JVM identity, "
"however, is by definition not guaranteed for instances in a detached state. "
"The developer has to override the <literal>equals() and "
"<literal>hashCode() methods in persistent classes and implement "
"their own notion of object equality. There is one caveat: never use the "
"database identifier to implement equality. Use a business key that is a "
"combination of unique, usually immutable, attributes. The database "
"identifier will change if a transient object is made persistent. If the "
"transient instance (usually together with detached instances) is held in a "
"<literal>Set, changing the hashcode breaks the contract of the "
"<literal>Set. Attributes for business keys do not have to be as "
"stable as database primary keys; you only have to guarantee stability as "
"long as the objects are in the same <literal>Set. See the "
"Hibernate website for a more thorough discussion of this issue. Please note "
"that this is not a Hibernate issue, but simply how Java object identity and "
"equality has to be implemented."
msgstr ""
"ã‘ã‚Œã©ã‚‚〠<literal>Session ã®å¤–㧠== を使ã†ã‚¢ãƒ—"
"リケーションã¯ã€äºˆæœŸã—ãªã„çµæžœã«éé‡ã—ã¾ã™ã€‚ã“ã‚Œã¯äºˆæœŸã—ãªã„å ´æ‰€ã§èµ·ã“ã‚Šãˆã¾"
"ã™ã€‚例ãˆã°ã€ï¼’ã¤ã®åˆ†é›¢ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’åŒã˜ <literal>Set ã« put ã—ãŸã¨"
"ããªã©ã§ã™ã€‚両方ã¨ã‚‚åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è˜åˆ¥åã‚’æŒã¡ã¾ã™ï¼ˆã™ãªã‚ã¡ã€åŒã˜è¡Œã‚’表ã—"
"ã¾ã™ï¼‰ã€‚ã—ã‹ã—ã€åˆ†é›¢çŠ¶æ…‹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã® JVM è˜åˆ¥åã¯å½“然ä¿è¨¼ã•ã‚Œã¾ã›ã‚“。開発"
"者ã¯ã€æ°¸ç¶šæ€§ã‚¯ãƒ©ã‚¹ã® <literal>equals() 㨠hashCode() "
"ã«ä¿æŒã™ã‚‹å ´åˆã€ãƒãƒƒã‚·ãƒ¥ã‚³ãƒ¼ãƒ‰ãŒå¤‰ã‚ã‚‹ã¨ã„ã†ã“ã¨ã¯ã€ <literal>Set "
"ã®å¥‘ç´„ã‚’ç ´ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ビジãƒã‚¹ã‚ーã®ãŸã‚ã®å±žæ€§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸»ã‚ー"
"ã»ã©å®‰å®šã™ã¹ãã§ã¯ãªã„ã§ã™ã€‚オブジェクトãŒåŒã˜ <literal>Set ã®ä¸ã«"
"ã„ã‚‹é–“ã ã‘ã€å®‰å®šã‚’ä¿è¨¼ã™ã¹ãã§ã™ã€‚ã“ã®å•é¡Œã®ã‚ˆã‚Šå¾¹åº•çš„ãªè°è«–ã¯ã€ Hibernate "
"ã® Web サイトをå‚ç…§ã—ã¦ãã ã•ã„。ã¾ãŸã€ã“れ㯠Hibernate ã®å•é¡Œã§ã¯ãªãã€å˜ã« "
"Java オブジェクトã®è˜åˆ¥åã‚„ç‰ä¾¡æ€§ã‚’ã©ã®ã‚ˆã†ã«å®Ÿè£…ã™ã¹ãã‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Common issues"
msgstr "一般的ãªå•é¡Œ"
#. Tag: para
#, no-c-format
msgid ""
"Do not use the anti-patterns <emphasis>session-per-user-session "
"or <emphasis>session-per-application (there are, however, rare "
"exceptions to this rule). Some of the following issues might also arise "
"within the recommended patterns, so ensure that you understand the "
"implications before making a design decision:"
msgstr ""
"<emphasis>session-per-user-session 㨠session-per-"
"application</emphasis> アンãƒãƒ‘ターンã¯ä½¿ã£ã¦ã¯ã„ã‘ã¾ã›ã‚“(もã¡ã‚ã‚“ã€ã¾ã‚Œã«ä¾‹"
"外ãŒã‚ã‚Šã¾ã™ï¼‰ã€‚注記:下記ã®å•é¡Œã®ã„ãã¤ã‹ã¯ã€æŽ¨å¥¨ã•ã‚Œã‚‹ãƒ‘ターンã¨ã—ã¦ã‚‚出ç¾"
"ã—ã¾ã™ã€‚è¨è¨ˆã‚’決定ã™ã‚‹å‰ã«ã€è£ã®æ„味をç†è§£ã™ã‚‹ã‚ˆã†ã«ã—ã¦ãã ã•ã„。"
#. Tag: para
#, no-c-format
msgid ""
"A <literal>Session is not thread-safe. Things that work "
"concurrently, like HTTP requests, session beans, or Swing workers, will "
"cause race conditions if a <literal>Session instance is shared. If "
"you keep your Hibernate <literal>Session in your "
"<literal>HttpSession (this is discussed later in the chapter), you "
"should consider synchronizing access to your Http session. Otherwise, a user "
"that clicks reload fast enough can use the same <literal>Session "
"in two concurrently running threads."
msgstr ""
"<literal>Session ã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ã‚ã‚Šã¾ã›ã‚“。 HTTP リクエストã€"
"セッション Bean 〠Swing ワーカーã®ã‚ˆã†ã«ã€åŒæ™‚実行ãŒå¯èƒ½ãªã‚‚ã®ãŒ "
"<literal>Session インスタンスを共有ã™ã‚‹ã¨ã€ç«¶åˆçŠ¶æ…‹ã‚’引ãèµ·ã“ã—ã¾"
"ã™ã€‚(後ã§è°è«–ã™ã‚‹ï¼‰ <literal>HttpSession ã®ä¸ã§ Hibernate "
"<literal>Session ã‚’ä¿æŒã™ã‚‹å ´åˆã€ HttpSession ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’åŒæœŸåŒ–"
"ã™ã‚‹ã“ã¨ã‚’考慮ã™ã¹ãã§ã™ã€‚ã•ã‚‚ãªã‘ã‚Œã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå分早ãリãƒãƒ¼ãƒ‰ã‚’クリック"
"ã™ã‚‹ã¨ã€åŒæ™‚ã«èµ°ã‚‹ï¼’ã¤ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ä¸ã§ã€åŒã˜ <literal>Session ãŒä½¿"
"ã‚ã‚Œã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"An exception thrown by Hibernate means you have to rollback your database "
"transaction and close the <literal>Session immediately (this is "
"discussed in more detail later in the chapter). If your <literal>Session ã‚’é–‰ã˜ã‚‹ã¹ãã§ã™ (詳細を後ã§è°è«–ã—ã¾"
"ã™ï¼‰ 。 <literal>Session ãŒã‚¢ãƒ—リケーションã«çµã³ä»˜ã‘られã¦ã„ã‚‹ã®ã§"
"ã‚ã‚Œã°ã€ã‚¢ãƒ—リケーションをåœæ¢ã™ã¹ãã§ã™ã€‚データベーストランザクションをãƒãƒ¼"
"ルãƒãƒƒã‚¯ã—ã¦ã‚‚ã€ãƒ“ジãƒã‚¹ã‚ªãƒ–ジェクトã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’開始ã—ãŸã¨ãã®çŠ¶æ…‹ã«"
"戻りã¾ã›ã‚“。ã“ã‚Œã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®çŠ¶æ…‹ã¨ãƒ“ジãƒã‚¹ã‚ªãƒ–ジェクトã¯åŒæœŸã—ã¦ã„ãªã„"
"ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚通常ã“ã‚Œã¯å•é¡Œã«ãªã‚Šã¾ã›ã‚“。ãªãœãªã‚‰ã€ä¾‹å¤–ã¯å›žå¾©ã§ããªã„ã‹"
"らã§ã™ã€‚ã¨ã«ã‹ããƒãƒ¼ãƒ«ãƒãƒƒã‚¯ã—ãŸå¾Œã«ã‚„ã‚Šç›´ã™ã¹ãã§ã™ã€‚"
#. Tag: para
#, fuzzy, no-c-format
msgid ""
"The <literal>Session caches every object that is in a persistent "
"state (watched and checked for dirty state by Hibernate). If you keep it "
"open for a long time or simply load too much data, it will grow endlessly "
"until you get an OutOfMemoryException. One solution is to call <literal>clear"
"()</literal> and evict() to manage the Session open for the duration of a user session "
"also means a higher probability of stale data."
msgstr ""
"<literal>Session ã¯æ°¸ç¶š (persistent) 状態ã®ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトを"
"ã‚ャッシュã—ã¾ã™ï¼ˆ Hibernate ã¯ç›£è¦–ã—ã€ãƒ€ãƒ¼ãƒ†ã‚£çŠ¶æ…‹ã‹ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ï¼‰ã€‚ã“ã‚Œ"
"ã¯ã€é•·ã„間セッションを開ã„ãŸã¾ã¾ã«ã™ã‚‹ã‹ã€éžå¸¸ã«å¤šãã®ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒ¼ãƒ‰ã—続ã‘ã‚‹"
"ã‹ã—ãŸå ´åˆã¯ã€ OutOfMemoryException ãŒç™ºç”Ÿã™ã‚‹ã¾ã§ç„¡é™ã«å¤§ãããªã‚‹ã“ã¨ã‚’æ„味"
"ã—ã¾ã™ã€‚解決ç–ã®ï¼‘ã¤ã¯ã€<literal>Session ã‚ャッシュを管ç†ã™ã‚‹ãŸã‚"
"ã«ã€ <literal>clear() ã‹ evict() を呼ã¶ã“ã¨ã§"
"ã™ã€‚ã—ã‹ã—ã€å¤§ããªãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ãªã‚‰ã€ãŸã¶ã‚“ストアドプãƒã‚·ãƒ¼ã‚¸ãƒ£"
"を考慮ã™ã‚‹ã¹ãã§ã—ょã†ã€‚ã„ãã¤ã‹ã®è§£æ±ºç–ã¯ã€ <xref linkend=\"batch\"/> ã§ç´¹ä»‹"
"ã•ã‚Œã¦ã„ã¾ã™ã€‚ユーザーセッションã®é–“〠<literal>Session ã‚’é–‹ã„ãŸã¾"
"ã¾ã«ã™ã‚‹ã¨ã„ã†ã“ã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒæ–°é®®ã§ãªããªã‚‹ç¢ºçŽ‡ãŒé«˜ããªã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Database transaction demarcation"
msgstr "データベーストランザクション境界"
#. Tag: para
#, no-c-format
msgid ""
"Database, or system, transaction boundaries are always necessary. No "
"communication with the database can occur outside of a database transaction "
"(this seems to confuse many developers who are used to the auto-commit "
"mode). Always use clear transaction boundaries, even for read-only "
"operations. Depending on your isolation level and database capabilities this "
"might not be required, but there is no downside if you always demarcate "
"transactions explicitly. Certainly, a single database transaction is going "
"to perform better than many small transactions, even for reading data."
msgstr ""
"データベース (もã—ãã¯ã‚·ã‚¹ãƒ†ãƒ ) トランザクションã®å¢ƒç•Œã¯ã€å¸¸ã«å¿…è¦ã§ã™ã€‚"
"データベーストランザクションã®å¤–ã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®é€šä¿¡ã¯èµ·ãã¾ã›ã‚“ (ã“ã‚Œã¯"
"自動コミットモードã«æ…£ã‚Œã¦ã„る多ãã®é–‹ç™ºè€…ã‚’æ··ä¹±ã•ã›ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“) 。èªã¿"
"込むã ã‘ã®æ“作ã«ã§ã‚‚ã€ã„ã¤ã‚‚明確ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¢ƒç•Œã‚’使用ã—ã¦ãã ã•ã„。分"
"離レベルã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®èƒ½åŠ›æ¬¡ç¬¬ã§ã€ã“ã‚Œã¯å¿…è¦ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€å¸¸ã«ãƒˆãƒ©"
"ンザクション境界を明示的ã«æŒ‡å®šã—ã¦ã‚‚ã€ãƒžã‚¤ãƒŠã‚¹é¢ã¯å…¨ãã‚ã‚Šã¾ã›ã‚“。確ã‹ã«ã€ï¼‘"
"ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯å¤šæ•°ã®å°ã•ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚ˆã‚Š (データã®"
"èªã¿è¾¼ã¿ã§ã‚ã£ã¦ã‚‚) パフォーマンスãŒã™ãã‚Œã¦ã„ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"A Hibernate application can run in non-managed (i.e., standalone, simple "
"Web- or Swing applications) and managed J2EE environments. In a non-managed "
"environment, Hibernate is usually responsible for its own database "
"connection pool. The application developer has to manually set transaction "
"boundaries (begin, commit, or rollback database transactions) themselves. A "
"managed environment usually provides container-managed transactions (CMT), "
"with the transaction assembly defined declaratively (in deployment "
"descriptors of EJB session beans, for example). Programmatic transaction "
"demarcation is then no longer necessary."
msgstr ""
"J2EE 環境ã«ç®¡ç†ã•ã‚Œã¦ã„ãªã„状態 (ã™ãªã‚ã¡ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒãƒ³ã€å˜ç´”㪠Web ã‚„ "
"Swing アプリケーション)ã§ã‚‚ã€ç®¡ç†ã•ã‚ŒãŸçŠ¶æ…‹ã§ã‚‚〠Hibernate アプリケーション"
"を実行ã§ãã¾ã™ã€‚管ç†ã•ã‚Œã¦ã„ãªã„環境ã§ã¯ã€ Hiberante ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒã‚¯"
"ションプールをæä¾›ã—ã¾ã™ã€‚アプリケーション開発者ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¢ƒç•Œã‚’手"
"å‹•ã§è¨å®šã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。言ã„æ›ãˆã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®é–‹"
"始ã€ã‚³ãƒŸãƒƒãƒˆã€ãƒãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’開発者自身ãŒè¨å®šã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚通"
"常ã€ç®¡ç†ã•ã‚ŒãŸç’°å¢ƒã§ã¯ã€ã‚³ãƒ³ãƒ†ãƒŠç®¡ç†ã«ã‚ˆã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ (CMT) ãŒæä¾›ã•ã‚Œ"
"ã¾ã™ã€‚例ãˆã°ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ Bean ã®ãƒ‡ãƒ—ãƒã‚¤ãƒ¡ãƒ³ãƒˆãƒ‡ã‚£ã‚¹ã‚¯ãƒªãƒ—ã‚¿ã§å®£è¨€çš„ã«å®šç¾©"
"ã—ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’組ã¿ç«‹ã¦ã¾ã™ã€‚プãƒã‚°ãƒ©ãƒ ã«ã‚ˆã‚‹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¢ƒç•Œã¯ã‚‚"
"ã†å¿…è¦ã‚ã‚Šã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"However, it is often desirable to keep your persistence layer portable "
"between non-managed resource-local environments, and systems that can rely "
"on JTA but use BMT instead of CMT. In both cases use programmatic "
"transaction demarcation. Hibernate offers a wrapper API called "
"<literal>Transaction that translates into the native transaction "
"system of your deployment environment. This API is actually optional, but we "
"strongly encourage its use unless you are in a CMT session bean."
msgstr ""
"ã—ã‹ã—ãªãŒã‚‰ã€ç®¡ç†ã•ã‚Œã¦ã„ãªã„リソースãƒãƒ¼ã‚«ãƒ«ãªç’°å¢ƒã¨ JTA ã«ä¾å˜ã—ãŸã‚·ã‚¹ãƒ†"
"ム(CMT ã§ã¯ãªã BMT) ã®ä¸¡æ–¹ã«ã€æ°¸ç¶šåŒ–層をãƒãƒ¼ã‚¿ãƒ–ルã«ä¿ã¤ã®ã¯ã€ã—ã°ã—ã°æœ›"
"ã¾ã—ã„ã“ã¨ã§ã™ã€‚デプãƒã‚¤ç’°å¢ƒã®ãƒã‚¤ãƒ†ã‚£ãƒ–ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚·ã‚¹ãƒ†ãƒ を呼ã³å‡ºã™ "
"<literal>Transaction ã¨ã„ã†ãƒ©ãƒƒãƒ‘ー API ã‚’ Hibernate ãŒæä¾›ã—ã¾ã™ã€‚"
"ã“ã® API を使ã†ã‹ã¯ä»»æ„ã§ã™ãŒã€ CMT ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ Bean を使ã‚ãªã„ã®ã§ã‚ã‚Œã°ã€"
"使ã†ã“ã¨ã‚’å¼·ã推奨ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Ending a <literal>Session usually involves four distinct phases:"
msgstr ""
"通常〠<literal>Session 終了ã¯ã€ï¼”ã¤ã®ç•°ãªã‚‹ãƒ•ã‚§ãƒ¼ã‚ºã‚’å«ã¿ã¾ã™:"
#. Tag: para
#, no-c-format
msgid "flush the session"
msgstr "セッションã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥"
#. Tag: para
#, no-c-format
msgid "commit the transaction"
msgstr "トランザクションã®ã‚³ãƒŸãƒƒãƒˆ"
#. Tag: para
#, no-c-format
msgid "close the session"
msgstr "セッションã®ã‚¯ãƒãƒ¼ã‚º"
#. Tag: para
#, no-c-format
msgid "handle exceptions"
msgstr "例外ã®ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°"
#. Tag: para
#, no-c-format
msgid ""
"We discussed Flushing the session earlier, so we will now have a closer look "
"at transaction demarcation and exception handling in both managed and non-"
"managed environments."
msgstr ""
"セッションã®ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã«ã¤ã„ã¦ã¯ã€å‰ã®æ–¹ã§æ—¢ã«è°è«–ã—ã¾ã—ãŸã€‚管ç†ã•ã‚ŒãŸç’°å¢ƒã¨"
"管ç†ã•ã‚Œã¦ã„ãªã„環境ã®ä¸¡æ–¹ã«ã¤ã„ã¦ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¢ƒç•Œã¨ä¾‹å¤–ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã‚’"
"ã‚‚ã£ã¨è©³ã—ã見ã¦ã„ãã¾ã—ょã†ã€‚"
#. Tag: title
#, no-c-format
msgid "Non-managed environment"
msgstr "管ç†ã•ã‚Œã¦ã„ãªã„環境"
#. Tag: para
#, no-c-format
msgid ""
"If a Hibernate persistence layer runs in a non-managed environment, database "
"connections are usually handled by simple (i.e., non-DataSource) connection "
"pools from which Hibernate obtains connections as needed. The session/"
"transaction handling idiom looks like this:"
msgstr ""
"Hibernate 永続化層を管ç†ã•ã‚Œã¦ã„ãªã„環境ã§å®Ÿè£…ã™ã‚‹å ´åˆã¯ã€é€šå¸¸å˜ç´”ãªã‚³ãƒã‚¯"
"ションプール (ã™ãªã‚ã¡ DataSource ã§ã¯ãªã„) ã«ã‚ˆã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒã‚¯"
"ションを制御ã—ã¾ã™ã€‚ Hibernate ã¯ãã®ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ãƒ—ールã‹ã‚‰å¿…è¦ãªã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³"
"ã‚’å–å¾—ã—ã¾ã™ã€‚セッションï¼ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³åˆ¶å¾¡ã®ã‚¤ãƒ‡ã‚£ã‚ªãƒ ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾"
"ã™ï¼š"
#. Tag: para
#, fuzzy, no-c-format
msgid ""
"You do not have to <literal>flush() the Session "
"explicitly: the call to <literal>commit() automatically triggers "
"the synchronization depending on the <link linkend=\"objectstate-flushing"
"\">FlushMode</link> for the session. A call to close() "
"marks the end of a session. The main implication of <literal>close() ã® flush() を呼ã³å‡ºã™"
"ã¹ãã§ã¯ãªã〠<literal>commit() を呼ã³å‡ºã™ã“ã¨ã«ã‚ˆã‚Šã€è‡ªå‹•çš„ã«åŒæœŸ"
"化処ç†ãŒå®Ÿè¡Œã•ã‚Œã¾ã™ (セッション㮠<xref linkend=\"objectstate-flushing\"/> "
"FlushMode ã«ä¾å˜ã—ã¦ã„る)。 <literal>close() を呼ã³å‡ºã™ã“ã¨ã«ã‚ˆ"
"ã‚Šã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®çµ‚ã‚りを明確ã«ã—ã¾ã™ã€‚ <literal>close() ãŒæš—黙的ã«"
"è¡Œã†ä¸»ãªã“ã¨ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒ JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’開放ã™ã‚‹ã“ã¨ã§ã™ã€‚上記㮠"
"Java コードã¯ãƒãƒ¼ã‚¿ãƒ–ルã§ã‚ã‚Šã€ç®¡ç†ã•ã‚Œã¦ã„ãªã„環境㨠JTA 環境ã®ä¸¡æ–¹ã§å®Ÿè¡Œã§"
"ãã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"As outlined earlier, a much more flexible solution is Hibernate's built-in "
"\"current session\" context management:"
msgstr ""
"よりé©å¿œæ€§ã®ã‚る解決ç–ã¯ã€ Hibernate ã«äºˆã‚組ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ \"current session"
"\" コンテã‚スト管ç†ã§ã™ã€‚言葉ã§èª¬æ˜Žã™ã‚‹ã‚ˆã‚Šä¸‹è¨˜ã‚’見ãŸã»ã†ãŒé€Ÿã„ã§ã—ょã†ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"You will not see these code snippets in a regular application; fatal "
"(system) exceptions should always be caught at the \"top\". In other words, "
"the code that executes Hibernate calls in the persistence layer, and the "
"code that handles <literal>RuntimeException (and usually can only "
"clean up and exit), are in different layers. The current context management "
"by Hibernate can significantly simplify this design by accessing a "
"<literal>SessionFactory. Exception handling is discussed later in "
"this chapter."
msgstr ""
"æ£è¦ã®ã‚¢ãƒ—リケーションã®ä¸ã§ã¯ã€ã“ã®ã‚ˆã†ãªã‚³ãƒ¼ãƒ‰ã®åˆ‡ã‚Œç«¯ã‚’決ã—ã¦è¦‹ãªã„ã§ã—ょ"
"ã†ã€‚致命的㪠(システム) 例外ã¯ã€å¸¸ã«ã€Œæœ€ä¸Šä½ã€ã§ã‚ャッãƒã™ã¹ãã§ã™ã€‚言ã„æ›"
"ãˆã‚Œã°ã€ (永続化層ã§ï¼‰ Hibernate 呼ã³å‡ºã—を実行ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã¨ã€ "
"<literal>RuntimeException を制御ã™ã‚‹ (通常ã¯ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã¨çµ‚了ã®"
"ã¿è¡Œã†ã“ã¨ãŒã§ãる) コードã¯ã€åˆ¥ã€…ã®å±¤ã®ä¸ã«ã‚ã‚Šã¾ã™ã€‚ Hibernate ã«ã‚ˆã‚‹ã‚«ãƒ¬"
"ントコンテã‚スト管ç†ã¯ã€ã“ã®è¨è¨ˆã‚’ã‹ãªã‚Šå˜ç´”ã«ã—ã¾ã™ã€‚å¿…è¦ãªã®ã¯ã€ "
"<literal>SessionFactory ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã ã‘ã§ã™ã€‚例外処ç†ã¯ã€ã“"
"ã®ç« ã®å¾Œã®ã»ã†ã§è°è«–ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"You should select <literal>org.hibernate.transaction.JDBCTransactionFactory"
"\"thread\"</literal> as your hibernate."
"current_session_context_class</literal>."
msgstr ""
"注記:(デフォルトã§ã™ãŒï¼‰ <literal>org.hibernate.transaction."
"JDBCTransactionFactory</literal> ã‚’é¸æŠžã™ã‚‹ã¹ãã§ã™ã€‚第2ã®ç”¨ä¾‹ã¨ã—ã¦ã¯ã€ "
"<literal>hibernate.current_session_context_class ã‚’ "
"\"thread\"</literal> ã¨ã™ã‚‹ã¨ã‚ˆã„ã§ã—ょã†ã€‚"
#. Tag: title
#, no-c-format
msgid "Using JTA"
msgstr "JTA を使用ã™ã‚‹"
#. Tag: para
#, no-c-format
msgid ""
"If your persistence layer runs in an application server (for example, behind "
"EJB session beans), every datasource connection obtained by Hibernate will "
"automatically be part of the global JTA transaction. You can also install a "
"standalone JTA implementation and use it without EJB. Hibernate offers two "
"strategies for JTA integration."
msgstr ""
"永続化層をアプリケーションサーãƒãƒ¼ (例ãˆã°ã€ EJB セッション Bean ã®èƒŒå¾Œï¼‰ ã§"
"実行ã™ã‚‹å ´åˆã€ Hibernate ã‹ã‚‰å–å¾—ã™ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã¯ã€è‡ªå‹•"
"çš„ã«ã‚°ãƒãƒ¼ãƒãƒ« JTA トランザクションã®ä¸€éƒ¨ã«ãªã‚Šã¾ã™ã€‚ EJB を使ã‚ãšã«ã€ã‚¹ã‚¿ãƒ³"
"ドアãƒãƒ³ã® JTA 実装を導入ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ JTA çµ±åˆã®ãŸã‚ã«ã€ Hibernate ã¯"
"ï¼’ã¤ã®æˆ¦ç•¥ã‚’æä¾›ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"If you use bean-managed transactions (BMT), Hibernate will tell the "
"application server to start and end a BMT transaction if you use the "
"<literal>Transaction API. The transaction management code is "
"identical to the non-managed environment."
msgstr ""
"Bean 管ç†ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆBMT)を使ã„〠<literal>Transaction API "
"を使ã†å ´åˆã€ Hibernate ã¯ã‚¢ãƒ—リケーションサーãƒãƒ¼ã« BMT トランザクションã®é–‹"
"始ã¨çµ‚ã‚ã‚Šã‚’å‘Šã’ã¾ã™ã€‚ã™ãªã‚ã¡ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ç®¡ç†ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ç®¡ç†ã•ã‚Œãªã„"
"環境ã¨åŒã˜ã«ãªã‚Šã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"If you want to use a transaction-bound <literal>Session, that is, "
"the <literal>getCurrentSession() functionality for easy context "
"propagation, use the JTA <literal>UserTransaction API directly:"
msgstr ""
"トランザクション境界ã¨ã—㦠<literal>Session を使ã„ãŸã„å ´åˆã€ç°¡å˜ã«"
"コンテã‚ストをä¼æ’ã™ã‚‹æ©Ÿèƒ½ã§ã‚ã‚‹ <literal>getCurrentSession() ãŒã‚"
"ã‚‹ã®ã§ã€ JTAã® <literal>UserTransaction API を直接使用ã™ã¹ãã§ã—ょ"
"ã†ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"With CMT, transaction demarcation is completed in session bean deployment "
"descriptors, not programmatically. The code is reduced to:"
msgstr ""
"CMT ã§ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å¢ƒç•Œã‚’セッション Bean ã®ãƒ‡ãƒ—ãƒã‚¤ãƒ¡ãƒ³ãƒˆãƒ‡ã‚£ã‚¹ã‚¯ãƒªãƒ—"
"ã‚¿ã§å®šç¾©ã—ã€ãƒ—ãƒã‚°ãƒ©ãƒ ã§ã¯è¡Œã„ã¾ã›ã‚“。ゆãˆã«ã€ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚ˆã†ã«å°‘ãªããªã‚Šã¾"
"ã™:"
#. Tag: para
#, no-c-format
msgid ""
"In a CMT/EJB, even rollback happens automatically. An unhandled "
"<literal>RuntimeException thrown by a session bean method tells "
"the container to set the global transaction to rollback. <emphasis>You do "
"not need to use the Hibernate <literal>Transaction API at all with "
"BMT or CMT, and you get automatic propagation of the \"current\" Session "
"bound to the transaction.</emphasis>"
msgstr ""
"CMT/EJB ã®ä¸ã§ã¯ã€å¸¸ã«ãƒãƒ¼ãƒ«ãƒãƒƒã‚¯ãŒè‡ªå‹•çš„ã«å®Ÿæ–½ã•ã‚Œã¾ã™ã€‚ãªãœãªã‚‰ã€ã‚»ãƒƒã‚·ãƒ§"
"ン Bean ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã‚ŠæŠ•ã’られãŸåˆ¶å¾¡ã•ã‚Œã¦ã„ãªã„ "
"<literal>RuntimeException ã¯ã€ã‚°ãƒãƒ¼ãƒãƒ«ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãƒãƒ¼ãƒ«"
"ãƒãƒƒã‚¯ã™ã‚‹ã‚ˆã†ã«ã‚³ãƒ³ãƒ†ãƒŠã«ä¼ãˆã‚‹ãŸã‚ã§ã™ã€‚ <emphasis>ã“ã‚Œã¯ã€ BMT ã‚‚ã—ã㯠"
"CMT ã¨ä¸€ç·’ã« Hibernate <literal>Transaction API を使ã†å¿…è¦ã¯ã¾ã£ãŸ"
"ããªã„ã¨ã„ã†ã“ã¨ã‚’æ„味ã—ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã«ãƒã‚¤ãƒ³ãƒ‰ã™ã‚‹ã€Œç¾åœ¨ã®ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³"
"を自動ä¼æ¬ã§ãã¾ã™ã€‚</emphasis>"
#. Tag: para
#, no-c-format
msgid ""
"When configuring Hibernate's transaction factory, choose <literal>org."
"hibernate.transaction.JTATransactionFactory</literal> if you use JTA "
"directly (BMT), and <literal>org.hibernate.transaction."
"CMTTransactionFactory</literal> in a CMT session bean. Remember to also set "
"<literal>hibernate.transaction.manager_lookup_class. Ensure that "
"your <literal>hibernate.current_session_context_class is either "
"unset (backwards compatibility), or is set to <literal>\"jta\"."
msgstr ""
"Hibernate ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãƒ•ã‚¡ã‚¯ãƒˆãƒªã‚’è¨å®šã™ã‚‹éš›ã«ã€ JTA を直接使ㆠ(BMT"
"ã®ï¼‰ å ´åˆã¯ <literal>org.hibernate.transaction.JTATransactionFactoryorg.hibernate."
"transaction.CMTTransactionFactory</literal> ã‚’é¸æŠžã™ã¹ãã ã¨ã„ã†ã“ã¨ã«æ³¨æ„ã—"
"ã¦ãã ã•ã„。 <literal>hibernate.transaction.manager_lookup_class ã‚’"
"セットã™ã‚‹ã“ã¨ã‚‚æ€ã„出ã—ã¦ãã ã•ã„。ãªãŠã€ <literal>hibernate."
"current_session_context_class</literal> ã¯ã€ã‚»ãƒƒãƒˆã—ãªã„ã‹ï¼ˆå¾Œæ–¹äº’æ›ï¼‰ã€ "
"<literal>\"jta\" をセットã—ã¦ãã ã•ã„。"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>getCurrentSession() operation has one downside in a "
"JTA environment. There is one caveat to the use of <literal>after_statement or "
"<literal>Iterator instances returned by scroll()iterate(). You must "
"release the underlying database cursor by calling <literal>ScrollableResults."
"close()</literal> or Hibernate.close(Iterator) explicitly "
"from a <literal>finally block. Most applications can easily avoid "
"using <literal>scroll() or iterate() from the "
"JTA or CMT code.)"
msgstr ""
"<literal>getCurrentSession() オペレーションã¯ã€ JTA 環境ã§ã¯ï¼‘ã¤ã®"
"æ¬ ç‚¹ã‚’æŒã¡ã¾ã™ã€‚デフォルトã§ä½¿ã‚れる <literal>after_statement コãƒ"
"クションリリースモードを使用ã™ã‚‹ä¸Šã§ã€è¦å‘ŠãŒï¼‘ã¤ã‚ã‚Šã¾ã™ã€‚ JTA 仕様ã®æ„šã‹ãªåˆ¶"
"ç´„ã®ãŸã‚ã«ã€ <literal>scroll() ã¾ãŸã¯ iterate() "
"ãŒè¿”ã—ãŸã€é–‰ã˜ã‚‰ã‚Œã¦ã„ãªã„ <literal>ScrollableResults ã¾ãŸã¯ "
"<literal>Iterator インスタンスを Hibernate ãŒè‡ªå‹•çš„ã«ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—"
"ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 <literal>finally ブãƒãƒƒã‚¯ã®ä¸ã§ã€ "
"<literal>ScrollableResults.close() ã¾ãŸã¯ Hibernate.close"
"(Iterator)</literal> を明示的ã«å‘¼ã³å‡ºã—ã¦ã€è£ã«æ½œã‚“ã データベースカーソルを解"
"放 <emphasis>ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“。 (もã¡ã‚ã‚“ã€å¤šãã®ã‚¢ãƒ—リケー"
"ションã§ã¯ã€ JTA ã‹ CMT コード㧠<literal>scroll() ã‚„ "
"<literal>iterate() ã®ä½¿ç”¨ã‚’é¿ã‘ã‚‹ã®ã¯å®¹æ˜“ã§ã™ã€‚)"
#. Tag: title
#, no-c-format
msgid "Exception handling"
msgstr "例外ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°"
#. Tag: para
#, no-c-format
msgid ""
"If the <literal>Session throws an exception, including any "
"<literal>SQLException, immediately rollback the database "
"transaction, call <literal>Session.close() and discard the "
"<literal>Session instance. Certain methods of Sessionnot leave the session in a consistent "
"state. No exception thrown by Hibernate can be treated as recoverable. "
"Ensure that the <literal>Session will be closed by calling "
"<literal>close() in a finally block."
msgstr ""
"<literal>Session ãŒä¾‹å¤– (SQLExceptionã‚’å«ã‚€ï¼‰ "
"を投ã’ãŸå ´åˆã€ç›´ã¡ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãƒãƒ¼ãƒ«ãƒãƒƒã‚¯ã—〠"
"<literal>Session.close() を呼ã³ã€ Session インス"
"ã‚¿ãƒ³ã‚¹ã‚’ç ´æ£„ã™ã¹ãã§ã™ã€‚ <literal>Session ã®ã„ãã¤ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€"
"セッションã®çŠ¶æ…‹ã‚’ <emphasis>矛盾ã—ãŸã¾ã¾ ã«ã—ã¾ã™ã€‚ Hibernate ãŒ"
"投ã’ãŸä¾‹å¤–ã‚’ã€å›žå¾©ã§ãã‚‹ã‚‚ã®ã¨ã—ã¦æ‰±ã†ã“ã¨ã¯ã§ãã¾ã›ã‚“。 <literal>finallyclose() を呼んã§ã€ "
"<literal>Session を確実ã«é–‰ã˜ã¦ãã ã•ã„。"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>HibernateException, which wraps most of the errors "
"that can occur in a Hibernate persistence layer, is an unchecked exception. "
"It was not in older versions of Hibernate. In our opinion, we should not "
"force the application developer to catch an unrecoverable exception at a low "
"layer. In most systems, unchecked and fatal exceptions are handled in one of "
"the first frames of the method call stack (i.e., in higher layers) and "
"either an error message is presented to the application user or some other "
"appropriate action is taken. Note that Hibernate might also throw other "
"unchecked exceptions that are not a <literal>HibernateException. "
"These are not recoverable and appropriate action should be taken."
msgstr ""
"<literal>HibernateException ã¯ã€ Hibernate 永続化層ã®ä¸ã§ç™ºç”Ÿã™ã‚‹å¤š"
"ãã®ã‚¨ãƒ©ãƒ¼ã‚’ラップã™ã‚‹ã€æ¤œæŸ»ã•ã‚Œãªã„例外ã§ã™ ( Hibernate ã®å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯"
"é•ã„ã¾ã—ãŸï¼‰ 。ç§ãŸã¡ã®æ„見ã¯ã€ã‚¢ãƒ—リケーション開発者ã«å›žå¾©ä¸å¯èƒ½ãªä¾‹å¤–を下層"
"ã§ã‚ャッãƒã™ã‚‹ã“ã¨ã‚’å¼·è¦ã™ã¹ãã§ã¯ãªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚多ãã®ã‚·ã‚¹ãƒ†ãƒ ã§ã¯ã€æ¤œ"
"査ã•ã‚Œãªã„例外ã¨è‡´å‘½çš„ãªä¾‹å¤–ã¯ã€ã‚³ãƒ¼ãƒ«ã‚¹ã‚¿ãƒƒã‚¯ã®æœ€åˆã®ãƒ•ãƒ¬ãƒ¼ãƒ ã®ï¼‘㤠(例ãˆ"
"ã°ã€æœ€ä¸Šä½ã®å±¤ã§ï¼‰ ã§ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã—ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’アプリケーションユー"
"ザーã«è¡¨ç¤ºã—ã¾ã™ (もã—ãã¯ã€ä»–ã®é©åˆ‡ãªå‡¦ç†ã‚’実施ã—ã¾ã™ï¼‰ 。 Hibernate ã¯ã€"
"<literal>HibernateException 以外ã®æ¤œæŸ»ã•ã‚Œãªã„例外も投ã’ã‚‹ã“ã¨ã«æ³¨"
"æ„ã—ã¦ãã ã•ã„。ã“れらもã¾ãŸã€å›žå¾©ä¸å¯èƒ½ã§ã‚ã‚Šã€é©åˆ‡ãªå‡¦ç†ã‚’実施ã™ã¹ãã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Hibernate wraps <literal>SQLExceptions thrown while interacting "
"with the database in a <literal>JDBCException. In fact, Hibernate "
"will attempt to convert the exception into a more meaningful subclass of "
"<literal>JDBCException. The underlying SQLExceptionJDBCException.getCause()SQLException into an "
"appropriate <literal>JDBCException subclass using the "
"<literal>SQLExceptionConverter attached to the "
"<literal>SessionFactory. By default, the "
"<literal>SQLExceptionConverter is defined by the configured "
"dialect. However, it is also possible to plug in a custom implementation. "
"See the javadocs for the <literal>SQLExceptionConverterFactory "
"class for details. The standard <literal>JDBCException subtypes "
"are:"
msgstr ""
"Hibernate ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®å¯¾è©±ä¸ã«æŠ•ã’られ㟠<literal>SQLExceptionJDBCException ã§ãƒ©ãƒƒãƒ—ã—ã¾ã™ã€‚実ã¯ã€ä¾‹å¤–をより"
"æ„味ã®ã‚ã‚‹ <literal>JDBCException ã®ã‚µãƒ–クラスã«å¤‰æ›ã—よã†ã¨è©¦ã¿ã¾"
"ã™ã€‚元㮠<literal>SQLException ã¯ã€ JDBCException.getCause"
"()</literal> ã«ã‚ˆã‚Šã„ã¤ã§ã‚‚得られã¾ã™ã€‚ Hibernate ã¯ã€ "
"<literal>SessionFactory ã«è¿½åŠ ã•ã‚Œã¦ã„ã‚‹ "
"<literal>SQLExceptionConverter を使ã„〠SQLExceptionJDBCException サブクラスã«å¤‰æ›ã—ã¾ã™ã€‚デ"
"フォルトã§ã¯ã€ <literal>SQLExceptionConverter ã¯è¨å®šã•ã‚Œã¦ã„ã‚‹ SQL "
"方言ã«ã‚ˆã‚Šå®šç¾©ã•ã‚Œã¾ã™ã€‚一方ã§ã€ç‹¬è‡ªã®å®Ÿè£…ã«å·®ã—替ãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (詳細"
"ã¯ã€ <literal>SQLExceptionConverterFactory クラス㮠Javadoc ã‚’å‚ç…§"
"ã—ã¦ãã ã•ã„)。標準的㪠<literal>JDBCException ã®ã‚µãƒ–タイプを下記"
"ã«ç¤ºã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>JDBCConnectionException: indicates an error with the "
"underlying JDBC communication."
msgstr ""
"<literal>JDBCConnectionException - 基礎ã¨ãªã‚‹ JDBC 通信ã®ã‚¨ãƒ©ãƒ¼ã‚’表"
"ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>SQLGrammarException: indicates a grammar or syntax "
"problem with the issued SQL."
msgstr ""
"<literal>SQLGrammarException - 発行ã™ã‚‹ SQL ã®æ–‡æ³•ã‚‚ã—ãã¯æ§‹æ–‡ã®å•"
"題を表ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>ConstraintViolationException: indicates some form of "
"integrity constraint violation."
msgstr ""
"<literal>ConstraintViolationException - 何らã‹ã®å½¢å¼ã®å®Œå…¨æ€§åˆ¶ç´„é•"
"åを表ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>LockAcquisitionException: indicates an error acquiring a "
"lock level necessary to perform the requested operation."
msgstr ""
"<literal>LockAcquisitionException - è¦æ±‚ã•ã‚ŒãŸæ“作を実施ã™ã‚‹ã®ã«å¿…"
"è¦ãªãƒãƒƒã‚¯ãƒ¬ãƒ™ãƒ«ã‚’å¾—ã‚‹éš›ã®ã‚¨ãƒ©ãƒ¼ã‚’表ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>GenericJDBCException: a generic exception which did not "
"fall into any of the other categories."
msgstr ""
"<literal>GenericJDBCException - ä»–ã®ã‚«ãƒ†ã‚´ãƒªã«ä¸€è‡´ã—ãªã‹ã£ãŸä¸€èˆ¬çš„"
"ãªä¾‹å¤–ã§ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Transaction timeout"
msgstr "トランザクションã®ã‚¿ã‚¤ãƒ アウト"
#. Tag: para
#, no-c-format
msgid ""
"An important feature provided by a managed environment like EJB, that is "
"never provided for non-managed code, is transaction timeout. Transaction "
"timeouts ensure that no misbehaving transaction can indefinitely tie up "
"resources while returning no response to the user. Outside a managed (JTA) "
"environment, Hibernate cannot fully provide this functionality. However, "
"Hibernate can at least control data access operations, ensuring that "
"database level deadlocks and queries with huge result sets are limited by a "
"defined timeout. In a managed environment, Hibernate can delegate "
"transaction timeout to JTA. This functionality is abstracted by the "
"Hibernate <literal>Transaction object."
msgstr ""
"EJB ã®ã‚ˆã†ãªç®¡ç†ã•ã‚ŒãŸç’°å¢ƒãŒæä¾›ã™ã‚‹ãã‚ã‚ã¦é‡è¦ãªç‰¹å¾´ã®ï¼‘ã¤ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯"
"ションã®ã‚¿ã‚¤ãƒ アウトã§ã™ã€‚ã“ã‚Œã¯ç®¡ç†ã•ã‚Œã¦ã„ãªã„コードã«ã¯æä¾›ã§ãã¾ã›ã‚“。ト"
"ランザクションタイムアウトã¯ã€ä¸å“è¡Œãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ¬ã‚¹ãƒãƒ³ã‚¹"
"ã‚’è¿”ã•ãªã„ã¾ã¾ã€ç„¡æœŸé™ã«ãƒªã‚½ãƒ¼ã‚¹ã‚’使ã„続ã‘ãªã„ã“ã¨ã‚’ä¿éšœã—ã¾ã™ã€‚管ç†ã•ã‚ŒãŸç’°"
"境 (JTA) ã®å¤–ã§ã¯ã€ Hibernate ã¯ã“ã®æ©Ÿèƒ½ã‚’フルã«æä¾›ã§ãã¾ã›ã‚“。ã—ã‹ã—ãªãŒ"
"ら〠Hibernate ã¯æ¬¡ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹æ“作ã®åˆ¶å¾¡ãらã„ã¯ã§ãã¾ã™ã€‚データ"
"ベースレベルã®ãƒ‡ãƒƒãƒ‰ãƒãƒƒã‚¯ã‚„大ããªãƒªã‚¶ãƒ«ãƒˆã‚»ãƒƒãƒˆã‚’è¿”ã™ã‚¯ã‚¨ãƒªã‚’定義ã•ã‚ŒãŸã‚¿ã‚¤"
"ムアウトã«ã‚ˆã£ã¦ç¢ºå®Ÿã«åˆ¶é™ã—ã¾ã™ã€‚管ç†ã•ã‚ŒãŸç’°å¢ƒã§ã¯ã€ Hibernate ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯"
"ションタイムアウトを JTA ã«å§”è²ã—ã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€ Hibernate ã® "
"<literal>Transaction オブジェクトã«ã‚ˆã£ã¦æŠ½è±¡åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>setTimeout() cannot be called in a CMT bean, where "
"transaction timeouts must be defined declaratively."
msgstr ""
"CMT Bean ã®ä¸ã§ã¯ <literal>setTimeout() を呼ã³å‡ºã›ãªã„ã“ã¨ã«æ³¨æ„ã—"
"ã¦ãã ã•ã„。トランザクションタイムアウトã¯å®£è¨€çš„ã«å®šç¾©ã•ã‚Œã‚‹ã¹ãã§ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Optimistic concurrency control"
msgstr "楽観的åŒæ™‚実行制御"
#. Tag: para
#, no-c-format
msgid ""
"The only approach that is consistent with high concurrency and high "
"scalability, is optimistic concurrency control with versioning. Version "
"checking uses version numbers, or timestamps, to detect conflicting updates "
"and to prevent lost updates. Hibernate provides three possible approaches to "
"writing application code that uses optimistic concurrency. The use cases we "
"discuss are in the context of long conversations, but version checking also "
"has the benefit of preventing lost updates in single database transactions."
msgstr ""
"高ã„並列性ã¨é«˜ã„スケーラビリティã®ä¸¡æ–¹ã‚’実ç¾ã™ã‚‹ã‚¢ãƒ—ãƒãƒ¼ãƒã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°"
"を使ã£ãŸæ¥½è¦³çš„åŒæ™‚実行制御ã®ã¿ã§ã™ã€‚æ›´æ–°ã®è¡çªã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ï¼ˆãŠã‚ˆã³ã€æ›´æ–°"
"ãŒå¤±ã‚れるã®ã‚’防ããŸã‚ã«ï¼‰ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚‚ã—ãã¯ã‚¿ã‚¤ãƒ スタンプを使ã£ã¦ã€"
"ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ Hibernate ã¯ã€æ¥½è¦³çš„åŒæ™‚実行を行ã†ã‚¢ãƒ—リケーショ"
"ンコードを書ããŸã‚ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã‚’3ã¤æä¾›ã—ã¾ã™ã€‚ç§ãŸã¡ãŒè¦‹ã›ã‚‹ãƒ¦ãƒ¼ã‚¹ã‚±ãƒ¼ã‚¹"
"ã¯ã€é•·ã„対話をæŒã¡ã¾ã™ãŒã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã¯ã¾ã 1ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶"
"クションã®ä¸ã§æ›´æ–°ã‚’失ã†ã“ã¨ã‚’防ã利点もæŒã£ã¦ã„ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Application version checking"
msgstr "アプリケーションã«ã‚ˆã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯"
#. Tag: para
#, no-c-format
msgid ""
"In an implementation without much help from Hibernate, each interaction with "
"the database occurs in a new <literal>Session and the developer is "
"responsible for reloading all persistent instances from the database before "
"manipulating them. The application is forced to carry out its own version "
"checking to ensure conversation transaction isolation. This approach is the "
"least efficient in terms of database access. It is the approach most similar "
"to entity EJBs."
msgstr ""
"Hibernate ã«ã»ã¨ã‚“ã©åŠ©ã‘ã¦ã‚‚らã‚ãšã«å®Ÿè£…ã™ã‚‹ã‚±ãƒ¼ã‚¹ã§ã™ã€‚データベースã¨ã®ã‚„ã‚Š"
"å–ã‚Šã¯ã€ãã‚Œãžã‚Œæ–°ã—ã„ <literal>Session ã®ä¸ã§èµ·ã“ã‚Šã¾ã™ã€‚開発者"
"ã¯ã€ã™ã¹ã¦ã®æ°¸ç¶šæ€§ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’æ“作ã™ã‚‹å‰ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å†èªã¿è¾¼ã¿ã™ã‚‹"
"責務ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã§ã¯ã€å¯¾è©±ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®åˆ†é›¢ã‚’守るãŸã‚ã«ã€"
"アプリケーション自身ãŒãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ãƒãƒ¼ãƒ"
"ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹ã®ä¸ã§ã¯ã€æœ€ã‚‚éžåŠ¹çŽ‡ã§ã™ã€‚エンティティ EJB ã¨æœ€ã‚‚ä¼¼ã¦"
"ã„るアプãƒãƒ¼ãƒã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>version property is mapped using <"
"version></literal>, and Hibernate will automatically increment it during "
"flush if the entity is dirty."
msgstr ""
"<literal><version> を使ã£ã¦ã€ version プãƒ"
"パティをマッピングã—ã¾ã™ã€‚ Hibernate ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ€ãƒ¼ãƒ†ã‚£ã§ã‚ã‚‹å ´åˆã€ãƒ•"
"ラッシュã—ã€ãã®é–“ã« <literal>version プãƒãƒ‘ティを自動的ã«ã‚¤ãƒ³ã‚¯ãƒª"
"メントã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"If you are operating in a low-data-concurrency environment, and do not "
"require version checking, you can use this approach and skip the version "
"check. In this case, <emphasis>last commit wins is the default "
"strategy for long conversations. Be aware that this might confuse the users "
"of the application, as they might experience lost updates without error "
"messages or a chance to merge conflicting changes."
msgstr ""
"ã‚‚ã¡ã‚ã‚“ã€ãƒ‡ãƒ¼ã‚¿ã®ä¸¦åˆ—性ãŒä½Žã„環境ã§é‹ç”¨ã—ã¦ãŠã‚Šã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ãŒä¸è¦ãª"
"らã€ã“ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã‚’使ã„ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã‚’スã‚ップã™ã‚‹ã ã‘ã§ã™ã€‚ãã®å ´åˆ"
"ã¯ã€é•·ã„対話ã«ã¯ã€ <emphasis>最後ã«ã‚³ãƒŸãƒƒãƒˆã—ãŸã‚‚ã®ãŒå‹ã¤ ãŒãƒ‡ãƒ•ã‚©"
"ルトã®æˆ¦ç•¥ã§ã—ょã†ã€‚ã“ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã¯ã€ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’æ··ä¹±ã•ã›ã‚‹"
"ã‹ã‚‚ã—ã‚Œãªã„ã“ã¨ã‚’心ã«ç•™ã‚ã¦ç½®ã„ã¦ãã ã•ã„。ãã‚Œã¯ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚„競åˆã—"
"ãŸå¤‰æ›´ã‚’マージã™ã‚‹æ©Ÿä¼šãŒãªã„ã¾ã¾ã€æ›´æ–°ã‚’失ã†å¯èƒ½æ€§ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Manual version checking is only feasible in trivial circumstances and not "
"practical for most applications. Often not only single instances, but "
"complete graphs of modified objects, have to be checked. Hibernate offers "
"automatic version checking with either an extended <literal>Session instance and its persistent instances "
"that are used for the whole conversation are known as <emphasis>session-per-"
"conversation</emphasis>. Hibernate checks instance versions at flush time, "
"throwing an exception if concurrent modification is detected. It is up to "
"the developer to catch and handle this exception. Common options are the "
"opportunity for the user to merge changes or to restart the business "
"conversation with non-stale data."
msgstr ""
"1ã¤ã® <literal>Session インスタンスã¨ãã®æ°¸ç¶šæ€§ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€ "
"<emphasis>session-per-conversation ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã‚‹ã€å¯¾è©±å…¨ä½“ã§ä½¿ã‚"
"ã‚Œã¾ã™ã€‚ Hibernate ã¯ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹éš›ã«ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ãƒã‚§ãƒƒã‚¯ã—"
"ã¾ã™ã€‚åŒæ™‚ã«ä¿®æ£ã•ã‚ŒãŸã“ã¨ã‚’検出ã™ã‚‹ã¨ã€ä¾‹å¤–を投ã’ã¾ã™ã€‚ã“ã®ä¾‹å¤–ã‚’ã‚ャッãƒã—"
"ã¦æ‰±ã†ã®ã¯ã€é–‹ç™ºè€…ã®è²¬ä»»ã§ã™ (一般的ãªé¸æŠžè‚¢ã¯ã€å¤‰æ›´ã‚’マージã™ã‚‹ã‹å¤ããªã„"
"データã§ãƒ“ジãƒã‚¹å¯¾è©±ã‚’å†ã‚¹ã‚¿ãƒ¼ãƒˆã™ã‚‹æ©Ÿä¼šã‚’ユーザーã«æä¾›ã™ã‚‹ã“ã¨ã§ã™ï¼‰ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>Session is disconnected from any underlying JDBC "
"connection when waiting for user interaction. This approach is the most "
"efficient in terms of database access. The application does not version "
"check or reattach detached instances, nor does it have to reload instances "
"in every database transaction."
msgstr ""
"ユーザーã®å¯¾è©±ã‚’å¾…ã£ã¦ã„ã‚‹ã¨ãã¯ã€ <literal>Session を基礎ã¨ãªã‚‹ "
"JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰åˆ‡ã‚Šé›¢ã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ—ãƒãƒ¼ãƒã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹ã®ä¸"
"ã§ã¯ã€æœ€ã‚‚効率的ã§ã™ã€‚アプリケーションã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã‚„分離ã•ã‚ŒãŸã‚¤ãƒ³"
"スタンスをå†è¿½åŠ ã™ã‚‹ã“ã¨ã«é–¢å¿ƒã‚’æŒã¤å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。ã¾ãŸã€ã‚らゆるデータ"
"ベーストランザクションã®ä¸ã§ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’å†èªã¿è¾¼ã¿ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>foo object knows which Session it "
"was loaded in. Beginning a new database transaction on an old session "
"obtains a new connection and resumes the session. Committing a database "
"transaction disconnects a session from the JDBC connection and returns the "
"connection to the pool. After reconnection, to force a version check on data "
"you are not updating, you can call <literal>Session.lock() with "
"<literal>LockMode.READ on any objects that might have been updated "
"by another transaction. You do not need to lock any data that you "
"<emphasis>are updating. Usually you would set FlushMode."
"MANUAL</literal> on an extended Session, so that only the "
"last database transaction cycle is allowed to actually persist all "
"modifications made in this conversation. Only this last database transaction "
"will include the <literal>flush() operation, and then "
"<literal>close() the session to end the conversation."
msgstr ""
"<literal>foo オブジェクトã¯ã€è‡ªåˆ†ã‚’ãƒãƒ¼ãƒ‰ã—㟠SessionSession.lock() を呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾"
"ã™ã€‚æ›´æ–°ã—㦠<emphasis>ã„ã‚‹ データをãƒãƒƒã‚¯ã™ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“。通"
"常ã€æ‹¡å¼µ <literal>Session ã« FlushMode.MANUAL ã‚’"
"セットã—ã¾ã™ã€‚最後ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®å‘¨æœŸã§ã®ã¿ã€å¯¾è©±ã®ä¸ã§å¤‰æ›´"
"ã•ã‚ŒãŸã™ã¹ã¦ã‚’実際ã«æ°¸ç¶šåŒ–ã•ã›ã‚‹ãŸã‚ã§ã™ã€‚ゆãˆã«ã€æœ€å¾Œã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒˆãƒ©ãƒ³ã‚¶"
"クションã®ã¿ <literal>flush() オペレーションをå«ã¿ã¾ã™ã€‚ãã—ã¦ã€å¯¾"
"話を終ã‚らã›ã‚‹ãŸã‚ã«ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚‚ <literal>close() ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"This pattern is problematic if the <literal>Session is too big to "
"be stored during user think time (for example, an <literal>HttpSessionSession only for a single conversation as it will soon "
"have stale data."
msgstr ""
"ユーザーãŒè€ƒæ…®ä¸ã«ã€æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ããªã„ãらㄠ<literal>Session "
"ãŒå¤§ãã„ã®ã§ã‚ã‚Œã°ã€ã“ã®ãƒ‘ターンã¯å•é¡ŒãŒã‚ã‚Šã¾ã™ã€‚例ãˆã°ã€ "
"<literal>HttpSession ã¯å¯èƒ½ãªé™ã‚Šå°ã•ãä¿ã¤ã¹ãã§ã™ã€‚ "
"<literal>Session 㯠(強制的ã«ï¼‰ 1次ã‚ャッシュã§ã‚‚ã‚ã‚Šã€ãƒãƒ¼ãƒ‰ã—ãŸ"
"オブジェクトをã™ã¹ã¦ä¿æŒã—ã¾ã™ã€‚ãŠãらãã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆï¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®ã‚µã‚¤ã‚¯ãƒ«ãŒ"
"数回ã§ã‚ã‚Œã°ã€ã“ã®æˆ¦ç•¥ãŒä½¿ãˆã¾ã™ã€‚1ã¤ã®å¯¾è©±ã®ãŸã‚ã ã‘ã« <literal>Session. These methods are deprecated, "
"as beginning and ending a transaction has the same effect."
msgstr ""
"Hibernate ã®ä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€æ˜Žç¤ºçš„㪠<literal>Session ã®åˆ‡æ–ã¨"
"å†æŽ¥ç¶šãŒå¿…è¦ã ã£ãŸã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯éžæŽ¨å¥¨ã«ãªã‚Šã¾ã—"
"ãŸã€‚ãªãœãªã‚‰ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®é–‹å§‹ã¨çµ‚了ã¯åŒã˜åŠ¹æžœãŒã‚ã‚‹ãŸã‚ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Keep the disconnected <literal>Session close to the persistence "
"layer. Use an EJB stateful session bean to hold the <literal>Session."
msgstr ""
"切æ–ã—㟠<literal>Session を永続化層ã®è¿‘ãã§ä¿æŒã™ã¹ãã§ã‚ã‚‹ã“ã¨ã«"
"注æ„ã—ã¦ãã ã•ã„。言ã„æ›ãˆã‚‹ã¨ã€ï¼“層環境ã®ä¸ã§ <literal>Session ã‚’"
"ä¿æŒã™ã‚‹ãŸã‚ã«ã€ EJB ステートフルセッション Bean を使ã£ã¦ãã ã•ã„。 "
"<literal>HttpSession ã«æ ¼ç´ã™ã‚‹ãŸã‚ã«ã€ Web 層ã«è»¢é€ã—ãªã„ã§ãã ã•"
"ㄠ(別ã®å±¤ã¸ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã‚‚ã—ãªã„ã§ãã ã•ã„)。"
#. Tag: para
#, no-c-format
msgid ""
"The extended session pattern, or <emphasis>session-per-conversation for this. See the Hibernate Wiki "
"for examples."
msgstr ""
"拡張セッションパターン (もã—ãã¯ã€ <emphasis>session-per-conversation ã®å®Ÿè£…ã‚’ä¾›"
"給ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ Hibernate Wiki ã«ã‚る例をå‚ç…§ã—ã¦ãã ã•ã„。"
#. Tag: title
#, no-c-format
msgid "Detached objects and automatic versioning"
msgstr "デタッãƒã•ã‚ŒãŸã‚ªãƒ–ジェクトã¨è‡ªå‹•ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°"
#. Tag: para
#, no-c-format
msgid ""
"Each interaction with the persistent store occurs in a new <literal>Session "
"and then reattaches them using <literal>Session.update(), "
"<literal>Session.saveOrUpdate(), or Session.merge() ã«ã‚ˆã‚Šã€æ°¸ç¶šåŒ–ストア (訳注:DB) ã¨ã®å¯¾"
"話ãŒç™ºç”Ÿã—ã¾ã™ã€‚ã¾ãŸä¸€æ–¹ã€åŒã˜æ°¸ç¶šæ€§ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã®å¯¾è©±ã”ã¨"
"ã«å†åˆ©ç”¨ã•ã‚Œã¾ã™ã€‚アプリケーションã¯ã€å…ƒã€…ã¯ä»–ã® <literal>Session "
"ã§ãƒãƒ¼ãƒ‰ã•ã‚Œã€ãƒ‡ã‚¿ãƒƒãƒã•ã‚ŒãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®çŠ¶æ…‹ã‚’æ“作ã—ã¾ã™ã€‚ãã—ã¦ã€ "
"<literal>Session.update() ã‚‚ã—ãã¯ã€ Session.saveOrUpdate"
"()</literal> 〠Session.merge() を使ã£ã¦ã€ãれらã®ã‚¤ãƒ³ã‚¹ã‚¿"
"ンスをå†è¿½åŠ ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Again, Hibernate will check instance versions during flush, throwing an "
"exception if conflicting updates occurred."
msgstr ""
"ã“ã®å ´åˆã‚‚ã‚„ã¯ã‚Šã€ Hibernate ã¯ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹éš›ã«ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’"
"ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚æ›´æ–°ã®ç«¶åˆãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ã€ä¾‹å¤–を投ã’ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"You can also call <literal>lock() instead of update()LockMode.READ (performing a version "
"check and bypassing all caches) if you are sure that the object has not been "
"modified."
msgstr ""
"オブジェクトãŒä¿®æ£ã•ã‚Œã¦ã„ãªã„ã“ã¨ã‚’確信ã—ã¦ã„ã‚‹å ´åˆã¯ã€ <literal>update()LockMode.READ を使ã£ã¦ã€ "
"<literal>lock() を呼ã³å‡ºã™ã“ã¨ã‚‚ã§ãã¾ã™ (ã™ã¹ã¦ã®ã‚ャッシュを迂回"
"ã—ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã‚’実施ã—ã¾ã™ï¼‰ã€‚"
#. Tag: title
#, no-c-format
msgid "Customizing automatic versioning"
msgstr "自動ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º"
#. Tag: para
#, no-c-format
msgid ""
"You can disable Hibernate's automatic version increment for particular "
"properties and collections by setting the <literal>optimistic-lock "
"mapping attribute to <literal>false. Hibernate will then no longer "
"increment versions if the property is dirty."
msgstr ""
"マッピング㮠<literal>optimistic-lock 属性㫠false in the "
"<literal><class> mapping. This conceptually only works if "
"Hibernate can compare the old and the new state (i.e., if you use a single "
"long <literal>Session and not session-per-request-with-detached-"
"objects)."
msgstr ""
"レガシーã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ã‚ーマã¯ã€ã—ã°ã—ã°å›ºå®šçš„ã§ã‚ã‚Šã€å¤‰æ›´ã§ãã¾ã›ã‚“。ã¾ãŸ"
"ã¯ã€ä»–ã®ã‚¢ãƒ—リケーションãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãªã‘ã‚Œã°ãªã‚‰ãšã€ãã®ã‚¢"
"プリケーションã¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚„タイムスタンプã•ãˆæ“作ã™ã‚‹æ–¹æ³•ã‚’知りã¾ã›ã‚“。"
"ã©ã¡ã‚‰ã®å ´åˆã‚‚ã€ãƒ†ãƒ¼ãƒ–ルã®ç‰¹å®šã®ã‚«ãƒ©ãƒ を当ã¦ã«ã—ã¦ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°ã‚’è¡Œãˆã¾ã›"
"ん。ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚„タイムスタンプã®ãƒ—ãƒãƒ‘ティをマッピングã›ãšã«ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³"
"ãƒã‚§ãƒƒã‚¯ã•ã›ã‚‹ãŸã‚ã«ã€ <literal><class> マッピング㫠"
"<literal>optimistic-lock=\"all\" を指定ã—ã¦ãã ã•ã„。行ã®ã™ã¹ã¦ã®"
"フィールドã®çŠ¶æ…‹ã‚’比較ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ã“ã‚Œã¯ã€ Hibernate ãŒå¤ã„状態ã¨æ–°ã—"
"ã„状態を比較ã§ãã‚‹å ´åˆã«ã€ç†è«–çš„ã«å‹•ä½œã™ã‚‹ã ã‘ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。"
"例ãˆã°ã€ session-per-request-with-detached-objects ã§ã¯ãªãã€ï¼‘ã¤ã®é•·ã„ "
"<literal>Session を使ã†å ´åˆã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"Concurrent modification can be permitted in instances where the changes that "
"have been made do not overlap. If you set <literal>optimistic-lock=\"dirty"
"\"</literal> when mapping the <class>, Hibernate "
"will only compare dirty fields during flush."
msgstr ""
"ã¨ãã©ãã€è¡Œã‚ã‚ŒãŸå¤‰æ›´ãŒé‡ãªã‚‰ãªã„é™ã‚Šã€åŒæ™‚ã«è¡Œã‚ã‚ŒãŸå¤‰æ›´ã‚’å—ã‘入れるã“ã¨ãŒ"
"ã§ãã¾ã™ã€‚ <literal><class> マッピング㫠optimistic-"
"lock=\"dirty\"</literal> ã‚’è¨å®šã—ãŸå ´åˆã€ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã™ã‚‹éš›ã«ã€ Hibernate ã¯"
"ダーティフィールドã®ã¿ã‚’比較ã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"In both cases, with dedicated version/timestamp columns or with a full/dirty "
"field comparison, Hibernate uses a single <literal>UPDATE "
"statement, with an appropriate <literal>WHERE clause, per entity "
"to execute the version check and update the information. If you use "
"transitive persistence to cascade reattachment to associated entities, "
"Hibernate may execute unnecessary updates. This is usually not a problem, "
"but <emphasis>on update triggers in the database might be "
"executed even when no changes have been made to detached instances. You can "
"customize this behavior by setting <literal>select-before-update=\"true\"<class> mapping, forcing Hibernate "
"to <literal>SELECT the instance to ensure that changes did occur "
"before updating the row."
msgstr ""
"専用ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼ã‚¿ã‚¤ãƒ スタンプã®ã‚«ãƒ©ãƒ を使ã†å ´åˆã€ã‚‚ã—ãã¯ã™ã¹ã¦ï¼ãƒ€ãƒ¼ãƒ†ã‚£"
"ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’比較ã™ã‚‹å ´åˆã©ã¡ã‚‰ã§ã‚ã£ã¦ã‚‚〠Hibernate ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã”ã¨ã«1"
"ã¤ã® <literal>UPDATE 文を (é©åˆ‡ãª WHERE 節ã¨å…±"
"ã«ï¼‰ 使ã„ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒã‚§ãƒƒã‚¯ã¨æƒ…å ±ã®æ›´æ–°ã‚’è¡Œã„ã¾ã™ã€‚関連ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å†"
"è¿½åŠ ã‚’ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã«ã€é€£éŽ–çš„ãªæ°¸ç¶šåŒ–を使用ã—ãŸå ´åˆã€ä¸å¿…è¦ãªæ›´æ–°ã‚’実行"
"ã™ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。ã“ã‚Œã¯é€šå¸¸å•é¡Œã«ãªã‚Šã¾ã›ã‚“。ã—ã‹ã—ã€åˆ†é›¢ã—ãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹"
"を変更ã—ã¦ã„ãªãã¨ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® <emphasis>on update トリガー"
"ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。 <literal><class> マッピング㫠"
"<literal>select-before-update=\"true\" ã‚’è¨å®šã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã“ã®"
"振る舞ã„をカスタマイズã§ãã¾ã™ã€‚確実ã«å¤‰æ›´ã•ã‚ŒãŸã‹ã‚’確èªã™ã‚‹ãŸã‚ã«ã€è¡Œã‚’æ›´æ–°"
"ã™ã‚‹å‰ã«ã€å¿…ãšã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’ <literal>SELECT ã—ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Pessimistic locking"
msgstr "悲観的ãƒãƒƒã‚¯"
#. Tag: para
#, no-c-format
msgid ""
"It is not intended that users spend much time worrying about locking "
"strategies. It is usually enough to specify an isolation level for the JDBC "
"connections and then simply let the database do all the work. However, "
"advanced users may wish to obtain exclusive pessimistic locks or re-obtain "
"locks at the start of a new transaction."
msgstr ""
"ユーザーãŒãƒãƒƒã‚¯æˆ¦ç•¥ã«æ‚©ã‚€ã®ã«å¤šãã®æ™‚間を費やã™ã“ã¨ã‚’æ„図ã—ã¦ã„ã¾ã›ã‚“。通常"
"ã¯ã€ JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã«åˆ†é›¢ãƒ¬ãƒ™ãƒ«ã‚’指定ã—ã€å˜ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã™ã¹ã¦ã®ä»•äº‹ã‚’"
"ã•ã›ã‚Œã°å分ã§ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€é«˜åº¦ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€æŽ’ä»–çš„ãªæ‚²è¦³çš„ãƒãƒƒã‚¯ã‚’ç²å¾—"
"ã™ã‚‹ã“ã¨ã‹ã€æ–°ã—ã„トランザクションãŒé–‹å§‹ã•ã‚Œã‚‹éš›ã«ãƒãƒƒã‚¯ã‚’å†ç²å¾—ã™ã‚‹ã“ã¨ã‚’ã¨"
"ãã©ã望むã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"Hibernate will always use the locking mechanism of the database; it never "
"lock objects in memory."
msgstr ""
"Hibernate ã¯ã„ã¤ã‚‚データベースã®ãƒãƒƒã‚¯ã®ä»•çµ„ã¿ã‚’使ã„ã¾ã™ã€‚メモリ内ã®ã‚ªãƒ–ジェ"
"クトを決ã—ã¦ãƒãƒƒã‚¯ã—ã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"The <literal>LockMode class defines the different lock levels that "
"can be acquired by Hibernate. A lock is obtained by the following mechanisms:"
msgstr ""
"<literal>LockMode クラスã¯ã€ Hibernate ãŒç²å¾—ã§ãã‚‹ç•°ãªã‚‹ãƒãƒƒã‚¯ãƒ¬ãƒ™"
"ルを定義ã—ã¾ã™ã€‚以下ã®ä»•çµ„ã¿ã«ã‚ˆã‚Šã€ãƒãƒƒã‚¯ã‚’ç²å¾—ã§ãã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>LockMode.WRITE is acquired automatically when Hibernate "
"updates or inserts a row."
msgstr ""
"<literal>LockMode.WRITE ã¯ã€ Hibernate ãŒè¡Œã‚’æ›´æ–°ã‚‚ã—ãã¯æŒ¿å…¥ã™ã‚‹éš›"
"ã«è‡ªå‹•çš„ã«å¾—られã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>LockMode.UPGRADE can be acquired upon explicit user "
"request using <literal>SELECT ... FOR UPDATE on databases which "
"support that syntax."
msgstr ""
"<literal>LockMode.UPGRADE ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„る文法 "
"<literal>SELECT ... FOR UPDATE を使ã£ãŸã€æ˜Žç¤ºçš„ãªãƒ¦ãƒ¼ã‚¶ãƒ¼è¦æ±‚ã«ã‚ˆã‚Š"
"得られるã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"<literal>LockMode.UPGRADE_NOWAIT can be acquired upon explicit "
"user request using a <literal>SELECT ... FOR UPDATE NOWAIT under "
"Oracle."
msgstr ""
"<literal>LockMode.UPGRADE_NOWAIT ã¯ã€ Oracle 㧠"
"<literal>SELECT ... FOR UPDATE NOWAIT を使ã£ãŸã€æ˜Žç¤ºçš„ãªãƒ¦ãƒ¼ã‚¶ãƒ¼è¦"
"求ã«ã‚ˆã‚Šå¾—られるã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。"
#. Tag: para
#, no-c-format
msgid ""
"<literal>LockMode.READ is acquired automatically when Hibernate "
"reads data under Repeatable Read or Serializable isolation level. It can be "
"re-acquired by explicit user request."
msgstr ""
"<literal>LockMode.READ ã¯ã€ Repeatable Read ã‚‚ã—ã㯠Serializable "
"ã®åˆ†é›¢ãƒ¬ãƒ™ãƒ«ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’èªã‚“ã éš›ã«è‡ªå‹•çš„ã«å¾—られã¾ã™ã€‚ãŠãらãã€æ˜Žç¤ºçš„ãªãƒ¦ãƒ¼"
"ザーè¦æ±‚ã«ã‚ˆã‚Šã€å†å–å¾—ã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>LockMode.NONE represents the absence of a lock. All "
"objects switch to this lock mode at the end of a <literal>Transactionupdate()"
"</literal> or saveOrUpdate() also start out in this lock "
"mode."
msgstr ""
"<literal>LockMode.NONE ã¯ã€ãƒãƒƒã‚¯ã—ãªã„ã“ã¨ã‚’表ã—ã¾ã™ã€‚ "
"<literal>Transaction ã®çµ‚ã‚ã‚Šã«ã€ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã¯ã“ã®ãƒãƒƒã‚¯"
"モードã«åˆ‡ã‚Šæ›¿ã‚ã‚Šã¾ã™ã€‚ <literal>update() ã‚„ saveOrUpdate"
"()</literal> を呼ã³å‡ºã™ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ä»˜ã‘られãŸã‚ªãƒ–ジェクト"
"ã‚‚ã€ã“ã®ãƒãƒƒã‚¯ãƒ¢ãƒ¼ãƒ‰ã§å‡ºç™ºã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The \"explicit user request\" is expressed in one of the following ways:"
msgstr "「明示的ãªãƒ¦ãƒ¼ã‚¶ãƒ¼è¦æ±‚ã€ã¨ã¯ã€ä¸‹è¨˜ã®æ–¹æ³•ã®ï¼‘ã¤ã§è¨€ã„表ã›ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"A call to <literal>Session.load(), specifying a LockMode を指定ã—㟠Session.load() ã®å‘¼"
"ã³å‡ºã—。"
#. Tag: para
#, no-c-format
msgid "A call to <literal>Session.lock()."
msgstr "<literal>Session.lock() ã®å‘¼ã³å‡ºã—。"
#. Tag: para
#, no-c-format
msgid "A call to <literal>Query.setLockMode()."
msgstr "<literal>Query.setLockMode() ã®å‘¼ã³å‡ºã—。"
#. Tag: para
#, no-c-format
msgid ""
"If <literal>Session.load() is called with UPGRADEUPGRADE_NOWAIT, and the requested object was "
"not yet loaded by the session, the object is loaded using "
"<literal>SELECT ... FOR UPDATE. If load() is "
"called for an object that is already loaded with a less restrictive lock "
"than the one requested, Hibernate calls <literal>lock() for that "
"object."
msgstr ""
"<literal>UPGRADE ã‚‚ã—ã㯠UPGRADE_NOWAIT ãŒæŒ‡å®š"
"ã•ã‚ŒãŸ <literal>Session.load() ãŒå‘¼ã³å‡ºã•ã‚Œã€ã‹ã¤è¦æ±‚ã•ã‚ŒãŸã‚ªãƒ–ジェ"
"クトãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ã‚ˆã£ã¦ã¾ã ãƒãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãªã‹ã£ãŸå ´åˆã¯ã€ "
"<literal>SELECT ... FOR UPDATE を使ã£ã¦ã€ã‚ªãƒ–ジェクトãŒãƒãƒ¼ãƒ‰ã•ã‚Œã¾"
"ã™ã€‚ <literal>load() ã§å‘¼ã³å‡ºã•ã‚ŒãŸã‚ªãƒ–ジェクトãŒã€è¦æ±‚ã•ã‚Œã¦ã„るよ"
"り制é™ãŒå°‘ãªã„ãƒãƒƒã‚¯ã§ã™ã§ã«ãƒãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãŸå ´åˆã¯ã€ Hibernate ã¯ãã®ã‚ªãƒ–ジェ"
"クトã®ãŸã‚ã«ã€ <literal>lock() を呼ã³å‡ºã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>Session.lock() performs a version number check if the "
"specified lock mode is <literal>READ, UPGRADE "
"or <literal>UPGRADE_NOWAIT. In the case of UPGRADEUPGRADE_NOWAIT, SELECT ... FOR "
"UPDATE</literal> is used."
msgstr ""
"指定ã•ã‚ŒãŸãƒãƒƒã‚¯ãƒ¢ãƒ¼ãƒ‰ãŒ <literal>READ ã‚‚ã—ãã¯ã€ "
"<literal>UPGRADE 〠UPGRADE_NOWAIT ã ã£ãŸå ´åˆã€ "
"<literal>Session.lock() ã¯ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã®ãƒã‚§ãƒƒã‚¯ã‚’実施ã—ã¾ã™ã€‚ "
"(<literal>UPGRADE ã‚‚ã—ã㯠UPGRADE_NOWAIT ã®å ´"
"åˆã€ <literal>SELECT ... FOR UPDATE ãŒä½¿ã‚ã‚Œã¾ã™ã€‚)"
#. Tag: para
#, no-c-format
msgid ""
"If the requested lock mode is not supported by the database, Hibernate uses "
"an appropriate alternate mode instead of throwing an exception. This ensures "
"that applications are portable."
msgstr ""
"データベースãŒè¦æ±‚ã•ã‚ŒãŸãƒãƒƒã‚¯ãƒ¢ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„å ´åˆã€ Hibernate ã¯"
"(例外を投ã’る代ã‚ã‚Šã«ã€ï¼‰é©åˆ‡ãªä»£ã‚ã‚Šã®ãƒ¢ãƒ¼ãƒ‰ã‚’使ã„ã¾ã™ã€‚ã“ã‚Œã¯ã€ã‚¢ãƒ—リケー"
"ションãŒãƒãƒ¼ã‚¿ãƒ–ルã§ã‚ã‚‹ã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚"
#. Tag: title
#, no-c-format
msgid "Connection release modes"
msgstr "コãƒã‚¯ã‚·ãƒ§ãƒ³é–‹æ”¾ãƒ¢ãƒ¼ãƒ‰"
#. Tag: para
#, no-c-format
msgid ""
"One of the legacies of Hibernate 2.x JDBC connection management meant that a "
"<literal>Session would obtain a connection when it was first "
"required and then maintain that connection until the session was closed. "
"Hibernate 3.x introduced the notion of connection release modes that would "
"instruct a session how to handle its JDBC connections. The following "
"discussion is pertinent only to connections provided through a configured "
"<literal>ConnectionProvider. User-supplied connections are outside "
"the breadth of this discussion. The different release modes are identified "
"by the enumerated values of <literal>org.hibernate.ConnectionReleaseMode ãŒã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’å¾—ã‚‹ã¨ã„ã†ã‚‚ã®ã§ã—"
"ãŸã€‚ãã—ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¾ã§ã€ãã®ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿æŒã—ã¾ã—ãŸã€‚ "
"Hibernate 3.x ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã« JDBC コãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’ã©ã®ã‚ˆã†ã«åˆ¶å¾¡ã™ã‚‹ã‹ã‚’ä¼ãˆ"
"るコãƒã‚¯ã‚·ãƒ§ãƒ³é–‹æ”¾ãƒ¢ãƒ¼ãƒ‰ã¨ã„ã†æ¦‚念を導入ã—ã¾ã—ãŸã€‚以é™ã®è°è«–ã¯ã€æ§‹æˆã•ã‚ŒãŸ "
"<literal>ConnectionProvider を通ã—ã¦æä¾›ã•ã‚Œã‚‹ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã«é©åˆ‡ã§"
"ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。異ãªã‚‹é–‹æ”¾ãƒ¢ãƒ¼ãƒ‰ã¯ã€ <literal>org.hibernate."
"ConnectionReleaseMode</literal> ã«åˆ—挙ã•ã‚ŒãŸå€¤ã«ã‚ˆã‚Šç¢ºèªã•ã‚Œã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>ON_CLOSE: is the legacy behavior described above. The "
"Hibernate session obtains a connection when it first needs to perform some "
"JDBC access and maintains that connection until the session is closed."
msgstr ""
"<literal>ON_CLOSE - 本質的ã«ä¸Šè¨˜ã§è¿°ã¹ãŸãƒ¬ã‚¬ã‚·ãƒ¼ã®æŒ¯ã‚‹èˆžã„ã§ã™ã€‚ "
"Hibernate セッションã¯æœ€åˆã« JDBC アクセスを実行ã™ã‚‹å¿…è¦ãŒã‚ã‚‹éš›ã«ã‚³ãƒã‚¯ã‚·ãƒ§"
"ンを得ã¾ã™ã€‚ãã—ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¾ã§ã€ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿æŒã—ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>AFTER_TRANSACTION: releases connections after a "
"<literal>org.hibernate.Transaction has been completed."
msgstr ""
"<literal>AFTER_TRANSACTION - org.hibernate.Transaction (also referred to as aggressive release): "
"releases connections after every statement execution. This aggressive "
"releasing is skipped if that statement leaves open resources associated with "
"the given session. Currently the only situation where this occurs is through "
"the use of <literal>org.hibernate.ScrollableResults."
msgstr ""
"<literal>AFTER_STATEMENT (ç©æ¥µçš„ãªé–‹æ”¾ã¨ã‚‚呼ã°ã‚Œã‚‹ï¼‰ - ã™ã¹ã¦ã®ã‚¹"
"テートメントãŒãã‚Œãžã‚Œå®Ÿè¡Œã•ã‚ŒãŸå¾Œã€ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ãŒé–‹æ”¾ã•ã‚Œã¾ã™ã€‚ステートメン"
"トãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’é–‹ã„ãŸã¾ã¾ã«ã™ã‚‹å ´åˆã¯ã€ã“ã®ç©æ¥µçš„ãªé–‹æ”¾ã¯"
"スã‚ップã•ã‚Œã¾ã™ã€‚今ã®ã¨ã“ã‚ã€ã“ã‚ŒãŒèµ·ã“ã‚‹ã®ã¯ <literal>org.hibernate."
"ScrollableResults</literal> ãŒä½¿ã‚ã‚Œã‚‹å ´åˆã®ã¿ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"The configuration parameter <literal>hibernate.connection.release_mode (the default): this choice delegates to the release "
"mode returned by the <literal>org.hibernate.transaction.TransactionFactory."
"getDefaultReleaseMode()</literal> method. For JTATransactionFactory, this "
"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, "
"this returns ConnectionReleaseMode.AFTER_TRANSACTION. Do not change this "
"default behavior as failures due to the value of this setting tend to "
"indicate bugs and/or invalid assumptions in user code."
msgstr ""
"<literal>auto (デフォルト) - ã“れをé¸æŠžã™ã‚‹ã¨ org."
"hibernate.transaction.TransactionFactory.getDefaultReleaseMode()</literal> メ"
"ソッドã«ã‚ˆã£ã¦è¿”ã•ã‚Œã‚‹é–‹æ”¾ãƒ¢ãƒ¼ãƒ‰ã«å§”è²ã•ã‚Œã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ "
"JTATransactionFactory ã«ã¯ ConnectionReleaseMode.AFTER_STATEMENT ã‚’è¿”ã—〠"
"JDBCTransactionFactory ã«ã¯ ConnectionReleaseMode.AFTER_TRANSACTION ã‚’è¿”ã—ã¾"
"ã™ã€‚ã“ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æŒ¯ã‚‹èˆžã„を変ãˆã¦ã†ã¾ãã„ã£ãŸè©¦ã—ãŒã‚ã‚Šã¾ã›ã‚“。ãã‚Œã¯ã€ã“"
"ã®è¨å®šå€¤ãŒåŽŸå› ã§èµ·ã“る障害ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚³ãƒ¼ãƒ‰ã®ä¸ã§ãƒã‚°ã‚„é–“é•ã£ãŸæ¡ä»¶ã«ãªã‚Šã‚„"
"ã™ã„ã‹ã‚‰ã§ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>on_close: uses ConnectionReleaseMode.ON_CLOSE. This "
"setting is left for backwards compatibility, but its use is discouraged."
msgstr ""
"<literal>on_close - ConnectionReleaseMode.ON_CLOSE を使ã„ã¾ã™ã€‚ã“ã®"
"è¨å®šã¯å¾Œæ–¹äº’æ›ã®ãŸã‚ã«æ®‹ã•ã‚Œã¦ã„ã¾ã™ãŒã€ä½¿ã‚ãªã„ã“ã¨ã‚’å¼·ã勧ã‚ã¾ã™ã€‚"
#. Tag: para
#, no-c-format
msgid ""
"<literal>after_transaction: uses ConnectionReleaseMode."
"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also "
"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is "
"considered to be in auto-commit mode, connections will be released as if the "
"release mode were AFTER_STATEMENT."
msgstr ""
"<literal>after_transaction - ConnectionReleaseMode."
"AFTER_TRANSACTION を使ã„ã¾ã™ã€‚ã“ã®è¨å®šã¯ JTA 環境ã®ä¸ã§ã¯ä½¿ã†ã¹ãã§ã¯ã‚ã‚Šã¾ã›"
"ん。 ConnectionReleaseMode.AFTER_TRANSACTION を指定ã—ã€è‡ªå‹•ã‚³ãƒŸãƒƒãƒˆãƒ¢ãƒ¼ãƒ‰ã®ä¸"
"ã§ã¯ã€é–‹æ”¾ãƒ¢ãƒ¼ãƒ‰ãŒ AFTER_STATEMENT ã§ã‚ã‚‹ã‹ã®ã‚ˆã†ã«ã€ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã¯é–‹æ”¾ã•ã‚Œã‚‹"
"ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。"
#. Tag: para
#, no-c-format
msgid ""
"<literal>after_statement: uses ConnectionReleaseMode."
"AFTER_STATEMENT. Additionally, the configured <literal>ConnectionProvider). If not, the release mode "
"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only "
"safe in environments where we can either re-acquire the same underlying JDBC "
"connection each time you make a call into <literal>ConnectionProvider."
"getConnection()</literal> or in auto-commit environments where it does not "
"matter if we re-establish the same connection."
msgstr ""
"<literal>after_statement - ConnectionReleaseMode.AFTER_STATEMENT ã‚’"
"使ã„ã¾ã™ã€‚ã•ã‚‰ã«ã€è¨å®šã•ã‚ŒãŸ <literal>ConnectionProvider ã¯ã€ã“ã®è¨"
"定 (<literal>supportsAggressiveRelease()) をサãƒãƒ¼ãƒˆã™ã‚‹ã‹ã©ã†ã‹ã‚’"
"調ã¹ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ã‚‚ã—ãã†ã§ãªã„å ´åˆã€é–‹æ”¾ãƒ¢ãƒ¼ãƒ‰ã¯ "
"ConnectionReleaseMode.AFTER_TRANSACTION ã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ã“ã®è¨å®šã¯æ¬¡ã®ç’°"
"境ã§ã®ã¿å®‰å…¨ã§ã™ã€‚ãã‚Œã¯ã€ <literal>ConnectionProvider.getConnection()
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate transactions.po source code file:
|