Persisting state

Sachin Tandon <[email protected]>
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <[email protected]>
Hi All,

 

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. 

Now my thoughts around this are - 

1)       Use an entity bean for persisting state in the database

2)       Have a static class 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 static class would have synchronized methods to lock the
object when the state is being changed by one process and make the other
wait.

 

Any suggestions around taking this approach ?

 

Thanks


===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.