I have a requirement to have an object which would maintain the state of a process throughout the lifecycle of the project. This object will be called from various modules across the application and will have to return the state. There will be a controller/manager kind of class which will be interfacing with the other modules.
- Posted by: sac sac
- Posted on: December 09 2003 14:51 EST
Now my thoughts around this are
1)Use an entity bean for persisting state in the database
2)Have a stateless sessio bean which will be managing this entity bean (we have no clients, there will be internal processes which will be notifying for the change in state)
3)The entity bean will take care of locking of the database for transactions happening for one record
Any suggestions around taking this approach ?
Have you thought about using an in-memory clustered cache/datastore such as Coherence to accomplish your goals? Coherence provides cluster-wide concurrency (i.e. locking) and event notification, which seems to fit right into your requirements.
Tangosol Coherence: Cluster your Work. Work your Cluster.