[JIRA] Commented: (JOWS-37) FileBackedHttpResource does not properly read backup file, during initialization, if remote file is unreachable

Brent Putman (JIRA) noreply at shibboleth.net
Fri Aug 17 21:20:06 EDT 2012


    [ https://issues.shibboleth.net/jira/browse/JOWS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333#comment-14333 ] 

Brent Putman commented on JOWS-37:
----------------------------------

Yeah, I think I agree that a connect failure shouldn't connote "not exists".  Basically exists() can report true, false or indeterminate, where the later is represented by an exception.  That's probably the right thing to do.

I think the file-backed HTTP resource should swallow the superclass exception and eval the backing file. That's what all the other relevant methods do and the fact that this one doesn't seems like an oversight.  That would I believe solve the actual reported issue, when a valid backing file is present.

However, the thing that's actually evaling the Resource#exists() in this case is actually the ResourceChangeWatcher constructor.  That runs as a background thread TimerTask.  It's run() behavior is that it does trap a thrown ResourceException and keep a retry count with a max retrys.  Perhaps the constructor should not fail like that if the resource doesn't initially exist, and should just increment the counter or something, but at least give the resource a chance to be resurrected.  This might be a candidate for a fail-fast flag.    

> FileBackedHttpResource does not properly read backup file, during initialization, if remote file is unreachable
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JOWS-37
>                 URL: https://issues.shibboleth.net/jira/browse/JOWS-37
>             Project: OpenWS - Java
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.4.4
>            Reporter: Chad La Joie
>            Assignee: Chad La Joie
>            Priority: Minor
>
> The FileBackedHttpResource does not read, and return, the backup file if the remote file can not be read during installation.  This may be desired behavior in some cases but may not be in others.  Probably should have a flag to control this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list