Not as such. The general concept is usually called "optimistic locking". It's optimistic because you don't try to lock people out of the function until someone else uses it.
A typical usage of optimistic locking is for database updates. A version key is kept in the row. When someone goes to commit a change, the version key is compared to the what is now in the row. If the key changed, then someone else changed the field. If someone has the system usually displays the current record, and the updated record, and asks if the user still wants to commit the change. If a change is committed, the system would update the version key in the process. Struts Action implements a similar idea in the token processor. A key is generated and placed in the session and embedded in the form. When the form is submitted, if the keys don't match or the key is missing, then the submit can be rejected. If the keys do match, the key is removed. In this case, you might want to place an attribute representing the process in application scope. The name of the user starting the process could be the key's value. If the process sees that a key is already there, then it would ask "whether to kick the first user out or not". Whenever an application starts using scope to store its own state, it's a good idea to setup your own Map in the scope to store whatever values your application is using. So instead of setting the attribute directly to application scope, but your own Map in application scope first, and then put your attribute in the map. In this way, it's easier to track how you are utilizing application or session scope. HTH, Ted. On 3/27/06, Julian Tillmann <[EMAIL PROTECTED]> wrote: > Hi, > > I'd like to implement the following: > > In a web application a function should only be used by ONE user and if > another user comes along it should show him the first user's name and give > him the choice whether to kick the first user out or not. > Is there perhaps something like that in Java? > > thx & ciao 4 now > Julian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]