|
From: Bob L. <cra...@cr...> - 2006-06-24 17:27:39
|
Injecting statics is simpler and more straightforward. Does Spring support this? Bob On 6/24/06, Eugene Kuleshov <eu...@pl...> wrote: > Bob, > > You probably won't want to use something like that. But with > Terracotta for Sessions product you can put non-serializable objects > into session. Version for Tomcat is free for up to 4 nodes. See > http://www.terracottatech.com/ > > Otherwise, using AOP to inject dependencies on deserialization. This > will be quite similar to @Configurable added in Spring 2.0. Would > require an AspectJ though... > > regards, > Eugene > > > Bob Lee wrote: > > 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 > |