[JAVASERVERFACES_SPEC_PUBLIC-912] FacesMessage.Severity should be Serializable Created: 15/Nov/10  Updated: 12/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Lifecycle
Affects Version/s: 1.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Ed Burns Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 912
Status Whiteboard:

size_small importance_medium


 Description   

A DESCRIPTION OF THE REQUEST :
FacesMessage.Severity is a typesafe enumeration with the meaning to describe the
severity of an error message displayed using JSF. As a typesafe enumeration, it
is basically a simple class reference without any transient meaning. This class
is unfortunately not serializable.

JUSTIFICATION :
In order to create error pages which contain jsf style error descriptions (a
summary, a detail, and a severity), it can be clever to add a FacesMessage as a
managed bean with e.g. session scope. As such, it will fail a web session to be
serialized e.g. in failover or server redeployment situations.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Make it serializable. Implement FacesMessage.Severity.readResolve as described
in Joshua Bloch, Effective Java Programming Language Guide, 2001, Addison
Wesley, Item 21.

CUSTOMER SUBMITTED WORKAROUND :
Store two strings regarding the error description. Hardcode or otherwise encode
the severity.

(Due to the construction of FacesMessage, you cannot instantiate it with a null
Severity field without encountering a NPE)

      • (#1 of 1): 2005-09-20 22:30:34 EDT girish.manwani@sun.com


 Comments   
Comment by ramiromagalhaes [ 14/Apr/11 ]

This is a duplication of JAVASERVERFACES_SPEC_PUBLIC-921.

Comment by Ed Burns [ 06/Jun/11 ]

Bulk assign all of Sheetal's spec issues to me.

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Generated at Tue Apr 28 11:19:26 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.