[
https://issues.apache.org/jira/browse/CXF-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15022576#comment-15022576
]
Daniel Kulp commented on CXF-6689:
----------------------------------
I believe if you call:
{code:java}
((Closeable)proxy).close();
{code}
when you are done with the proxy or wait long enough for the garbage
collector/finalizer to collect the proxy, the close() method is called. The
close(Message) method is used to close anything specific for that
message/exchange. For example, cleaning up any input streams, maybe commit a
transaction for JMS, etc.... It can leave connections open for future
requests. The close() is for the entire proxy for doing things like shutting
down connections.
> .close() is never called on
> org.apache.cxf.transport.http.URLConnectionHTTPConduit
> ----------------------------------------------------------------------------------
>
> Key: CXF-6689
> URL: https://issues.apache.org/jira/browse/CXF-6689
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.7.16
> Reporter: Marco Rietveld
>
> If you look at
> https://github.com/apache/cxf/blob/cxf-3.1.4/core/src/main/java/org/apache/cxf/endpoint/AbstractConduitSelector.java#L209
> you'll see that only the {{.close(Message)}} method is called on the
> {{Conduit}} instance.
> Unfortunately, the only {{.close()}} method that the
> {{org.apache.cxf.transport.http.URLConnectionHTTPConduit}} has, does not take
> an argument, which (AFAICT?), means that close is never called on the
> {{URLConnectionHTTPConduit}} instance.
> https://github.com/apache/cxf/blob/cxf-3.1.4/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java#L87
>
> This has consequences, among others, that if you do the following, it will
> succeed:
> 1. Create a JAX-WS client proxy with correct login info.
> 2. Create a JAX-WS client proxy with incorrect login info.
> In some situations, the following (subsequent to the above steps) step will
> also succeed:
> 3. Do a webservice call with the JAX-WS client proxy created with incorrect
> login info.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)