2010. 8. 22. 20:04ㆍplming/Java - Spring
import org.springframework.transaction.PlatformTransactionManager; public class PragrammaticBoardService implements BoardService { private PlatformTransactionManager transactionManager; private TransactionDefinition getDefinition(int isolationLevel, public Board addBoard(Board board) { try { if (t instanceof RuntimeException) { public Board updateBoard(Board board) { public Board findBoard(int boardNo) { |
- applicationContext-jdbc.xml <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> |
- applicationContext-board.xml <bean id="boardService" class="net.javajigi.board.service.PragrammaticBoardService"> <property name="transactionManager"> <ref bean="transactionManager" /> </property> </bean> |
[출처] Spring 프레임워크 워크북
'plming > Java - Spring' 카테고리의 다른 글
모델 1 개발 vs 모델 2 개발 (0) | 2010.08.26 |
---|---|
Spring Transaction - 선언적으로 처리 (0) | 2010.08.22 |
Spring Transaction (0) | 2010.08.22 |
Spring - 빈 설정 파일 관리 (0) | 2010.08.22 |
Spring AOP - Logging, Exception 구현 (0) | 2010.08.19 |