Rule Builder > Working with Repositories and Locking > Locking and Concurrent Repository Access |
Locking and Concurrent Repository Access |
PREVIOUS NEXT |
In JRules all users of a repository are taken into account (whether they open a repository with locking enabled or not). This enables warnings to be displayed if the situation becomes problematic. Note, however, that if the Rule Builder is not closed properly, that is, either the user's machine crashes or the user "kills" the Rule Builder process, the count may not be reset, and this could result in inaccurate warning messages. In this situation, ensure that nobody is working on the repository, and reset the locking count in the Rule Builder.
Note |
All Locks is not enabled by default. To enable it use -P Facility.releaseAllLocksAuthorized in the Builder command line. When you select Release All Locks, a dialog box appears asking you if you are sure that you want to remove the locks because the repository will be closed. Reopen the repository to display it with the locks removed. The Release All Locks command should only be issued when only one user has the repository open. |
In situations where data could be corrupted, one of the following error messages may be displayed to highlight the possible conflicts. The following cases illustrate the possibilities:
User A opens the repository without locking enabled.
User B opens the same repository without locking enabled.
The following message is logged with the level "SEVERE":
"You are opening the repository without locking enabled and someone else has already opened it without locking enabled. You should not attempt to modify the repository."
When the repository is opened using the Rule Builder, the message is also popped-up as an error message.
User A opens the repository without locking enabled.
User B opens the same repository with locking enabled.
The following message is logged with the level "SEVERE":
"You are opening the repository with locking enabled and someone else has already opened it without locking enabled. You are not protected against the modifications the other user may save."
When the repository is opened using the Rule Builder, the message is also popped-up as an error message.
User A opens the repository with locking enabled.
User B opens the same repository without locking enabled.
The following message is logged with the level "INFO":
"You are opening the repository without locking enabled and someone else has already opened it with locking enabled. You are automatically switched to locking enabled mode."
User B is automatically switched to locking mode enabled.
No message is popped-up in the Builder since this is not considered as an error.
The display or not of these messages is determined by the property: repository.facility.enableSharingConflictWarnings
, (see the Rule Builder Customization User's Manual for more information).
Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |