>Using a custom page factory to load Spring dependencies is discussed in
>the Wiki

I've already implemented that and it works great.

>and the issue about serialization/deserialization is what made some
>people take alternatives, like Service Locators.

I wanted to avoid Service Locators - this is exactly why I think that 
serialization/deserialization is the wrong place to do re-injection.

>I went a little further and based on Eelco's idea (some old discussion
>about Spring), I've implemented an aspect that injects the dependencies
>before a constructor is called, and after an object gets deserialized,
>using annotation to know what is the dependency.

We're limited to Java 1.4, so aspects and annotations won't help us.

>Any other way to do Spring integration concerning
>serialization/deserialization and not using static Service Locators?

Yes, give me a hook in Wicket (pageAquired() or something) and I'll inject the 
dependencies the same way my custom IPageFactory is doing it (based on a Spring 
wicket context) *before* any application code (basically component listeners) 
is called on the pages.

Sven


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to