William,
It depends on how many read/ write operations you want to perform, if you are going to have many read/ write operations on that state values then a cache system like EhCache would be very suitable for a single instance or a clustered environment. You can use ehCache event handlers to store the changes in a database system or a log file when an state value changes. By using event system you will not involve your system with database for many read/ write operations. On the other hand If you have a few read and write operations then Database would do the trick.