I'm new to multithreading and I have some basic question for which I could not get answers for. Let's say I have a class named BankTransaction and I want to handle multithreading case in there.

CASE 1 (Application based singleton)
------------------------------------

```
@Singleton (Application based singleton)
class BankTransaction {
    synchronized void doSomeTransaction() {
        // write operation
    }
}

```

Case 2 (Request based singleton)
--------------------------------

```
@Singleton (Request based singleton)
class BankTransaction{
    synchronized void doSomeTransaction() {
        // write operation
    }
}

```

Questions
---------

Please bear with me and explain me in layman terms as I need to get things cleared.

1. In Case 1, if 1000 users are making use of the same instance (as it is application based singleton) of class BankTransaction and use the method doSomeTransaction(), the requests for each of the 1000 users be slow? because it is synchronized and will work Thread-safe. So, it is bad approach right. Is my understanding correct?
2. In Case 2, if the same 1000 users are making use of doSomeTransaction() method of class BankTransaction, each will get their own instances of class BankTransaction and it will be never slow for any one of them. But how do I handle race condition when say for example out of those 1000 users, 2 of them are closely related (husband and wife) and are accessing same bank account and doing doSomeOperation() method at the same time. How do I handle this? because both of them again have 2 different instances of class BankTransaction and data inconsistency would occur.