This is a simple project to demonstrate the usage and pitfalls of database transactions specially in a multi-users environment.
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.
- What happens if a person makes a deposit and at the same time someone transfers money to his account?
- What happens if a person withdraws money from account and at the same time if he tries to transfer his money to another account?
- What happens if two transfers happen at the same time while one is crediting and other is deducting?
- What happens if two withdraws happen at the same time?
- What happens if two deposits happen at the same time?