3. Wat is een transactie
“A transaction is a complete unit of work. It may comprise
many computational tasks, which may include user
interface, data retrieval, and communications.”
mei ’16 3
4. Wat is een transactie
Atomicity
Consistency
Isolation
Durability
mei ’16 4
5. Wat is een transactie
try {
begin();
…
…
commit();
} catch {
rollback();
}
mei ’16 5
6. Wat is een transactie
“all activities as part of an operation are either successfully
executed and committed together or in case an operation
fails, all activities as part of the operation are rolled back”
mei ’16 6
8. XA transactie
“The goal of XA is to allow multiple resources (such as
databases, application servers, message queues,
transactional caches, etc.) to be accessed within the same
transaction, thereby preserving the ACID properties across
applications. XA uses a two-phase commit to ensure that all
resources either commit or roll back any particular
transaction consistently (all do the same).”
mei ’16 8
10. XA transactie
mei ’16 10
TransactionManager
Application Program
Resource Manager
Resource Manager
Transactionele
wijzigingen
Transactie start
/ einde
Prepare
Commit
Rollback
11. Transaction Manager
“A transaction manager is the part of an application that is
responsible for coordinating transactions across one or
more resources.”
mei ’16 11
12. Transaction Manager
• Local transaction manager
• Global transaction manager
• Distributed transaction manager
mei ’16 12
14. JTA
“The Java Transaction API (JTA) enables distributed
transactions to be done across multiple X/Open XA
resources in a Java environment”
mei ’16 14
17. 2-Phase Commit
“The two-phase commit protocol (2PC) is a type of atomic
commitment protocol (ACP). It is a distributed algorithm
that coordinates all the processes that participate in a
distributed atomic transaction on whether to commit or
abort (roll back) the transaction (it is a specialized type of
consensus protocol).”
mei ’16 17
20. Last Resource
“Sometimes it is necessary to allow a non-XA-aware
resource manager to participate in a transaction. This is
often the case with data stores that do not support
distributed transactions. In this situation, you can use a
technique known as Last Resource Commit Optimization
(LRCO).”
mei ’16 20
22. WS-Atomic Transaction
“WS-AtomicTransaction defines protocols that enable
existing transaction processing systems to wrap their
proprietary protocols and interoperate across different
hardware and software vendors.”
mei ’16 22
27. Eindhoven
De Zaale 11
5612 AJ Eindhoven
Netherlands
Utrecht
Blok D, Graadt van Roggenweg 328-334
3531 AH Utrecht
Netherlands
Sofia Bulgaria
Nikolay Haytov 12
1113 Sofia
Bulgaria
info@syntouch.nl
www.syntouch.nl