|
From: Colin Y. <col...@gm...> - 2006-06-24 14:14:59
|
Just thinking aloud here, but another more less intrusive, but more complicated way would to to intercept the serialise/deserialise methods using AOP and have the dehydration/rehydration done via an aspect. On 6/24/06, Dmitry Sklyut <ds...@ch...> wrote: > > What if you wrap a non-serializable singleton in a proxy that has a > reference to the application context (BeanFactoryAware) and knows how to > pull that object out of the context when it is null? > > Dmitry > > > I'm injecting an object which will be stored in the HTTP session which > > means it needs to be serializable. I want to inject a non-serializable > > singleton into the session object. > > > > Option A: Keep a transient reference to the singleton. What to I do > > when the object deserializes? Do I re-inject it from the readObject() > > method? How? How do I re-inject only transient references? > > > > Option B: Inject a static reference. Does Spring support this? > > > > What is the "Spring Way" here? > > > > Bob > > > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |