I have a method doSomething(int param) in a JSF View Scoped Bean, that has to be used only by one thread and when this method is called from another thread (another user), it has to show a user message while it is still in use by the first thread (first user).
I know that I have to use "synchronized" but how to achieve this? and how to show the message to the user calling it while it is in use?
Thanks in advance for the help.