On Saturday 20 November 2010 4:18:29 pm Benson Margulies wrote: > It's not weak. Nothing ever sets it to null. I propose to declare it > as a WeakReference.
There are SOME usage patterns that this change would make much slower. I'm thinking of the case where you use the pure JAX-WS API's and just create clients as needed, make a call, discard the client. In that case, the Bus would then be dereferenced and GC'd. That would cause everything that it caches (like the WSDL's) to also be GC'd. Thus, the next client to be created needs to re-create it all. Obviously the workaround is to have them hold the bus strongly someplace (or re-use the proxies), but it is a behavior change. I think I'd suggest two things: 1) This should only be done on trunk (and migration note it for 2.4) 2) Change to a SoftReference, not a WeakReference. Should mitigate the issue a bit. Thoughts? -- Daniel Kulp [email protected] http://dankulp.com/blog
