Hi Daniele,

In general I would not rely on a page not being serialized, as you have no 
control over the timing of serialization :-)

We always generate a UUID for each object we need to track and store it in 
global state (e.g. a static final ConcurrentHashMap<UUID, ClassOfObjectWeTrack> 
on the page or application).

The page then needs to store the UUID so it can locate the actual object in the 
global state map.

What’s important is to handle cleanup properly:
- clean up the map item after usage, or
- clean up map items after a certain timeout, or
- clean up map items (oldest first) after the map reaches a certain size

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 10 maart 2016 bij 10:04:53, Daniele IPPOLITI (daniele.ippol...@amadeus.com) 
schreef:

 

Hello,

I would like to write you because I’m migrating since wicket 1.4.X to wicket 
7.X, but I’m facing a problem that I was not facing before:

 

In the onSubmit of AdvancedSearchForm, the class set the next page creating 
MultiAvailResultPage

 



 

In the initiate of MultiAvailResultPage we have used a Future variable

 

                                                                                
     

 

When we need to show the page to the user we call:

 



But this time future is not any more containing the original value but is 
null!!! This because the variable is declared transient and we passed through a 
serialization that apparently before we were not. Do you have explanations to 
that? Maybe something changed between the old version? Idea on how to solve it? 
(even creating a detachable model it seems not solving the issue because the 
Future variable doesn’t have any id that I can keep to retrieve it after the 
serialization.

 

The two classes are attached to the mail if you need to have a deeper look.

Your help it will be really appreciated.

Kind regards,
___________________________
Daniele Ippoliti
Software Engineer, PMP ®

R&D-NBU-AHP-HDI-BWS-HBK

Amadeus SAS
Phone: +33 (0) 4 97042180
daniele.ippol...@amadeus.com


 


---------------------------------------------------------------------  
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org  
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to