You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dan Diephouse (JIRA)" <ji...@apache.org> on 2007/09/25 23:35:51 UTC
[jira] Closed: (CXF-1062) Bug in EndpointImpl#stop()
[ https://issues.apache.org/jira/browse/CXF-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Diephouse closed CXF-1062.
------------------------------
Resolution: Fixed
Fix Version/s: 2.1
2.0.3
Applied
> Bug in EndpointImpl#stop()
> --------------------------
>
> Key: CXF-1062
> URL: https://issues.apache.org/jira/browse/CXF-1062
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Reporter: Colm O hEigeartaigh
> Assignee: Daniel Kulp
> Priority: Minor
> Fix For: 2.0.3, 2.1
>
> Attachments: cxf_jaxws.patch
>
>
> I've run into a problem with the following bit of code:
> Endpoint endpoint = Endpoint.create(...);
> endpoint.publish(...);
> endpoint.stop();
> System.out.println(endpoint.isPublished());
> The println returns "true" even though the endpoint has been stopped. This is because in EndpointImpl we have:
> public void stop() {
> if (null != server) {
> server.stop();
> }
> }
> public boolean isPublished() {
> return server != null;
> }
> So as "server" isn't null, just "stopped", isPublished() returns true. This is contrary to the functionality of the method:
> "Returns true if the endpoint is in the published state.".
> http://java.sun.com/javaee/5/docs/api/javax/xml/ws/Endpoint.html#isPublished()
> In the attached patch, I've fixed this problem by setting the Server implementation to null when EndpoingImp#stop() is called. This makes sense as stop()ed Endpoints can't be re-published (according to the JAX-WS spec). A unit test is also included in the patch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.