Skip to content

This is a simple project to demonstrate the usage and pitfalls of database transactions specially in a multi-users environment.

Notifications You must be signed in to change notification settings

SureshSamarawarna/db-transaction-in-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB Transactions in Action

This is a simple project to demonstrate the usage and pitfalls of database transactions specially in a multi-users environment.

How to use this project?

In order to run this application, you have to set up a connection pool with the help of JNDI under the name of jdbc/dep9-banking. You can find the database script for this project under the resource folder.

Things to look for,

  1. What happens if a person makes a deposit and at the same time someone transfers money to his account?
  2. What happens if a person withdraws money from account and at the same time if he tries to transfer his money to another account?
  3. What happens if two transfers happen at the same time while one is crediting and other is deducting?
  4. What happens if two withdraws happen at the same time?
  5. What happens if two deposits happen at the same time?

About

This is a simple project to demonstrate the usage and pitfalls of database transactions specially in a multi-users environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages