You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/08/02 15:51:35 UTC
svn commit: r1153128 -
/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxy.java
Author: dkulp
Date: Tue Aug 2 13:51:34 2011
New Revision: 1153128
URL: http://svn.apache.org/viewvc?rev=1153128&view=rev
Log:
[CXF-3697] Make sure gc'd clients have the lifecycle methods called.
Modified:
cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxy.java
Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxy.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxy.java?rev=1153128&r1=1153127&r2=1153128&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxy.java (original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxy.java Tue Aug 2 13:51:34 2011
@@ -89,6 +89,12 @@ public class ClientProxy implements Invo
return client;
}
+ @Override
+ protected void finalize() throws Throwable {
+ client.destroy();
+ super.finalize();
+ }
+
public static Client getClient(Object o) {
return ((ClientProxy)Proxy.getInvocationHandler(o)).getClient();
}