context-transaction.xml
- 작성자 :
- 양*일
- 작성일 :
- 2013-08-21 15:16:09
- 조회수 :
- 1,012
- 구분 :
- 개발환경
- 진행상태 :
- 완료
Q
변경해도 같은 현상입니다.
다시 한번 검토 부탁드립니다.
context-transaction.xml
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="*" rollback-for="Exception"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="requiredTx"
expression="execution(* grc.rte.sample..impl.*Impl.*(..))"/>
<aop:advisor advice-ref="txAdvice"
pointcut-ref="requiredTx" />
</aop:config>
</beans>
Impl source
public void saveCommonCode(CommonCodeSearchVO commonCodeSearchVO, List<CommonCodeVO> commonCodeList) throws Exception {
CommonCodeVO vo = new CommonCodeVO();
vo.setBranchCode(commonCodeSearchVO.getBranchCode());
vo.setCodePre(commonCodeSearchVO.getCodePre());
vo.setCodeDetail("");
vo.setCodeName(commonCodeSearchVO.getCodeName());
vo.setCodeInfo(commonCodeSearchVO.getCodeInfo());
vo.setBigo(commonCodeSearchVO.getBigo());
System.out.println("++++++==================>" + commonCodeSearchVO);
System.out.println("++++++==================>" + vo.getCodeName());
gcdDAO.updateCommonCode(vo);
if (commonCodeList.size() > 0){
for (int i = 0 ; i < commonCodeList.size() ; i++){
CommonCodeVO commonCodeVO = commonCodeList.get(i);
System.out.println("getCodeDetail===>" + commonCodeVO.getCodeDetail());
if (commonCodeVO.getCurd().equals("U")){
gcdDAO.updateCommonCode(commonCodeVO);
}else if (commonCodeVO.getCurd().equals("C")){
//commonCodeVO.setInsertManager(user.getId());
gcdDAO.insertCommonCode(commonCodeVO);
}else if (commonCodeVO.getCurd().equals("D")){
gcdDAO.deleteCommonCode(commonCodeVO);
}
}
}
}
다시 한번 검토 부탁드립니다.
context-transaction.xml
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="*" rollback-for="Exception"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="requiredTx"
expression="execution(* grc.rte.sample..impl.*Impl.*(..))"/>
<aop:advisor advice-ref="txAdvice"
pointcut-ref="requiredTx" />
</aop:config>
</beans>
Impl source
public void saveCommonCode(CommonCodeSearchVO commonCodeSearchVO, List<CommonCodeVO> commonCodeList) throws Exception {
CommonCodeVO vo = new CommonCodeVO();
vo.setBranchCode(commonCodeSearchVO.getBranchCode());
vo.setCodePre(commonCodeSearchVO.getCodePre());
vo.setCodeDetail("");
vo.setCodeName(commonCodeSearchVO.getCodeName());
vo.setCodeInfo(commonCodeSearchVO.getCodeInfo());
vo.setBigo(commonCodeSearchVO.getBigo());
System.out.println("++++++==================>" + commonCodeSearchVO);
System.out.println("++++++==================>" + vo.getCodeName());
gcdDAO.updateCommonCode(vo);
if (commonCodeList.size() > 0){
for (int i = 0 ; i < commonCodeList.size() ; i++){
CommonCodeVO commonCodeVO = commonCodeList.get(i);
System.out.println("getCodeDetail===>" + commonCodeVO.getCodeDetail());
if (commonCodeVO.getCurd().equals("U")){
gcdDAO.updateCommonCode(commonCodeVO);
}else if (commonCodeVO.getCurd().equals("C")){
//commonCodeVO.setInsertManager(user.getId());
gcdDAO.insertCommonCode(commonCodeVO);
}else if (commonCodeVO.getCurd().equals("D")){
gcdDAO.deleteCommonCode(commonCodeVO);
}
}
}
}
A
안녕하세요 프레임워크 센터입니다.
위 정보만으로 판단하기는 어렵고
pointcut을 타는지(경로가 제대로 되어 있는지)
인서트 오류시 실제 exception이 발생하는지 확인을 먼저 해보시기 바랍니다.
수고하세요.
위 정보만으로 판단하기는 어렵고
pointcut을 타는지(경로가 제대로 되어 있는지)
인서트 오류시 실제 exception이 발생하는지 확인을 먼저 해보시기 바랍니다.
수고하세요.