On 2010-08-06 22:58, Chris Merrill wrote:
On 8/6/2010 4:35 PM, Leszek Gawron wrote:
you can actually do it in any class you like :)

So I was about to ask how this works on deserialization, since the constructor 
will not
be called.  Then I re-read your previous and I think I now understand this

"Injector injects a serializable proxy instead of the bean directly."

So I guess this serializable proxy knows how to re-create the DAO when the bean 
is
deserialized (possibly on another server?).  Very nice!  I'm (slowly) starting 
to
understand the role that Spring plays.

in fact the dao is not "re-created" as "re-looked up" every time deserialization takes place. And yes - it does "survive" clustering (I never tried it though).

If you want more insight check the source code of wicket-spring module, especially:

org.apache.wicket.spring.injection.annot.AnnotSpringInjector

org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory [1]


javadoc:

        lg

[1] http://wicketbyexample.com/api/wicket-spring/latest/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.html

--
Leszek Gawron                         http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

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

Reply via email to