We use Findbugs on our build process, with this @SpringBean(name = "mySpringBean") private MyPOJO config;
Findbugs Warning : Class com.......MyPage defines non-transient non-serializable instance field config Bug type SE_BAD_FIELD (click for details) In class com.......MyPage Field com.......MyPage.config In MyPage.java SE_BAD_FIELD: Non-transient non-serializable instance field in serializable class This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field. So we set the field transient @SpringBean(name = "mySpringBean") transient MyPOJO config; So that Findbugs didn't complain... that the reason why we decided to develop this Helper to set SpringBean in the readObject() method. Perhaps we won't do all that is the documentation tell explicitly that we didn't have to take care of the deserialization of SpringBean (as SpringComponentInjector inject Serializable proxies) Regards, Gerald Reinhart -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p18714397.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]
