cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessio Soldano <>
Subject Re: Why isn't BusFactory.defaultBus a leakage opportunity?
Date Mon, 22 Nov 2010 17:30:10 GMT
+1 on adding this to the migration notes, this could be a major change 
for those just using jaxws api

On 11/22/2010 05:34 PM, Daniel Kulp wrote:
> 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?

Alessio Soldano
Web Service Lead, JBoss

View raw message