The only thing I googled related to "final" and wicket is this:

7. Java nuances — There are two Java nuances that catch many Wicket
newcomers off-guard. 

1. The first is serialization. Wicket uses Java serialization to store the
state of your component hierarchy (the page and all its components and their
components and so-on) in memory or on disk between page requests. This means
you need to be careful because things can get serialized by accident. The
most common cause of this is declaring a variable "final" outside of an
anonymous inner class and then using it inside that anonymous inner class.
Doing this causes the compiler to add a member variable to the anonymous
inner class. If that final variable is a large collection or a service from
your middle-tier, this can cause a gigantic explosion of memory usage and
can be hard to track down. In short: be very cautious with what you
reference within anonymous inner classes and use member variables in your
classes sparingly.


View this message in context:
Sent from the Users forum mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to