when will a databasechange be committed?

1) Database-updates via DML in a SQLExec-statement (e.g. INSERT INTO PS_TEST_TABLE VALUES(‘value_field_1′,’value_field_2′), triggered via an online component:
Peoplebooks states that DML in a SQLExec-statement is only allowed in FieldChange, SavePreChange, Workflow and SavePostChange events.
There’s a big difference in the outcome per event though; when this statement is put in a FieldChange-event, the DML is committed instantly, and this is something you probably don’t want!

2) Database-updates via DML in a SQLExec-statement (e.g. INSERT INTO PS_TEST_TABLE VALUES(‘value_field_1′,’value_field_2′), triggered via an Application Engine:
These updates are being committed according the AppEngine’s commit-settings.

2) Database-updates via a component interface, triggered via an online component (e.g. component A triggers component interface B_CI, triggering component B):
These updates are being committed as soon as the CI save-method is being invoked from the calling component (e.g. component A).

3) Database-updates via a component interface, triggered via an Application Engine (eg. AppEngine AE_1 triggers component interface B_CI, triggering component B):
These updates are being committed according the AppEngine’s commit-settings.
An exception to this rule I just recently encountered: the GetFile-statement leads to an immediate commit, even when used in an AppEngine-context!

在PLSQL中操作record时,有必要Commit的要手动处理,有时可能会发生锁表。

时间: 2024-10-21 23:32:09

when will a databasechange be committed?的相关文章

Cannot forward after response has been committed

项目:蒙文词语检索 日期:2016-05-01 提示:Cannot forward after response has been committed 出处:request.getRequestDispatcher("admin.jsp").forward(request, response); 解决方法: 原代码:request.getRequestDispatcher("admin.jsp").forward(request, response); 修改成:删除

WARN::Committed before 500 Unable to show problem report:|java.lang.IllegalStateException

2015-01-06 18:23:17.160:WARN::Committed before 500 Unable to show problem report:|java.lang.IllegalStateException: STREAM||Class: org.mortbay.jetty.Response|File: Response.java|Method: getWriter|Line: 616 - org/mortbay/jetty/Response.java:616:-1 2015

Cannot create a session after the response has been committed

有时候在操作Session时,系统会抛出如下异常 java.lang.IllegalStateException: Cannot create a session after the response has been committed 之所以会出现此类问题是因为我们在Response输出响应后才创建Session的. (因为那时候服务器已经将数据发送到客户端了,即:就无法发送Session ID 了) 解决办法: 1.创建访问Session的语句[request.getSession()]提

Transaction And Lock--READ COMMITTED隔离级别下的"脏读"

在READ UNCOMMITTED事务隔离级别下或使用WITH(NOLOCK)来查询数据时,会出现脏读情况,因此对于一些比较"关键"的业务,会要求不能使用WITH(NOLOCK)或允许在READ UNCOMMITTED事务隔离级别下,于是我们使用默认的READ COMMITTED隔离级别来访问数据,但是这样真的就没有问题么? 让我们来做个小实验 准备测试数据 --======================================= --创建测试表 CREATE TABLE T

MySQL5.7 Read Committed事务隔离级别的研究-出现幻读

事务隔离级别为Read Committed的情况下: 事务2不执行commit,可以读取到事务1新添加的记录.此处说明出现了幻读. 当事务隔离级别改为REPEATABLE-READ后,能够解决该问题即解决幻读. 幻读定义:一个事务按相同的查询条件重新读取以前检索过的数据,却发现其他事务插入了满足其查询条件的新数据. session1执行事务1:只插入和提交 mysql> select @@global.tx_isolation;select @@tx_isolation; +----------

read repeatable&read committed 区别

read repeatable:开启一个事务,读一个数据,而后再次读,这2次读的数据是一致的(行级锁且是锁间隙); read committed:开启一个事务,读一个数据,而后再次读,这2次可能不一样的,因为在这2次 读之间可能有其他事务更改这个数据,这也就是读提交,每次读到的数据都是已经提交的(行级锁,不锁间隙)

committed与urgent的区别

Committed跟Urgent都是time automaton 中用来表示state的关键词. 它们的主要区别是: Committed前后的两个状态改变(transition)是串行发生,不可打断的. Urgent则是,前后两个状态改变(transition)是并行发生的. 如图:

有时候在操作Session时,系统会抛出如下异常:java.lang.IllegalStateException: Cannot create a session after the response has been committed

有时候在操作Session时,系统会抛出如下异常 java.lang.IllegalStateException: Cannot create a session after the response has been committed 原因1: Session 的创建语句: HttpSession seesion = request.getSession(); 之前有Response的输出语句. 应该把HttpSession seesion = request.getSession(); 放

异常:The server committed a protocol violation

The server committed a protocol violation. Section=ResponseHeader Detail='Content-Length' header value is invalid 今天客户端偶然碰到了这个问题,从来没有发生过. 网上收集的资料来看,大部分的解决方案是在 web config文件 和 app config文件添加一个配置: <system.net> <settings> <httpWebRequest useUns