`
星夜的遐想
  • 浏览: 186896 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
阅读更多

在配置Hibernat的事务传播特性比较常用就是REQUIRED,read-only,REQUIRES_NEW,示例代码如下:

 

 

<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="find*" read-only="true" />
		<tx:method name="load*" read-only="true" />
		<tx:method name="*REQUIRES_NEW" propagation="REQUIRES_NEW"/>
		<tx:method name="*" propagation="REQUIRED" />
	</tx:attributes>
</tx:advice>

 

 

 

 1、假设有UserService中有代码如下:

 

 

public void save(User user){
		
		String code =null;
		try {
			code=codeGenerateService.generateUserCode_REQUIRES_NEW();
		} catch (Exception e) {
			LOG.error(e.getMessage(),e);
		}
	
		user.setUserCode(code);
		baseDao.save(user);
		
	}

    

     在执行过程中后台打印的日志如下:

 

写道
org.springframework.orm.hibernate3.HibernateTransactionManager - Creating new transaction with name [com.lyl.system.service.UserService.save]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
2015-11-11 10:17:03:DEBUG main org.hibernate.impl.SessionImpl - opened session at timestamp: 5927941831421952
org.springframework.orm.hibernate3.HibernateTransactionManager - Opened new Session [org.hibernate.impl.SessionImpl@86d1da] for Hibernate transaction
org.springframework.orm.hibernate3.HibernateTransactionManager - Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@86d1da]
org.springframework.orm.hibernate3.HibernateTransactionManager - Found thread-bound Session [org.hibernate.impl.SessionImpl@86d1da] for Hibernate transaction
org.springframework.orm.hibernate3.HibernateTransactionManager - Suspending current transaction, creating new transaction with name [com.lyl.system.service.CodeGenerateService.generateUserCode_REQUIRES_NEW]
org.hibernate.impl.SessionImpl - opened session at timestamp: 5927941831806976
org.springframework.orm.hibernate3.HibernateTransactionManager - Opened new Session [org.hibernate.impl.SessionImpl@19977bd] for Hibernate transaction
org.springframework.orm.hibernate3.HibernateTransactionManager - Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@19977bd]
org.hibernate.transaction.JDBCTransaction - begin
org.hibernate.jdbc.ConnectionManager - opening JDBC connection
net.sf.ehcache.CacheManager@6691da net.sf.ehcache.util.UpdateChecker - Checking for update...
org.hibernate.transaction.JDBCTransaction - current autocommit status: true
org.hibernate.transaction.JDBCTransaction - disabling autocommit
Hibernate:
select
codegenera0_.codeType as codeType0_,
codegenera0_.value as value0_
from
demo1_code_generate codegenera0_
where
codegenera0_.codeType=?
org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
org.hibernate.loader.Loader - result row: EntityKey[com.lyl.system.entity.CodeGenerate#USER_CODE]
org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
org.hibernate.engine.TwoPhaseLoad - resolving associations for [com.lyl.system.entity.CodeGenerate#USER_CODE]
org.hibernate.engine.TwoPhaseLoad - done materializing entity [com.lyl.system.entity.CodeGenerate#USER_CODE]
org.hibernate.engine.StatefulPersistenceContext - initializing non-lazy collections
org.springframework.orm.hibernate3.HibernateTemplate - Not closing pre-bound Hibernate Session after HibernateTemplate
org.springframework.orm.hibernate3.HibernateTemplate - Found thread-bound Session for HibernateTemplate
org.springframework.orm.hibernate3.HibernateTemplate - Not closing pre-bound Hibernate Session after HibernateTemplate
org.springframework.orm.hibernate3.HibernateTransactionManager - Initiating transaction commit
org.springframework.orm.hibernate3.HibernateTransactionManager - Committing Hibernate transaction on Session [org.hibernate.impl.SessionImpl@19977bd]
org.hibernate.transaction.JDBCTransaction - commit
org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects
org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
org.hibernate.pretty.Printer - listing entities:
org.hibernate.pretty.Printer - com.lyl.system.entity.CodeGenerate{value=8, codeType=USER_CODE}
org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
org.hibernate.SQL -
update
demo1_code_generate
set
value=?
where
codeType=?
Hibernate:
update
demo1_code_generate
set
value=?
where
codeType=?
org.hibernate.cache.UpdateTimestampsCache - Pre-invalidating space [demo1_code_generate]
org.hibernate.jdbc.AbstractBatcher - Executing batch size: 1
org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
org.hibernate.transaction.JDBCTransaction - re-enabling autocommit
org.hibernate.transaction.JDBCTransaction - committed JDBC Connection
org.hibernate.jdbc.ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
org.hibernate.cache.UpdateTimestampsCache - Invalidating space [demo1_code_generate], timestamp: 5927941833535488
org.springframework.orm.hibernate3.HibernateTransactionManager - Closing Hibernate Session [org.hibernate.impl.SessionImpl@19977bd] after transaction
org.springframework.orm.hibernate3.SessionFactoryUtils - Closing Hibernate Session
org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
org.hibernate.jdbc.ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
org.springframework.orm.hibernate3.HibernateTransactionManager - Resuming suspended transaction after completion of inner transaction
org.springframework.orm.hibernate3.HibernateTemplate - Found thread-bound Session for HibernateTemplate
org.hibernate.event.def.AbstractSaveEventListener - generated identifier: 402883e750f6e82e0150f6e833cb0000, using strategy: org.hibernate.id.UUIDHexGenerator
org.springframework.orm.hibernate3.HibernateTemplate - Not closing pre-bound Hibernate Session after HibernateTemplate
org.springframework.orm.hibernate3.HibernateTransactionManager - Initiating transaction commit
org.springframework.orm.hibernate3.HibernateTransactionManager - Committing Hibernate transaction on Session [org.hibernate.impl.SessionImpl@86d1da]
org.hibernate.transaction.JDBCTransaction - commit
org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
org.hibernate.pretty.Printer - listing entities:
org.hibernate.pretty.Printer - com.lyl.system.entity.User{sex=null, userCode=000008, password=m123, updateDate=Wed Nov 11 22:17:04 CST 2015, tephone=13145453211, id=402883e750f6e82e0150f6e833cb0000, createUser=1, enableFlag=false, address=上海市松江区, email=132333@qq.com, userName=zhangsan, createDate=Wed Nov 11 22:17:04 CST 2015, updateUser=1}
org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
org.hibernate.SQL -
insert
into
demo1_user
(createDate, createUser, enableFlag, updateDate, updateUser, address, email, password, sex, tephone, userCode, userName, id)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
demo1_user
(createDate, createUser, enableFlag, updateDate, updateUser, address, email, password, sex, tephone, userCode, userName, id)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
org.hibernate.cache.UpdateTimestampsCache - Pre-invalidating space [demo1_user]
org.hibernate.jdbc.AbstractBatcher - Executing batch size: 1
org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
org.hibernate.transaction.JDBCTransaction - re-enabling autocommit
org.hibernate.transaction.JDBCTransaction - committed JDBC Connection
org.hibernate.jdbc.ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
org.hibernate.cache.UpdateTimestampsCache - Invalidating space [demo1_user], timestamp: 5927941833596929
org.springframework.orm.hibernate3.HibernateTransactionManager - Closing Hibernate Session [org.hibernate.impl.SessionImpl@86d1da] after transaction
org.springframework.orm.hibernate3.SessionFactoryUtils - Closing Hibernate Session
org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
org.hibernate.jdbc.ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!

 

   有上面日志可以看出,首先从spring bean工厂里面取得单例userService,进入save方法后开启事务,并打开session ,在执行到调用方法codeGenerateService.generateUserCode_REQUIRES_NEW()获取用户代码时,在codeGenerateService的方法generateUserCode_REQUIRES_NEW()时根据配置,方法内又开启了一个新事务,当generateUserCode_REQUIRES_NEW()调用完成后,将新开启的事务就提交了,因此我们可以通过try catch捕获执行运行时异常(包括数据库执行异常),如果不捕获发生的异常,导致UserService的save方法事务回滚,保存失败。

 

 

假设我们有UserService方法中,同样声明了一个生成用户代码的方法如下:

 

public String generateUserCode_REQUIRES_NEW(){
		Map<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("codeType", SystemEnum.CODE_TYPE.USER_CODE);
		List<CodeGenerate> codeList = baseDao.findByHQL(
				"from CodeGenerate where codeType=:codeType", paramMap);
		CodeGenerate cg = codeList.get(0);
		String value = cg.getValue();
		Integer i = Integer.valueOf(value);
		i = i + 1;
		cg.setValue(i.toString());
		baseDao.update(cg);
		Double d = new Double(Math.pow(10, 6));
		int a = d.intValue() + i;
		String str = new Integer(a).toString();
		str = str.substring(1);
		return str;
	}

 

在UserService的调用本类声明的方法generateUserCode_REQUIRES_NEW()会怎么样呢?看下面的日志就知道了。

写道
2015-11-11 10:34:36:DEBUG main org.springframework.beans.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'userService'
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Creating new transaction with name [com.lyl.system.service.UserService.save]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
2015-11-11 10:34:36:DEBUG main org.hibernate.impl.SessionImpl - opened session at timestamp: 5927946143420416
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Opened new Session [org.hibernate.impl.SessionImpl@86d1da] for Hibernate transaction
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@86d1da]
2015-11-11 10:34:36:DEBUG net.sf.ehcache.CacheManager@6691da net.sf.ehcache.util.UpdateChecker - Checking for update...
2015-11-11 10:34:36:DEBUG main org.hibernate.transaction.JDBCTransaction - begin
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.ConnectionManager - opening JDBC connection
2015-11-11 10:34:36:DEBUG main org.hibernate.transaction.JDBCTransaction - current autocommit status: true
2015-11-11 10:34:36:DEBUG main org.hibernate.transaction.JDBCTransaction - disabling autocommit
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Exposing Hibernate transaction as JDBC transaction [jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8, UserName=root@localhost, MySQL Connector Java]
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTemplate - Found thread-bound Session for HibernateTemplate
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
2015-11-11 10:34:36:DEBUG main org.hibernate.loader.Loader - result row: EntityKey[com.lyl.system.entity.CodeGenerate#USER_CODE]
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2015-11-11 10:34:36:DEBUG main org.hibernate.engine.TwoPhaseLoad - resolving associations for [com.lyl.system.entity.CodeGenerate#USER_CODE]
2015-11-11 10:34:36:DEBUG main org.hibernate.engine.TwoPhaseLoad - done materializing entity [com.lyl.system.entity.CodeGenerate#USER_CODE]
2015-11-11 10:34:36:DEBUG main org.hibernate.engine.StatefulPersistenceContext - initializing non-lazy collections
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTemplate - Not closing pre-bound Hibernate Session after HibernateTemplate
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTemplate - Found thread-bound Session for HibernateTemplate
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTemplate - Not closing pre-bound Hibernate Session after HibernateTemplate
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTemplate - Found thread-bound Session for HibernateTemplate
2015-11-11 10:34:36:DEBUG main org.hibernate.event.def.AbstractSaveEventListener - generated identifier: 402883e750f6f83e0150f6f8438c0000, using strategy: org.hibernate.id.UUIDHexGenerator
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTemplate - Not closing pre-bound Hibernate Session after HibernateTemplate
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Initiating transaction commit
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Committing Hibernate transaction on Session [org.hibernate.impl.SessionImpl@86d1da]
2015-11-11 10:34:36:DEBUG main org.hibernate.transaction.JDBCTransaction - commit
2015-11-11 10:34:36:DEBUG main org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
2015-11-11 10:34:36:DEBUG main org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
2015-11-11 10:34:36:DEBUG main org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 1 insertions, 1 updates, 0 deletions to 2 objects
2015-11-11 10:34:36:DEBUG main org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2015-11-11 10:34:36:DEBUG main org.hibernate.pretty.Printer - listing entities:
2015-11-11 10:34:36:DEBUG main org.hibernate.pretty.Printer - com.lyl.system.entity.User{sex=null, userCode=000010, password=m123, updateDate=Wed Nov 11 22:34:36 CST 2015, tephone=13145453211, id=402883e750f6f83e0150f6f8438c0000, createUser=1, enableFlag=false, address=上海市松江区, email=132333@qq.com, userName=zhangsan, createDate=Wed Nov 11 22:34:36 CST 2015, updateUser=1}
2015-11-11 10:34:36:DEBUG main org.hibernate.pretty.Printer - com.lyl.system.entity.CodeGenerate{value=10, codeType=USER_CODE}
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2015-11-11 10:34:36:DEBUG main org.hibernate.SQL -
Hibernate:
insert
into
demo1_user
(createDate, createUser, enableFlag, updateDate, updateUser, address, email, password, sex, tephone, userCode, userName, id)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2015-11-11 10:34:36:DEBUG main org.hibernate.cache.UpdateTimestampsCache - Pre-invalidating space [demo1_user]
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - Executing batch size: 1
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2015-11-11 10:34:36:DEBUG main org.hibernate.SQL -

Hibernate:
update
demo1_code_generate
set
value=?
where
codeType=?
2015-11-11 10:34:36:DEBUG main org.hibernate.cache.UpdateTimestampsCache - Pre-invalidating space [demo1_code_generate]
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - Executing batch size: 1
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2015-11-11 10:34:36:DEBUG main org.hibernate.transaction.JDBCTransaction - re-enabling autocommit
2015-11-11 10:34:36:DEBUG main org.hibernate.transaction.JDBCTransaction - committed JDBC Connection
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
2015-11-11 10:34:36:DEBUG main org.hibernate.cache.UpdateTimestampsCache - Invalidating space [demo1_code_generate], timestamp: 5927946145214465
2015-11-11 10:34:36:DEBUG main org.hibernate.cache.UpdateTimestampsCache - Invalidating space [demo1_user], timestamp: 5927946145214465
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.HibernateTransactionManager - Closing Hibernate Session [org.hibernate.impl.SessionImpl@86d1da] after transaction
2015-11-11 10:34:36:DEBUG main org.springframework.orm.hibernate3.SessionFactoryUtils - Closing Hibernate Session
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2015-11-11 10:34:36:DEBUG main org.hibernate.jdbc.ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!

 

 UserService调用用本类中的EQUIRES_NEW结尾的方法并没有 开启事务,也就是说时它们属于同一个事务,而且执行是顺序我我们注意到打印save中的insert语句,再打印generateUserCode_REQUIRES_NEW()方法的update语句,说明调用方法比被调方法中的(影响数据)语句先执行。

 

 

总结:

当我们需要保证执行某个操作时单独事务的时候,需要注意两点:

1、首先需要在配置文件中声明那些需要启用新事务REQUIRES_NEW

2、调用方法和被调用需要开启新事务的方法不在同一个类中。(类中的A方法不能调用同类中B方法,即使B方法已经声明需要开启新事务)。

 

 

 

 

 

 

 

 

 

    

 

 

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    ejb3的一些摘记

    7. **事务管理**:EJB 3提供了一种声明式事务管理方式,通过`@TransactionAttribute`注解,开发者可以轻松控制事务的隔离级别、传播行为和回滚规则。 8. **安全性**:EJB 3集成了Java EE的安全模型,可以使用`@...

    自主研修摘记.doc

    【自主研修摘记】的主题聚焦于如何激发学生对计算的兴趣,这在数学教育中尤为重要。以下是摘记中提到的五个关键策略: 1. **创设情境,激发兴趣**:教师应当利用教材内容和学生的心理特点,设计引人入胜的课堂开头...

    Fluent重要说明摘记.pdf

    Fluent软件应用过程中的一些比较重要的说明摘记

    信息系统项目管理师摘记

    软考信息系统管理师考试摘记。 项 目 管 理 知 识 体 系(九大管理) INPUT TOOL OUTPUT 4.1 制定项目章程 1、合同(如果适用) 1、项目选择方法 1、项目章程 2、项目工作说明书 2、项目管理方法系   3、事业环境...

    《Effective C++》摘记

    以上摘录自《Effective C++》中的知识点涵盖了C++编程中的许多重要方面,从基础语法到高级特性均有涉及。通过学习这些最佳实践,开发者可以编写出更高效、更健壮、更容易维护的C++代码。这些规则和指导原则不仅适用...

    《胡希恕伤寒论坛讲座》摘记.doc

    《胡希恕伤寒论坛讲座》摘记.doc

    第5课网络摘记教学设计.doc

    【网络摘记教学设计】 本课程的核心是教授学生如何有效地在网络中查找、搜集信息,并将这些信息整理成有条理的文档,特别是使用Microsoft Word进行简单的排版。教学目标包括三个方面:一是掌握资料查找和搜集的基本...

    胡希恕伤寒论坛的讲座摘记.doc

    "胡希恕伤寒论坛讲座摘记" 本文摘记了胡希恕伤寒论坛的讲座要点,总共十八点,涵盖了中医基础理论、方剂学、诊断学等多方面的知识点。 一、温病不能发汗,不能吃泻药,更不能用火攻,只能用白虎汤。 本点讲述了...

    Codelife 不止代码 - 自阅读加注标签-技术规划的借鉴 有摘记和感想.md

    Codelife 不止代码 - 自阅读加注标签-技术规划的借鉴 有摘记和感想.md,提供了原文的详细目录大纲,更重要的是给出了自学摘记,记录下诸多感想。 人的学习进步体现在对抽象问题的概括和具体问题的有针对性的见解,...

    Hibrenate 学习摘记

    ### Hibrenate 学习摘记 #### Hibernate 概述与基本配置 Hibernate 是一个开源的对象关系映射(ORM)框架,它简化了 Java 应用程序与数据库之间的交互过程。通过将对象模型与数据库模型进行映射,开发人员可以更...

    构建高性能web站点摘记.pdf

    构建高性能Web站点涉及多个关键领域,包括服务器并发策略、动态内存缓存、动态脚本加速、浏览器缓存、Web服务器缓存以及反向代理缓存。这些策略的优化对于提升网站性能至关重要。 首先,服务器并发策略是提高Web...

    计算机操作系统(第四版)汤晓丹著复习摘记.pdf

    - 分时系统:为了解决多道批处理系统的交互能力问题,分时系统允许多个用户通过终端以交互的方式使用计算机资源,实现了多路性、独立性、及时性、交互性等特性。 - 实时系统:系统能够及时响应外部事件的请求,在...

    思想品德计划总结高中政治有效课堂教学探索摘记.doc

    【高中政治有效课堂教学探究】 尊敬的各位领导,同行们,大家好!我今天要与大家分享的是我在高中政治教学中关于有效课堂教学的一些探索和心得。在农村高中环境下,面对学生素质、师资力量及教学设施的局限,如何...

    阅读摘记|Facebook设计B端产品的4项基本原则 .doc

    Facebook在设计B端产品时,遵循了四个核心原则,这些原则旨在创造高效、用户导向且适应性强的企业级工具。下面是对这些原则的详细解释: 1. **帮助用户成长**:B端产品不仅要协助用户完成任务,还要促进他们的专业...

    unix,你在学UNIX?这个高手的摘记,非常不错,快下吧。

    #### 二、UNIX系统特性 - **模块化设计**:UNIX系统的设计强调模块化,这意味着其功能组件可以独立地进行开发和维护,同时也便于系统的扩展和定制。 - **命令行界面**:尽管现代UNIX系统支持图形用户界面(GUI),但...

    2021-2022收藏资料自贡市绿盛实验学校课堂教学改革摘记山东行第11期总第27期(自贡课模讲座八之37).doc

    【教育精品资料】这篇文档是关于2021-2022年自贡市绿盛实验学校在课堂教学改革过程中的学习与探索记录,主要涵盖了四川自贡地区多个区县的教改模式,并且详细描述了学校教师赴山东名校参观学习的考察报告。...

    PHP 实例化类的一点摘记

    下面是调用一个模型(Module)的函数。这个函数的基本功能是指定一个模型(抽象化为类)的名称,然后它会在模型目录下面寻找这个类的脚本实例化以后返回。这样的做法有一点好处就是载入和实例化是自动的,你可以获得...

    斯蒂芬P罗宾斯管理学笔记

    斯蒂芬·P·罗宾斯是全球知名的管理学权威,他的著作被广泛应用于商学院的教育和企业培训中。这份“斯蒂芬P罗宾斯管理学笔记”是一份宝贵的考研资料,它涵盖了管理学的核心概念、理论和实践,旨在帮助学生深入理解和...

    台湾奥美经典案例和左岸咖啡馆策划方案.pptx

    通过独特的白色塑料杯设计,强调产品的“新鲜”特性,以此区别于竞品。 3. **品牌概念创建**:左岸咖啡馆的概念来源于法国塞纳河左岸的文化艺术氛围,目标消费者定位于17-22岁的年轻女性,她们对文学艺术有情感共鸣...

Global site tag (gtag.js) - Google Analytics