Download
Magazine
Develop
Account
Download
Magazine
Develop
Login
Forgot Account/Password
Create Account
Language
Help
Language
Help
×
Login
Login Name
Password
×
Forgot Account/Password
Category:
Software
People
PersonalForge
Magazine
Wiki
Search
OSDN
>
Find Software
>
System
>
TERASOLUNA Framework
>
Forums
>
Open Discussion
>
【バッチFW】トランザクション隔離レベルの変更
TERASOLUNA Framework
Description
Project Summary
Developer Dashboard
Web Page
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
History
Downloads
List of Releases
Stats
Source Code
Code Repository list
Subversion
View Repository
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
Wiki
FrontPage
Title index
Recent changes
Doc Mgr
List Docs
Communication
Forums
List of Forums
Open Discussion (1277)
Mailing Lists
list of ML
terasoluna-information
News
Forums:
Open Discussion
(Thread #22535)
Return to Thread list
RSS
【バッチFW】トランザクション隔離レベルの変更 (2009-04-27 17:50 by
Anonymous
#43463)
Reply
Create ticket
お世話になります。
現在、バッチFWを使用したジョブを作成・活用しております。
詳細は省きますが、トランザクションの関係でファントムリードが発生し、データの整合性が合わない状態が発生しています。
使用データベースはPostgresQLでトランザクション隔離レベルをSERIALIZABLEにあげたいのですが設定変更は可能でしょうか?
Reply to #43463
×
Subject
Body
Reply To Message #43463 > お世話になります。 > 現在、バッチFWを使用したジョブを作成・活用しております。 > 詳細は省きますが、トランザクションの関係でファントムリードが発生し、データの整合性が合わない状態が発生しています。 > 使用データベースはPostgresQLでトランザクション隔離レベルをSERIALIZABLEにあげたいのですが設定変更は可能でしょうか?
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: 【バッチFW】トランザクション隔離レベルの変更 (2009-04-27 19:23 by
ahn
#43473)
Reply
Create ticket
dataAccessContext-batch.xml内の設定を以下のように変更すれば対応することができます。
----------------------------------------------------------------------------
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="defaultTransactionIsolation" value="8"/><!-- SERIALIZABLE -->
</bean>
----------------------------------------------------------------------------
READ_UNCOMMITTED = 1
READ_COMMITTED = 2
REPEATABLE_READ = 4
SERIALIZABLE = 8
----------------------------------------------------------------------------
Reply to
#43463
Reply to #43473
×
Subject
Body
Reply To Message #43473 > dataAccessContext-batch.xml内の設定を以下のように変更すれば対応することができます。 > > ---------------------------------------------------------------------------- > <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" > destroy-method="close"> > <property name="driverClassName" value="${jdbc.driverClassName}"/> > <property name="url" value="${jdbc.url}"/> > <property name="username" value="${jdbc.username}"/> > <property name="password" value="${jdbc.password}"/> > <property name="defaultTransactionIsolation" value="8"/><!-- SERIALIZABLE --> > </bean> > > ---------------------------------------------------------------------------- > READ_UNCOMMITTED = 1 > READ_COMMITTED = 2 > REPEATABLE_READ = 4 > SERIALIZABLE = 8 > ----------------------------------------------------------------------------
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: 【バッチFW】トランザクション隔離レベルの変更 (2009-04-28 08:52 by
Anonymous
#43499)
Reply
Create ticket
早速のご回答ありがとうございました。
内容に沿って変更してみたいと思います。
尚、複数のDBに接続する使用で組み立てているのですが、参照・更新用DBだけでなく、それとは別に使用している参照用のみのDBでも上記の設定でSERIALIZABLEレベルになるのでしょうか?
Reply to
#43463
Reply to #43499
×
Subject
Body
Reply To Message #43499 > 早速のご回答ありがとうございました。 > 内容に沿って変更してみたいと思います。 > 尚、複数のDBに接続する使用で組み立てているのですが、参照・更新用DBだけでなく、それとは別に使用している参照用のみのDBでも上記の設定でSERIALIZABLEレベルになるのでしょうか?
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: 【バッチFW】トランザクション隔離レベルの変更 (2009-04-28 09:52 by
ahn
#43500)
Reply
Create ticket
回答した設定方法はSpringが生成するデータソースのインスタンス毎の設定になります。
従って、使用するDB毎にデータソースを設定することができますので「参照用のみのDB」でも
SERIALIZABLEレベルに設定することができます。
複数DBの設定方法につきましては以下の記事をご参照ください。
<
http://sourceforge.jp/forum/message.php?msg_id=41769>
ただし、複数DB設定はそれぞれのDBを別々に扱う設定であり、分散トランザクション制御
つまり複数DBを跨ったトランザクション制御を意味するものではありませんのでご注意下さい。
Reply to
#43499
Reply to #43500
×
Subject
Body
Reply To Message #43500 > 回答した設定方法はSpringが生成するデータソースのインスタンス毎の設定になります。 > 従って、使用するDB毎にデータソースを設定することができますので「参照用のみのDB」でも > SERIALIZABLEレベルに設定することができます。 > 複数DBの設定方法につきましては以下の記事をご参照ください。 > <http://sourceforge.jp/forum/message.php?msg_id=41769> > ただし、複数DB設定はそれぞれのDBを別々に扱う設定であり、分散トランザクション制御 > つまり複数DBを跨ったトランザクション制御を意味するものではありませんのでご注意下さい。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: 【バッチFW】トランザクション隔離レベルの変更 (2009-04-28 10:00 by
Anonymous
#43501)
Reply
Create ticket
2番目の質問の内容ですが、よく考えたらdataAccessContext-batch.xmlで複数DB定義する際に、それぞれで<property name="defaultTransactionIsolation" value="8"/>
のプロパティを設定すればよいだけのことですね。
間違いがある場合にはご指摘ください。
Reply to
#43463
Reply to #43501
×
Subject
Body
Reply To Message #43501 > 2番目の質問の内容ですが、よく考えたらdataAccessContext-batch.xmlで複数DB定義する際に、それぞれで<property name="defaultTransactionIsolation" value="8"/> > のプロパティを設定すればよいだけのことですね。 > 間違いがある場合にはご指摘ください。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: 【バッチFW】トランザクション隔離レベルの変更 (2009-04-28 10:08 by
Anonymous
#43502)
Reply
Create ticket
すみません。43501のコメントは43500を確認しないうちに投稿してしまったものです。
内容は理解できました。
ありがとうございました。
Reply to
#43463
Reply to #43502
×
Subject
Body
Reply To Message #43502 > すみません。43501のコメントは43500を確認しないうちに投稿してしまったものです。 > 内容は理解できました。 > ありがとうございました。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel