Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent exception handling for phaselisteners #1216

Closed
eclipse-faces-bot opened this issue Aug 14, 2013 · 7 comments
Closed

Inconsistent exception handling for phaselisteners #1216

eclipse-faces-bot opened this issue Aug 14, 2013 · 7 comments

Comments

@eclipse-faces-bot
Copy link

Exception handling for phase listeners behaves differently depending on if they are registered globally in faces-config.xml or with f:phaseListener for a particular view root.

In the first (global) case any exception thrown by them gets forwarded to an exception handler as described in the spec.

In the second (per view root) case all exceptions get logged and swallowed as described in the UIViewRoot documentation.

This inconsistent behavior adds increased complexity when implementing PhaseListeners. Ideally both cases should forward any exception to the exception handler so they can be handled there.

See also the discussion of the problem in: https://java.net/jira/browse/JAVASERVERFACES-2985

Affected Versions

[2.1, 2.2]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by frederickkaempfer

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
is related to
JAVASERVERFACES-4054

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
pnicoluc said:
Proposed solution:

http://docs.oracle.com/javaee/7/api/javax/faces/component/UIViewRoot.html#encodeBegin-javax.faces.context.FacesContext-

Update UIViewRoot.encodeBegin(FacesContext context) javadoc by removing the
following text:

"Any errors that occur during invocation of any of the the beforePhase
listeners must be logged and swallowed."

Update UIViewRoot.encodeEnd(FacesContext context) javadoc by removing the
following text:

"Any errors that occur during invocation of the afterPhase
listener must be logged and swallowed. "

Then an update to the implementation would need to be made to publish the
exceptions being thrown by the beforePhase and afterPhase of the
PhaseListeners rather than having them logged and swallowed.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Tuesday, September 8th 2015, 10:38:18 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1216

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant