Online purchases can be made by setting up a separate transaction code.
可以通过设置单独的交易代码进行网上购物。
Although this code is fast, it does not support ACID transaction properties.
尽管这个代码速度快,但是它不支持ACID事务属性。
Understanding how the application is performing on each tier and for each class of transaction or where latency exists in the code is crucial.
了解应用程序在各个层次上的性能以及如何处理每类事务或存在延迟的地方,这是至关重要的一个方面。
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.
因此,清单13中的代码从事务角度来说毫无用处;尽管看上去它使用事务来维护原子性和一致性,但事实上并没有。
Notice that there is no code in this example to enlist the JDBC connections in the current transaction — the container does this for us.
注意,这个示例中没有征用当前事务中jdbc连接的代码—容器会为我们完成这个任务。
Unlike the example in Listing 1, with declarative transaction demarcation there is no transaction management code in the component methods.
与清单1中的示例不同,由于有宣告式事务划分,这段组件代码中没有事务管理代码。
All of these entities interact with the transaction manager so that your application code doesn't have to.
所有这些实体都与事务管理器进行交互,于是应用程序代码就不必与之交互了。
Transaction demarcation code is separated from the DAO.
事务界定代码从DAO中分离出来。
For example, if you have a transaction, you can make sure that your code always brackets transactional code with the appropriate function calls.
例如,若要处理一项事务,采用闭包后,您就能确保事务代码总能由适当的函数调用界定。
To illustrate the read-first technique, I'll start with some code that implements the API Layer transaction strategy.
为了演示这种先读取技巧,我们从一些实现api层事务策略的代码入手。
The JDBC code in Listing 1 includes no transaction logic, yet it persists the trade order in the TRADE table in the database.
清单1中的JDBC代码没有包含任何事务逻辑,它只是在数据库中保存TRADE表中的交易订单。
In the second case, where the MCA has acted on the COMMIT but could not deliver the response code, there is no transaction to roll back.
在第二种情况下,MCA已对COMMIT采取了行动,但是未能传输响应代码,因此将不存在要回滚的事务。
With the help of code examples, I'll introduce some of the common transaction pitfalls I continually see and experience in the field, in most cases in production environments.
我将借助代码示例,介绍一些我在该领域中不断看到的和经历的常见事务陷阱,大部分是在生产环境中。
As in the NEW_ORDER transaction, all steps have been collected into one SQL table function to save code path.
就像在NEW_ORDER事务中一样,所有的步骤被收集到一个sql表函数中,以节省代码路径。
Whether the data comes from one resource or many, the EJB code remains the same, and the EJB container handles the transaction appropriately.
不管数据来自于单个还是多个资源,EJB代码保持不变,而由ejb容器适当的处理事务。
You do not need to write any code to control the transaction behavior.
您不需要写任何代码来控制事务行为。
Also notice that the code performs the transaction only if the transaction amount is valid for the intended transaction type.
还要注意,只有在交易数量符合交易类型的限制时,代码才会执行交易。
There isn't even any code to define a transaction or make it XA.
甚至没有任何代码用于定义事务或者将事务变为 XA。
If you choose the latter approach, transaction demarcation code will be external to the DAO class.
如果选择后一种方式,那么事务界定代码就是在dao类外面。
Since transaction types are identified by two - or three-bit numerical or character code, a large company or small business needs to associate a business transaction category for each type.
由于事务类型由两位或三位数值或字母代码标识,因此大公司或小公司需要关联每种类型的业务事务类别。
Transaction demarcation code is embedded inside the DAO class.
事务界定代码嵌入在dao类中。
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.
对于要求普通JCR代码的应用程序,JCR模块允许用直接使用JCRAPI的代码,透明地使用事务驱动会话。
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.
可以想象,这是相当可怕的代码(例如没有事务管理),虽然其可以正常工作。
Now I'll fix the code in Listing 1 by applying the High Concurrency transaction strategy's read-first technique.
现在,我将修复清单1中的代码,方法是应用HighConcurrency事务策略的先读取技巧。
In the EJB implementation code, as a part of exception handling, set the transaction to Rollback, as shown in Figure 11.
在EJB实现代码中,作为异常处理的一部分将事务设置为Rollback,如图11所示。
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应用程序的Directlyremove Sol菜单项提供了一个例子,说明如何从Web 应用程序角度调用事务代码。
Notice in Listing 1 the lack of transaction management (no programmatic or declarative transaction annotations or code).
注意清单1缺乏事务管理(没有编程序或声明式事务注释或代码)。
We discussed how template inheritance can be used to add behaviors (like starting and committing a global transaction) transparently to the servlet code.
我们讨论了如何使用模板继承来向servlet代码透明的添加行为(比如启动和提交全局事务)。
The transaction duration in the new code is only 300 ms, dramatically lower than the 6100 ms from Listing 1.
在新代码中,事务持续时间只有300ms,这显著低于清单1中的6100 ms。
应用推荐