1 Reply Latest reply on Sep 9, 2009 12:23 PM by Ron Sigal

    invoker locator config vs. request metadata params

    mazz Master

      In reading 5.4.11. HTTP(S) Client Invoker - proxy and basic authentication of the docs here:

      http://www.jboss.org/file-access/default/members/jbossremoting/freezone/docs/guide/2.2/JBoss_Remoting_Guide.pdf

      it gives an example of how you can setup http proxy by using the metadata map passed to the invoke method.

      2 questions:

      1) I have had a report that using the System properties method of setting those http proxy props did not work (on 2.2.1.GA - though I'm more interested if it works/is broken on 2.2.2.SP8) - I cannot confirm this because I did not try it, but user dfilgueiras80 says it did not work , from forum post http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254159#4253994 Can someone confirm that they've actually seen that work (setting the system properties and have them take effect)?

      2) I thought the invoker locator params (those in the URL query string, e.g. http://host:port/?these&parameters&here) were used by the client to configure each request sent by the client. I realize that some of the invoker locator params are meaningless to the client (they are only used on the server side) but I thought things like http.proxyPort and the like (if specified in the invoker locator used by the client) would be used for each request. Is that not true? Is there some way we can specify http proxy settings in the invoker locator URL and have the client use them as part of the request metadata (which is used by the invoke method)?

        • 1. Re: invoker locator config vs. request metadata params
          Ron Sigal Master

          Hi John,

          I haven't played with the proxy stuff, but Remoting has nothing to do with the system properties - if they're set, they should be picked up when the HttpURLConnection is created. In other words, as far as I can tell, there's nothing in Remoting to break with respect to proxy specification by system properties. There's a discussion here: http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html. It's for jdk 6, but the system properties go back to jdk 1.4

          As far as setting the "http.proxyHost" and "http.proxyPort" parameters in the InvokerLocator, well, there isn't a way to do it as of now. I can think of two reasons:

          (1) it's really a client specific issue, not relevant to the server, and

          (2) a new HttpURLConnection is created with each invocation, so it's natural to grab the parameters from the metadata map passed to the invocation.

          Nonetheless, in a context like the Application Server, where most configuration gets downloaded from the server, I can see why you might want to be able to configure these properties in the InvokerLocator. If you want to create a JIRA issue, I'll make it possible.

          By the way, Remoting 2 is more or less in maintenance mode now, so I won't be doing much new development. But for you ... :)

          -Ron