Application scope is multi-threaded

Application scope is more dangerous than session scope and request scope. Objects placed in application scope can be used by more than one thread, and must be designed accordingly.

If an object is to be placed in application scope, the simplest design is to ensure that the object is immutable, such that external synchronization is never necessary.

See Also :
Immutable objects
Document thread safety
Would you use this technique?
Yes   No   Undecided   
© 2010 Hirondelle Systems | Source Code | Contact | License | Quotes | RSS
Individual code snippets can be used under this BSD license - Last updated on June 5, 2010.
Over 150,000 unique IPs last month - Built with WEB4J.
- In Memoriam : Bill Dirani -