Details
Description
I'm using a PropertiesRealm which automatically reload Users and roles if the resource has been modified.
And i noticed that authenticating an user and reloading properties file in the same time, authenticating do not wait for reloading to be finished.
Should not SimpleAccountRealm be refactored in order to lock authentication while modifying users / roles?
We should simply acquire a Mutex in order to retrieve users / roles or adding / removing users?
An other way to ensure concurrency should be to use Collections.synchronizedMap() for users' map and roles' map, but while reloading resource, authentications won't wait for the reloading to be finished.
I can do required changes if it helps