Testing of failure scenarios shows that:
1. When the callback EL has an invalid bean reference, no exception is thrown at all, and the callback evaluates to null, so the FileEntryPhaseListener treats it as a file-system upload.
2. When the callback EL has an invalid getter method reference, an exception is thrown: javax.el.PropertyNotFoundException: Property 'callbackish' not found on type org.icefaces.fileentry.FileBean. This results in the the FileEntryPhaseListener stopping, the file not being processed, no RequestParameterMap being created, in the ajax postback returns an empty update of just the ViewState.
3. When the file is prefailed and the callback throws a RuntimeException in it's begin
method, the FileEntryPhaseListener has a generic catch(Ecxeption) clause that marks the file as INVALID, then the lifecycles continues, the fileEntryListener is called, the FacesMessage is rendered, and the page is updated.
It's the same for a RuntimeException in the callback's begin
(non-prefail) and write
methods.
4. When the callback's end
method throws a RuntimeException, this results in the the FileEntryPhaseListener stopping, the file not being processed, nothing getting logged, and the error html page being returned to the browser, which does not display it since it's not an xml updates response.
This functionality is analogous to ice:inputFile's outputStream property (
ICE-2198), but has been enhanced to use an interface with explicit notification of beginning and ending of the writing, which helped certain scenarios that go beyond just the typical database BLOB scenario.