spring
共 5 篇文章
Spring事务管理
Spring提供了一流的事务管理。在Spring中可以支持声明式事务和编程式事务。 本章主要目标如下: 1,Spring事务 2,事务属性 3,事务管理器 4,声明式事务 1.1Spring的事务 事务管理在应用程序中起着至关重要的作用:它是一系列任务的组成工作单元,在这个工作单元中,所有的任务必须同时执行。它们只有二种可能执行结果,要么所有任务全部执行成功,要么所有任务全部执行失败。 Spring中提供了丰富的事务管理功能,它们超过了EJB并且和EJB一样支持声明式事务,重要的是Spring提供了致的事务管理,它有如下优点。 1,为不同的事务的API提供一致的编程模式 2,提供更简单,更易…
2009-03-02 13:40 · spring · Spring · 项目管理 · MySQL · 配置管理 · AOP
spring hibernate 事务
2008-09-28 09:57 可能还有其他很多模块。可能只是其中的模块。 第一种:配置声明式事务的方法如下。也是我们最常用的方法了,它适用于你的库表比较少的情况下。 false com.jack.fund.service.IFundService PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED,readOnly 以下可能还有其他的xxxServiceDAOProxy.大家可以看出针对每一个功能模块配置一个业务代理服务。如果模块多…
2009-03-02 11:47 · spring · Spring · 正则表达式 · Hibernate · 配置管理 · Bean
pring的Beanfactory在jsp,servlet,web.xml等的配置
关键字: spring beanfactory 在web application 调用Spring的Beanfactory 1)配置web.xml Java代码 contextConfigLocation WEB-INF/applicationContext*.xml classpath:applicationContext-datasource.xml classpath:applicationContext-hibernate.xml classpath:applicationContext-dao.xml classpath:applicationContext-service.xml…
2009-03-02 11:46 · spring · Spring · XML · JSP · Web · Servlet
spring aop编程(二)(转载)
前面主要介绍了如何通过xml实现aop编程,下面主要介绍如何通过@AspectJ来实现。 为了使@AspectJ 支持生效, 需要做以下步骤: 在xml中设置 或者 在xml中加入 声明 aspect package org.xyz; import org.aspectj.lang.annotation.Aspect; @Aspect public class NotVeryUsefulAspect { } 声明 pointcut @Pointcut("execution(* transfer(..))") public void transfer() {} 声明 advice Before…
2008-01-16 17:48 · spring · Spring · XML · AOP · 编程
spring 2.0 aop编程(一)(转载)
在spring2.0中,aop发生了很大的变化: 主要分为两大方面 1.支持简单的aop xml配置 2.支持@AspectJ的注释 先来看一看第一种情况: 申明一个aspect,在xml中的申明如下: ... ... 申明pointcut 申明advice Before advice: After returning advice: ... 或者带有返回参数 ... After throwing advice: ... 或者带有throwing ... After (finally) advice: ... Around advice: ... Advice parameters: 对于引…
2008-01-16 17:47 · spring · Spring · XML · AOP · 编程