S

 

Synchronized

Every Java object has a lock. A synchronized block uses an object's lock to act like a binary semaphore with the initial value "1", solving the mutual exclusion critical section problem:
Object obj = new Object();
...
synchronized (obj) { // in a method
... // any code, e.g., critical section
}

The construct:
... synchronized method(...) {
... // body of method
}

is an abbreviation for:
... method(...) {
synchronized (this) {
... // body of method
}
}


That is, the entire body of the instance method is a synchronized block on the object (keyword this) the method is in.

S
Servlet
Servlet Container
Servlet Context
Servlet Mapping
Session
Session Bean
Singleton
Stateful Session Bean
Stateless Session Bean
Static
Static Field
Static Method
Synchronized
Use of this website constitutes acceptance of the AllAppLabs.com Terms and Conditions