cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-1062) Bug in EndpointImpl#stop()
Date Tue, 25 Sep 2007 16:31:51 GMT

     [ https://issues.apache.org/jira/browse/CXF-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Colm O hEigeartaigh updated CXF-1062:
-------------------------------------

    Attachment: cxf_jaxws.patch

> 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
>            Priority: Minor
>         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.


Mime
View raw message