Springトランザクションの概要
Springトランザクションの概要
トランザクションインタフェースTransactionDefinitionには(伝播メカニズム、独立性レベル、トランザクションタイムアウト)が含まれます.
1.伝播メカニズム(7種類)
ソースコード
ぶんせき
2.独立性レベル(5種類)
ソースコード
ぶんせき
3.取引タイムアウト
ソースコード
ぶんせき
トランザクションインタフェースTransactionDefinitionには(伝播メカニズム、独立性レベル、トランザクションタイムアウト)が含まれます.
1.伝播メカニズム(7種類)
ソースコード
int PROPAGATION_REQUIRED = 0;
int PROPAGATION_SUPPORTS = 1;
int PROPAGATION_MANDATORY = 2;
int PROPAGATION_REQUIRES_NEW = 3;
int PROPAGATION_NOT_SUPPORTED = 4;
int PROPAGATION_NEVER = 5;
int PROPAGATION_NESTED = 6;
ぶんせき
(1)propagation_required=0;
( ) , ,
(2)propagation_supports=1;
, ,
(3)propagation_mandatory=2;
, ,
(4)propagation_requires_new=3;
, ,
(5)propagation_not_supported=4;
,
(6)propagation_never=5;
, ,
(7)propagation_nested=6;
, , propagation_required
2.独立性レベル(5種類)
ソースコード
int ISOLATION_DEFAULT = -1;
int ISOLATION_READ_UNCOMMITTED = 1;
int ISOLATION_READ_COMMITTED = 2;
int ISOLATION_REPEATABLE_READ = 4;
int ISOLATION_SERIALIZABLE = 8;
ぶんせき
(1)isolation_default=-1;
spring (repeatable_read)
(2)isolation_read_uncommited=1;
, , , ,
(3)isolation_read_commited=2;
, ,
(4)isolation_repeatable_read=4;
, , ,
(5)isolation_serializable=8;
, , , , , 。
3.取引タイムアウト
ソースコード
int TIMEOUT_DEFAULT = -1;
ぶんせき
( )
, , ,