Blog Archives

07: Debugging Spring Transaction Management

Never just trust that adding @Transactional annotation is going to create a transactional boundary for your service layer. EventRestController –> EventMergeProcesorImpl –> EventControlDAOImpl The @Transactional annotations added to “public” methods of the EventMergeProcesorImpl. Spring creates a proxy around the “EventMergeProcesorImpl”. So, here are a few tips to debug #1. Run…



9 Java Transaction Management Interview Q&As

Q1. What is a Transaction? A1. A transaction is a set of operations that should be completed as a unit. If one operation fails then all the other operations fail as well. Example 1: If you transfer funds between two accounts there will be two operations in the set Operation…

Tags:

Event sourcing & CQRS interview Q&As

Most feasible way to handle consistency across microservices is via eventual consistency. This model doesn’t enforce distributed ACID transactions across microservices. Event sourcing is an event-centric approach to business logic design and persistence. It favours to use some mechanisms of ensuring that the system would be eventually consistent at some…



JTA interview Q&A

Q1. What is a Transaction? What does setAutoCommit do? A1. A transaction is a set of operations that should be completed as a unit. If one operation fails then all the other operations fail as well. For example if you transfer funds between two accounts there will be two operations…



Spring, JavaConfig (@Configuration), and TransactionManager

This extedns configuring JDBC and JPA to configure the TransactionManager.

Example #1 Wiring JDBC Transaction Manager

Note: @EnableTransactionManagement annotation



Transaction management in SQL — Sybase example

Q. How do you perform transaction management in SQL stored procedures?
A. Handled with begin, commit, and rollback ‘tran’ commands in Sybase server.

Q. Why is it important?
A. It is important to leave the database in a consistent state.

Q. Can you give an example?
A. For example, as demonstrated below, if you are going to delete 21 records from a database table, you can use transaction management to ensure that a GIVEN COUNT say 21 records are either deleted or rolled back. Partially deleting records can leave the database  in …



300+ Java & Big Data FAQs - Quick Prep

Java & Big Data Tutorials

Top