...
This compliant solution separates the process into a sequence of steps:
- Perform actions on data structures requiring synchronization.
- Create copies of the objects to be sent.
- Perform network calls in a separate method that does not require any synchronization.
In this compliant solution, the synchronized getPage()
method is called from an unsynchronized sendPage()
method to retrieve the requested Page
in the pageBuff
array. After the Page
is retrieved, sendPage()
calls the unsynchronized deliverPage()
method to deliver the Page
to the client.
...
Wiki Markup |
---|
\[[API 2006|AA. Java References#API 06]\] Class {{Object}} \[[Grosso 2001|AA. Java References#Grosso 01]\] [Chapter 10: Serialization|http://oreilly.com/catalog/javarmi/chapter/ch10.html] \[[JLS 2005|AA. Java References#JLS 05]\] [Chapter 17, Threads and Locks|http://java.sun.com/docs/books/jls/third_edition/html/memory.html] \[[Rotem 2008|AA. Java References#Rotem 08]\] [Falacies of Distributed Computing Explained|http://www.rgoarchitects.com/Files/fallacies.pdf] |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
12. Locking (LCK) THI06-J. Ensure that threads performing blocking operations can be terminated