[rules-dev] Issue with ResourceChangeScanner

Steve Ronderos steve.ronderos at ni.com
Wed Oct 7 14:53:36 EDT 2009


Hello Dev List,

I encountered an issue today with my KnowledgeAgent removing resources 
from its RuleBase shortly after creating it.  I have the 
ResourceChangeScanner running in my application.

I tracked the issue back to the scan() method in 
ResourceChangeScannerImpl.  It appears that the method is trying to 
identify resources that are no longer available and remove them from both 
the RuleBase and future scans.  To do this it is checking lastModified on 
the resource and on a result of 0 removing the resource.  The resources 
that I configured in my change-set definitely still exist, but due to URL 
handler implementation provided by my classloader, getLastModified always 
returns 0.  (The resource I'm retrieving is coming from a jar that is in 
my application's classpath and the URL handler implementation is 
oracle.classloader.SharedCodeSourceURL)

Do you think it would be possible for the scan to identify unavailable 
resources some other way than with the lastModified? and then if 
lastModified is 0 maybe always or never update the resource? I'm not sure 
what the best approach to that would be, but removing resources when their 
lastModified is 0 seems incorrect to me.

Thanks,

Steve Ronderos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20091007/e1807cc7/attachment.html 


More information about the rules-dev mailing list