You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <tu...@ws.apache.org> on 2007/11/20 18:31:43 UTC

[jira] Resolved: (TUSCANY-1913) host-tomcat fails to find servlet if it is added, removed and then added again.

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

Simon Laws resolved TUSCANY-1913.
---------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Java-SCA-Next)
                   Java-SCA-1.1

Remove the servlet wrapper from the port structure when the servlet is removed

> host-tomcat fails to find servlet if it is added, removed and then added again.
> -------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1913
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1913
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.0
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-1.1
>
>
> Extending the Tomcat unit test with the following
>    public void testRegisterUnregisterMapping() throws Exception {
>         TomcatServer service = new TomcatServer(workScheduler);
>         TestServlet servlet = new TestServlet();
>         service.addServletMapping("http://127.0.0.1:" + HTTP_PORT + "/foo", servlet);
>         {
>             Socket client = new Socket("127.0.0.1", HTTP_PORT);
>             OutputStream os = client.getOutputStream();
>             os.write(REQUEST1.getBytes());
>             os.flush();
>             read(client);            
>         }
>         assertTrue(servlet.invoked);
>         service.removeServletMapping("http://127.0.0.1:" + HTTP_PORT + "/foo");
>         {
>             Socket client = new Socket("127.0.0.1", HTTP_PORT);
>             OutputStream os = client.getOutputStream();
>             os.write(REQUEST1.getBytes());
>             os.flush();
>             read(client);            
>         }
>         servlet = new TestServlet();
>         service.addServletMapping("http://127.0.0.1:" + HTTP_PORT + "/foo", servlet);
>         {
>             Socket client = new Socket("127.0.0.1", HTTP_PORT);
>             OutputStream os = client.getOutputStream();
>             os.write(REQUEST1.getBytes());
>             os.flush();
>             read(client);            
>         }
>         assertTrue(servlet.invoked);
>         service.stop();
>     }       
> Leads to 
> INFO: Added Servlet mapping: http://L3AW203:8085/foo
> 19-Nov-2007 14:37:20 org.apache.tuscany.sca.http.tomcat.TomcatServer removeServletMapping
> INFO: Remove Servlet mapping: /foo
> 19-Nov-2007 14:37:31 org.apache.catalina.core.StandardWrapperValve invoke
> INFO: Servlet /foo is currently unavailable
> 19-Nov-2007 14:37:40 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
> INFO: Added Servlet mapping: http://L3AW203:8085/foo
> 19-Nov-2007 14:37:49 org.apache.catalina.core.StandardWrapperValve invoke
> INFO: Servlet /foo is currently unavailable

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org