????6.spring????hibernate???????????
????<bean id="transactionManager"
????class="org.springframework.orm.hibernate3.HibernateTransactionManager">
????<property name="sessionFactory">
????<ref local="sessionFactory" />
????</property>
????</bean>
?????????????????????????????????
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- ???????????????? -->
<tx:method name="get*" read-only="true" />
<tx:method name="query*" read-only="true" />
<tx:method name="save*" propagation="REQUIRED"/>
<tx:method name="find*" read-only="true" />
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<!-- ???????λ??????Щ?????Щ?????????????????????service -->
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* com.avit.mmsp.padapter.services.*.*(..))"
advice-ref="txAdvice" />
<aop:advisor
pointcut="execution(* com.avit.mmsp.common.message.service.*.*(..))"
advice-ref="txAdvice" />
</aop:config>
????????????????????????????????transactionManager?????advice?й漲save????????????required?????????sessionfactory?????????????????????????????漲??advice???????????????aop:pointcut????????????????advice?????????????pointcut?????
????????read-only????????
???????????????????????????????ó???????????????????ó???????????????????д???????????????
????read-only????ó????
??????????????е?????????????б?????????????????????????SQL??????????????
??????????????ж??????????????????????????????????????£????????SQL??????????????????????????SQL??????????SQL???????????????????????????????????????????????????μ?????????????????????????
????ps????????????ж?β????????Щ??????????????????????????????????????????spring??jdbc????????????????μ??????
?????????????Щ??????????