19514 shaares
136 private links
136 private links
1 result
tagged
for:cbrandlehner
In SSJS in XPages there is a feature called 'synchronized'. Any code inside a synchronized code block will only execute once at a time. If two people in two different sessions click on a button that runs the SSJS at the same time then whichever thread hits the SSJS code first will start running the synchronized block first while the other persons thread will wait till the first persons thread has finished and then once the first persons thread has finished the second persons thread will run the synchronized block of SSJS. Think of it as a car wash, it's only possible to wash one car at a time while all the other cars that need to use the car wash will queue up outside waiting for the car in front of them to be finished.