You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Josh Chappelle <jc...@4redi.com> on 2009/06/04 03:15:45 UTC

@SpringBean serialization issue

I have recently started using the @SpringBean annotation to retrieve DAO
objects in my Panel classes. I have noticed that if the DAO is not
serializable then I get a PageExpiredException when I leave that page and
hit the back button. According to the wiki on the @SpringBean annotation the
objects are serialized using a proxy. Here is the quote:

 

"Using annotation-based approach, you should not worry about
serialization/deserialization of the injected dependencies as this is
handled automatically, the dependencies are represented by serializable
proxies."

 

My question is why does my dao have to be serializable if the spring bean
uses proxies? Is there something I am doing wrong? It seems to me if it has
to serialize them then it would be better to have a lookup in the
Application object that retrieves the DAOs from the spring
ApplicationContext. 

 

Thanks,

 

Josh

 


Re: @SpringBean serialization issue

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Post the code where you are declaring your DAO fields, etc.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 3, 2009 at 8:15 PM, Josh Chappelle <jc...@4redi.com> wrote:
> I have recently started using the @SpringBean annotation to retrieve DAO
> objects in my Panel classes. I have noticed that if the DAO is not
> serializable then I get a PageExpiredException when I leave that page and
> hit the back button. According to the wiki on the @SpringBean annotation the
> objects are serialized using a proxy. Here is the quote:
>
>
>
> "Using annotation-based approach, you should not worry about
> serialization/deserialization of the injected dependencies as this is
> handled automatically, the dependencies are represented by serializable
> proxies."
>
>
>
> My question is why does my dao have to be serializable if the spring bean
> uses proxies? Is there something I am doing wrong? It seems to me if it has
> to serialize them then it would be better to have a lookup in the
> Application object that retrieves the DAOs from the spring
> ApplicationContext.
>
>
>
> Thanks,
>
>
>
> Josh
>
>
>
>

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