没用过,希望哪位给个例子,谢谢
解决方案 »
- 解决个javascript问题就散分!
- 如何用链接或者按钮来修改struts2中的testfield标签的disabled属性值???
- 用java开发工具能自动为servlet和jsp生成部署文件吗
- 关于spring调用存储过程的问题
- spring1.2.7+hibernate3 处理blob出错,帮帮忙!
- 相见恨晚-初识JEECG
- 跪求XMLBuddy
- iis+tomcat5出现下面的错误为什么??
- jb9中tomcat放在哪里
- JAVA与ORACLE的连接,在线等待……(高手请进)
- 求助:eclipse报错This mapped class is not specified in persistence unit " "
- 严重: Servlet.service() for servlet jsp threw exception org.springframework.beans.
http://download.csdn.net/detail/zuxianghuang/4158479
<bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sf" />
</bean> <aop:config>
<aop:pointcut id="bussinessService"
expression="execution(public * com.bjsxt.registration.service.*.*(..))" />对什么类加事物
<aop:advisor pointcut-ref="bussinessService"
advice-ref="txAdvice" />
</aop:config> <tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="exists" read-only="true" />
<tx:method name="add*" propagation="REQUIRED"/>这里就是控制事务,add*,表示对add方法加事物
</tx:attributes>
</tx:advice>