[ 
https://issues.apache.org/jira/browse/WICKET-1741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612289#action_12612289
 ] 

Eric Glass commented on WICKET-1741:
------------------------------------

Igor, You can cancel this issue, because it really is not an issue. I have 
found that the reason the BEA WebLogic serialization test code was written to 
check for a public default constructor, is because they did not want to travel 
up the super-class hierarchy looking for the first non-serilaizable class that 
does implement a public default constructor. I found this question and answer 
on jGuru (http://www.jguru.com/faq/view.jsp?EID=251942).

Q. Are classes that implement Serializable required to have no-argument 
constructors?

A. No. This is a common misconception. The deserialization process does not use 
the object's constructor - the object is instantiated without a constructor and 
initialized using the serialized instance data. The only requirement on the 
constructor for a class that implements Serializable is that the first 
non-serializable superclass in its inheritence hierarchy must have a 
no-argument constructor. (See http://www.jguru.com/jguru/faq/view.jsp?EID=34802 
for a more complete explanation). This makes sense: deserialization needs to 
reconstruct the entire object state, which includes the state of any 
superclasses. If the superclass is not itself serializable, then 
deserialization needs to instantiate that superclass from scratch - thus the 
requirement.

Thank you again for listening and responding to my non-issue.

> Default constructor needed to satisfy BEA WebLogic serialization test
> ---------------------------------------------------------------------
>
>                 Key: WICKET-1741
>                 URL: https://issues.apache.org/jira/browse/WICKET-1741
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>         Environment: BEA WebLogic 9.2, Red Hat Enterprise Server 5
>            Reporter: Eric Glass
>            Assignee: Igor Vaynberg
>         Attachments: SerTestServlet.jsp
>
>
> The following Wicket classes need to have a default constructor with no 
> parameters to satisfy a BEA WebLogic serialization test. The test is used to 
> make sure that all attributes that are placed into the user's session can be 
> replicated across the BEA WebLogic cluster. This serialization test was 
> provided by a BEA WebLogic engineer and it found that several of the Wicket 
> session attributes did not pass, because of not having a default constructor. 
>  Here are the classes that need to be changed.
> org.apache.wicket.PageMap 
> org.apache.wicket.protocol.http.AbstractHttpSessionStore.SessionBindingListener
>  
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore.SecondLevelCachePageMap
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to