Slide 12
Slide 12 text
Kinds of State (2)
• Now, which state to hold in shared
instance variables in the first place?
– e.g. in Spring singletons or in Servlets
• YES:
– thread-safe resource factories
• such as JDBC DataSources
– generally: configuration state
• also settings, flags, etc
• to be covered in more detail in a minute
– also: counters, statistics, etc
• use synchronization accordingly