尽管这个代码速度快,但是它不支持ACID事务属性。
Although this code is fast, it does not support ACID transaction properties.
某些数据库类型和配置可以处理一些这种工作,但在大多数情况下,解决方案最终归结为如何设计代码和事务处理。
Certain database types and configurations can handle some of this effort, but in most cases the solution boils down to how you design your code and transaction processing.
因此,清单13中的代码从事务角度来说毫无用处;尽管看上去它使用事务来维护原子性和一致性,但事实上并没有。
Therefore, the code in Listing 13 is useless from a transaction standpoint; although it appears that it USES transactions to maintain atomicity and consistency, in fact it does not.
注意,这个示例中没有征用当前事务中jdbc连接的代码—容器会为我们完成这个任务。
Notice that there is no code in this example to enlist the JDBC connections in the current transaction — the container does this for us.
引入体系架构机制而不接触IDE中的事务逻辑代码,使用面向方面技术是一个非常有效的方法。
Aspect technology can be a very effective way to introduce architectural mechanisms without touching the business logic code in the IDE.
有几种类型的电子提交(请求或响应类型)和几种类型的事务代码及其对应描述。
There are several types of electronic submissions (request or response types), several types of transaction codes and their corresponding descriptions.
为了演示这种先读取技巧,我们从一些实现api层事务策略的代码入手。
To illustrate the read-first technique, I'll start with some code that implements the API Layer transaction strategy.
还有,如果需要,还要为多租户编写应用程序代码来处理所有事务。
Also, there is a requirement to write application code to process all transactions, if necessary, for multi-tenancy.
清单1中的JDBC代码没有包含任何事务逻辑,它只是在数据库中保存TRADE表中的交易订单。
The JDBC code in Listing 1 includes no transaction logic, yet it persists the trade order in the TRADE table in the database.
您不需要写任何代码来控制事务行为。
You do not need to write any code to control the transaction behavior.
事务界定代码从DAO中分离出来。
与清单1中的示例不同,由于有宣告式事务划分,这段组件代码中没有事务管理代码。
Unlike the example in Listing 1, with declarative transaction demarcation there is no transaction management code in the component methods.
在这种情况下,事务界定代码与实现业务逻辑的代码混杂在一起。
In this case, your transaction demarcation code is intermixed with code that implements the business logic.
屏幕左侧的菜单链接以多种方式调用数据库事务代码。
The menu links on the left side of the screen call database code with transactions in various ways.
事务界定代码嵌入在dao类中。
Transaction demarcation code is embedded inside the DAO class.
尤其是在一些软件开发的项目中,项目经理没有必要处理一些与代码相关的事务,把这些留给开发人员去做吧。
With software development projects, it's not necessary for the project manager to get involved at code level, leave this to the developers.
您只需要指定事务属性(没有回滚代码或回滚指令!)
You only need to specify the transaction attributes (no rollback code or rollback directives!)
可以想象,这是相当可怕的代码(例如没有事务管理),虽然其可以正常工作。
Granted, this is pretty terrible code (no transaction management, for example), but work with me here.
对于要求普通JCR代码的应用程序,JCR模块允许用直接使用JCR API的代码,透明地使用事务驱动会话。
For application where plain JCR code is required, the JCR module allows the transparent use of a transaction driven session with code that USES the JCR API directly.
添加特定协议元素、事务、循环、注释、条件处理和定制代码。
Add protocol-specific elements, transactions, a loop, a comment, conditional processing, and custom code.
此外,bean开发人员实际上不需要编写任何用于处理事务的代码,比如确定何时调用commit方法以及调用失败时该如何处理。
Furthermore, the bean developer doesn't actually have to write any code for handling transactions, such as deciding when to invoke the commit method and what to do if it fails.
SQLDatastore全部使用托管代码写成,完全支持事务,并且允许用任何语言来写存储过程。
SQLDatastore is written completely in managed code, fully supports transactions, and allows stored procedures to be written in any language.
您将测试清单3中的代码,发现persist方法在没有事务的情况下不能工作。
So, you test the code in Listing 3 and discover that the persist method didn't work without a transaction.
现在,我将修复清单1中的代码,方法是应用HighConcurrency事务策略的先读取技巧。
Now I'll fix the code in Listing 1 by applying the High Concurrency transaction strategy's read-first technique.
TransactionDemo应用程序的Directlyremove Sol菜单项提供了一个例子,说明如何从Web 应用程序角度调用事务代码。
The Directly remove Sol menu item in the Transaction Demo application provides an example of how to call transaction code from the Web application's perspective.
TransactionDemo应用程序使用XDoclet代码生成器设置事务类型。
The transaction Demo application sets up the transaction type using the XDoclet code generator.
容器处理事务,因此bean开发人员不需要编写事务处理代码。
The container handles the transactions, so the bean developer doesn't need to write transaction-handling code.
在新代码中,事务持续时间只有300ms,这显著低于清单1中的6100 ms。
The transaction duration in the new code is only 300 ms, dramatically lower than the 6100 ms from Listing 1.
如表2所示,在事务作用域中执行的代码至减少至300ms。
As you can see in Table 2, the code executing within the transaction scope is reduced to 300 ms.
例如,将业务上下文信息(比如业务事务ID和授权代码)包含在SOAP消息体中。
For example, include business context information such as business transaction ids and authorization codes into the SOAP message Body.
应用推荐