If the interface extends Serializable and you implement it, you implement Serializable. That's not a good idea for service/dao classes.
On Thu, Feb 5, 2009 at 7:12 PM, Adriano dos Santos Fernandes <adrian...@gmail.com> wrote: > Andreas Petersson wrote: >> >> hi timo, thanks for the links. >> >> well, i've modeled my application after reading the mentioned example. >> >> from Wicket, Guice and Ibatis example: >> >> public class MyPage extends WebPage { >> @Inject >> protected MyDao myDao; >> >> >> ------- >> i wonder: myDao is most likely not serializable. >> WebPage is. WebPage should get serialized. so why the heck does this not >> throw an error? what kind of magic is going on here? > > My understand (of a guice newbie) is that your DAO class is not required > (and will not be, using guice) serializable. But you should have a > serializable interface. Wicket-ioc/guice will create a serializable proxy > with a transient instance of the implementation. When it's null, a instance > will be reinjected reinjected. > > > Adriano > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org