[jboss-remoting-issues] [JBoss JIRA] Closed: (JBREM-980) ServerInvokerServlet should retrieve ServletServerInvoker based on updated InvokerLocator

Ron Sigal (JIRA) jira-events at lists.jboss.org
Tue May 20 22:12:59 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBREM-980?page=all ]

Ron Sigal closed JBREM-980.
---------------------------

    Resolution: Done

At one time, the processing of the bind address 0.0.0.0 was handled in org.jboss.remoting.InvokerLocator, which is probably why ServerInvokerServlet compares the InvokerLocator it gets from web.xml to each server's InvokerLocator.getOriginalURL().

Moved validateLocator() from org.jboss.remoting.ServerInvoker to InvokerLocator.

ServerInvokerServlet now processes the InvokerLocator it gets from web.xml with InvokerLocator.validateLocator() before comparing with each server's InvokerLocator.  Also, it compares to InvokerLocator.getLocatorURI() instead of InvokerLocator.getOriginalURL().  The (minor) advantage is that 

    servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet/?a=y&b=z

now matches

    servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet/?b=z&a=y

Tested with org.jboss.test.remoting.transport.servlet.ServletInvokerTestClient.

> ServerInvokerServlet should retrieve ServletServerInvoker based on updated InvokerLocator
> -----------------------------------------------------------------------------------------
>
>                 Key: JBREM-980
>                 URL: http://jira.jboss.com/jira/browse/JBREM-980
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.4.0.CR2
>            Reporter: Ron Sigal
>         Assigned To: Ron Sigal
>             Fix For: 2.4.0.GA
>
>
> From Galder:
> Consider
>   <servlet>
>     <servlet-name>Ejb3ServerInvokerServlet</servlet-name>
>     <description>The ServerInvokerServlet receives requests via HTTP
>        protocol from within a web container and passes it onto the
>        ServletServerInvoker for processing.
>     </description>
>     <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
>        <init-param>
>          <param-name>locatorUrl</param-name>
>           <param-value>servlet://${jboss.bind.address}:8080/unified-invoker/Ejb3ServerInvokerServlet</param-value>
>          <description>The servlet server invoker</description>
>       </init-param>
>       <load-on-startup>1</load-on-startup>
>     </servlet>
> Now, let's say you bind to 0.0.0.0. You'll get an exception like this:
> 13:39:26,856 ERROR [ContainerBase] Servlet /unified-invoker threw load() exception
> javax.servlet.ServletException: Can not find servlet server invoker with same locator as specified (servlet://0.0.0.0:8080/unified-invoker/Ejb3ServerInvokerServlet)
>     at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.getInvokerFromInvokerUrl(ServerInvokerServlet.java:198)
>     at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.init(ServerInvokerServlet.java:66)
> The problem arises from the fact that Remoting is trying to compare:
>   servlet://0.0.0.0:8080/unified-invoker/Ejb3ServerInvokerServlet
> with
>   servlet://localhost.localdomain:8080/unified-invoker/Ejb3ServerInvokerServlet
> So either, ServerInvokerServlet should call ServerInvoker.validateLocator() with locatorUrl, take the return of that and compare that with the list of locators.
> Or validateLocator() is modified to have the real original host passed to the InvokerLocator constructor, rather than the transformed or newHost.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-remoting-issues mailing list