[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1660) Rule agent not detecting deleted files and removing packages
Michael Neale (JIRA)
jira-events at lists.jboss.org
Fri Jun 27 03:45:40 EDT 2008
[ http://jira.jboss.com/jira/browse/JBRULES-1660?page=comments#action_12419155 ]
Michael Neale commented on JBRULES-1660:
----------------------------------------
The only way to solve this is to track what files packages came from - that way any non existing ones can be removed. Also, the code to count needs to be removed and instead compare against this map.
> Rule agent not detecting deleted files and removing packages
> ------------------------------------------------------------
>
> Key: JBRULES-1660
> URL: http://jira.jboss.com/jira/browse/JBRULES-1660
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.7
> Reporter: Michael Neale
> Assigned To: Michael Neale
> Fix For: FUTURE
>
>
> 1) If I delete a file, it does not remove those rules from the rules base. I assume that this is because all we get back from a the FileScanner.getChangeSet() is a Package[], which is the list of packages to load. There is no code to indicate that it will do a File.exist() on the list of file handles in the scanner to see if any packages have disappeared.
> 2) In the case where I remove one .drl and create a new different one, (in addition to point 1, where the old one is not removed) the new one is also not picked up. The problem lies in an assumption in the DirectoryScanner.loadPackageChanges(). The following line
> if ( currentList.length != dir.listFiles().length ) {
> assumes that if the number of files in the directory has not changed, then it really is the same list of files were dealing with. In my case this is not true, and hence it does not give the new list of files to the FileScanner to load.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list