- 浏览: 681917 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (362)
- java基础 (33)
- html/css+div/javascript (17)
- Ajax/XML/JSON/XSL (7)
- JQuery (11)
- Extjs (1)
- JSP/Servlet (19)
- MVC模式 (4)
- struts 1 (17)
- Struts 2.3.4 (17)
- Spring 3.2 (26)
- Springmvc (3)
- Hibernate 4.1 (21)
- ibatis (6)
- Velocity模板语言 (2)
- Rose框架 (5)
- EJB (1)
- JUnit测试 (2)
- 数据库DB (24)
- 重构 / 设计模式 (3)
- 开发工具IDE (37)
- 数据结构与算法设计 (3)
- Android (12)
- Linux (4)
- bug集合 (29)
- 缓存技术(redis) (3)
- Lucene全文索引 (15)
- maven3.0.5 (4)
- 小工具集合 (18)
- 面试题 (5)
- 闲聊 (11)
- 其他 (4)
- 接口API (2)
- work (2)
- Flex (0)
- JMS (1)
- 开源项目集合 (1)
- 技术博客 (1)
- 分类04 (0)
- 分类05555 (0)
最新评论
-
小小小羊:
好屌...
java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle -
liubinli2005:
这个可以脱底spring。单独使用吗?
DAO层:jade -
cangbaotu:
我觉得对于开发者来说,能脚本化编写爬虫是一件挺开心的事情( ̄▽ ...
网页爬取 -
asjava:
很好的文章, 但每段代码清单都重复了一次.
spring 事务 -
xia635317478:
jethypc 写道验证码的session无法传过去啊 还是我 ...
登陆验证码(struts2实现)
spring管理事务提交
http://blog.csdn.net/huangbiao86/article/details/6588780
修改applicationContext.xml加入事务管理 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd "> <!-- 事务管理 --> <!-- 定义一个事务管理器 --> <bean id="myHibTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" > </property> </bean> <!--定义事务通知--> <tx:advice id="txAdvice" transaction-manager="myHibTransactionManager"> <!--声明事务规则--> <tx:attributes> <tx:method name="save*" propagation="REQUIRED"/> <tx:method name="add*" propagation="REQUIRED"/> <tx:method name="insert*" propagation="REQUIRED"/> <tx:method name="update*" propagation="REQUIRED"/> <tx:method name="del*" propagation="REQUIRED"/> <!--对其他方法要求只读事务--> <tx:method name="*" propagation="SUPPORTS" read-only="true"/> </tx:attributes> </tx:advice> <aop:config> <!--定义一个切面,即定义哪些方法应用这些规则--> <aop:pointcut id="bizMethods" expression="execution(* com.accp.ke.biz.*.*(..))"/> <!--将事务通知和切面组合(织入)--> <aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods"/> </aop:config> 修改struts-config.xml配置文件,使用代理action类 type="org.springframework.web.struts.DelegatingActionProxy" <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="classpath:applicationContext.xml"/> </plug-in>
参考:
1.http://blog.csdn.net/qjyong/article/details/4824179
2.http://www.blogjava.net/robbie/archive/2009/04/05/264003.html
发表评论
-
spring 事务
2014-03-31 11:14 3399Spring 事务异常回滚 ... -
Spring定时器(Quartz)
2013-08-20 22:54 2771Spring定时器(Quartz) 1. ... -
模拟Spring的 IOC 和 DI
2013-08-15 21:42 1090模拟Spring的 IOC 和 DI 1.BeanFactor ... -
spring任务调度
2013-07-18 17:10 984spring任务调度 1,一个job对应一个处理类(bean ... -
获取ApplicationContext对象的几种方法
2013-01-29 10:47 5497方法一:在初始化时保 ... -
Spring 如何读取properties文件
2013-01-28 16:29 1515Spring 如何读取properties文件 ------ ... -
springSecurity的登录验证
2013-01-27 20:57 2368springSecurity的登录验证 一、Springse ... -
Spring事务配置的五种方式
2013-01-11 15:10 996Spring事务配置的五种方式 参考1:http://w ... -
ehcache缓存的使用
2013-01-11 15:10 964ehcache缓存的使用 1.ehcache缓存介绍:h ... -
在spring中如何处理oracle大字段
2013-01-10 12:45 1369在spring中如何处理oracle大字段 在spring ... -
spring中配置log4j
2012-11-10 16:30 1599log4j 和 slf4j slf4j和log4j用于做日志 ... -
spring每个包的详解
2012-11-09 16:53 915spring每个包的详解 spring.jar 是包含有完 ... -
当Spring管理Struts2时配置的scope="prototype"
2012-11-05 10:36 1008Spring scope="prototype&q ... -
web.xml配置加载spring
2012-11-05 10:36 971web.xml配置加载spring 第一种加载applica ... -
Spring中配置数据源
2012-11-04 20:08 1018Spring中配置数据源 ... -
DelegatingActionProxy
2012-10-31 09:53 1518DelegatingActionProxy org.spri ... -
Spring IOC实例化了哪些对象
2012-10-30 09:25 1388Spring IOC实例化了哪些对象 启动servlet容 ... -
<aop:pointcut />
2012-10-29 17:00 976<aop:config> <aop:po ... -
SSH项目解决乱码问题
2012-10-10 17:55 1172SSH解决乱码问题 第一种:利用spring的filte ... -
sping学习
2012-10-10 17:43 952spring知识点学习 、
相关推荐
Spring事务管理Demo
Spring事务管理教程,详细讲解了Spring中的事务管理,包括声明式事务,注解式事务,以及事务配置等等
Spring事务管理.pdf 1.资料 2.本地事务与分布式事务 3.编程式模型 4.宣告式模型
Synchronized锁在Spring事务管理下,导致线程不安全。
spring 事务管理的理解
Spring事务管理(全),需要的可下载!
spring事务管理几种方式代码实例:涉及编程式事务,声明式事务之拦截器代理方式、AOP切面通知方式、AspectJ注解方式,通过不同方式实例代码展现,总结spring事务管理的一般规律,从宏观上加深理解spring事务管理特性...
在该JAR包的org.springframework.transaction包中,有3个接口文件PlatformTransactionManager、TransactionDefinition和TransactionStatus,如下图所示: Spring事务管理的三个核心接口 5.1.1 事务管理的核心接口 1....
Spring事务管理4种方式 入门级 最简单demo PlatformTransactionManager TransactionTemplate
Spring事务管理中所需要的jar包是 spring-tx-3.2.0.RELEASE.jar
Spring 事务管理,Spring 事务管理,Spring 事务管理,Spring 事务管理
详细介绍Spring事务管理
此包含有所有Spring事务管理开发所需要的Jar包,包含框架、核心、表达式、日志、编译、事务切面aop、数据库连接、单元测试、框架文本等jar包。
Spring事务管理A方法内部调用B方法的回滚问题测试代码