Spring DB
jndi lookup
Add Some Spring to Your Oracle JDBC Access
SQLExceptionTranslator
http://pietrowski.info/2008/09/how-to-extend-sqlerrorcodesfactory/
Transaction관련
TransactionDefinition
getPropagationBehavior, getIsolationLevel, getTimeout, isReadOnly
TransactionStatus
isNewTransaction, setRollebackOnly, isRollBackOnly
PlatformTransactionManager
HibernateTransactionManager
JtaTransactionManager
DataSourceTransactionManager
setDataSource
TransactionTemplate
TransactionCallBack.doInTransaction
TransactionProxyFactoryBean
setTransactionAttributes
디폴트 롤백규칙은 RunTimeException은 RollBack, CheckedException은 commit
NameMatchTransactionAttributesSource
setProperties
TransactionInterceptor
setTransactionManger, setTransactionAttributes
MethodMapTransactionAttributeSource
BeanNameAutoProxyCreator
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:advisor pointcut="execution(* *..*BO.*(...))" advice-ref="txAdvice"/>
</aop:config>
<aop:advisor
pointcut="execution(public * com.benelog.test..*.*BO.*(..))"
advice-ref="txAdvice"/>
<tx:annotation-driven/>
<tx:annotation-driven transaction-manager="memberTransactionManager"/>
또는 <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
Spring, JPA, and JTA with Hibernate and JOTM
스프링 트랜잭션 관련 링크
Spring Transaction Management 선언적 트랜젝션 관리
ejb transaction attribute와 spring transactional propagation rules 비교
Annocation 기반
<tx:annotation-driven />
<tx:annotation-driven transaction-manager="txManager" />
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED, -RuntimeException</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
JOTM
spring 에서 JOTM 를 이용한 분산데이터베이스 transaction 처리
Best effort
http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html?page=6
https://jira.springsource.org/browse/SPR-3844
History
Last edited on 03/11/2011 13:17 by benelog
Comments (0)