As Dean says, getting the modification time of an in-memory resource is impossible (actually you need to create an external mechanism to keep track of it). So I would suggest to change the thrown Exception to something more meaningful and to explicitly document which resources are capable to be scanned for changes.
@Esteban - I've tried both the ClassPathResource and UrlResource and haven't
actually tried ReaderResource.
I see what you mean with the source code, I did notice that specific error
message appears for ReaderResource, but I don't know how my code is getting
there. I will debug it and find out what is going on when I get a moment.
I notice that getLastModified also isn't implemented for InputStreamResource
(with a different error message).
How would you propose returning a modified date for a ByteArrayResource,
ReaderResource or InputStreamResource as these are in-memory objects and
don't actually have a modified date?
Regards
Dean
--
View this message in context: http://drools.46999.n3.nabble.com/Resource-Change-Scanner-Service-modified-date-error-tp3634802p3637468.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users