hi daniel, "May I suppose that the proxy object that @SpringBean will create for "myService" will handle serialization properly? (this is, forgetting about the reference to the Spring object when serializing, and retrieving it again when de-serializing...)"
that's how it works AFAIK, so marking it as transient would only work on a clustered environment if you manually re-inject the beans on de-serialization, as wicket injects the beans on component instantiation (and not on deserialization, correct me if I'm wrong) regards, Michael dfernandez wrote: > > Hello everyone, > > I have a question regarding the relation between the @SpringBean > annotation and the serialization of objects being referenced in a Page. If > I have: > > @SpringBean(name="myBean") > protected MyService myService; > > May I suppose that the proxy object that @SpringBean will create for > "myService" will handle serialization properly? (this is, forgetting about > the reference to the Spring object when serializing, and retrieving it > again when de-serializing...) > > If this is so, I also suppose that it would be *incorrect* to mark this > property as "transient", right? like, > > @SpringBean(name="myBean") > protected transient MyService myService; > > ...and if this is incorrect as I suppose, we are on a little "formal > issue" here, as we are using a neither-serializable-nor-transient object > (the service) inside a serializable object (the page), which is formally > incorrect, but which we know will work because we are relying on the proxy > implementation (and thus binding to it)... > > Could anyone please confirm that this works this way? > > Many thanks, > Daniel. > > > ----- Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p15330965.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]