Home » transactions

Tag Archives: transactions

Hibernate Transaction Example

A Transaction is a sequence of operation which works as an atomic unit. A transaction only completes if all the operations completed successfully. A transaction has the Atomicity, Consistency, Isolation, and Durability properties (ACID). In this tutorial, we are going to talk about the basics of Hibernate Transactions and Sessions.               1. Introduction 1.1 ...

Read More »

JDBC Nested Transactions Example

Bipartite Graph

A nested transaction is used to provide a transactional guarantee for a subset of operations performed within the scope of a larger transaction. Doing this allows us to commit and abort the subset of operations independently of the larger transaction. This operation is theoretically possible, however, in JDBC 3.0 we can’t achieve this as easily as the definition looks. In ...

Read More »

How to write Transactional Unit Tests with Spring

Spring is a great framework to develop enterprise Java web applications. It provides tons of features for us. One of them is its TestContext Framework, which helps us to implement integration unit tests easily in our enterprise applications. Integration unit tests may cover several layers and include ApplicationContext loading, transactional persistence operations, security checks and so on. In this example, ...

Read More »

JDBC Transaction Management Example

Bipartite Graph

In this post, we want to talk about JDBC Transactions and how we can manage the operations in a database. The most popular DBMS like MySQL and Oracle have by default the option autocommit enabled, it means immediately after any DML Operation saves the changes and makes them visible to all users. To use transactions must set the database parameter ...

Read More »

Bean managed Transactions

With this example we are going to demonstrate how to handle bean managed transactions using EJBs. Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services such as transactions ...

Read More »