3 Replies Latest reply on May 5, 2006 9:33 AM by Marc Reis

    Using the http RMI invoker

    Börje Jonsson Newbie

      I have configured my client to use the http invoker when communicating with Jboss (4.0.3). But apart from the initial handshake, communication seems to take place on other ports than the configured port 80, and not with http as the protocol.

      Now, we like to use Jboss in a massive failover/loadbalancing senario, and for that to work we have to to use http as communication transport. Is that at all possible?

      regards
      Börje Jonsson

        • 1. Re: Using the http RMI invoker
          Marc Reis Novice

          Have you made any advance in this ?
          I also would like to just use http and port 80.

          • 2. Re: Using the http RMI invoker
            Börje Jonsson Newbie

            Yes, i solved it.

            A couple of changes are required for Jboss to enable the http invoker.
            Fist edit the file /server/legolas/conf/standardjboss.xml and change the text:

            <invoker-proxy-binding>
             <name>stateless-rmi-invoker</name>
             <invoker-mbean>jboss:service=invoker,type=jrmp</invoker-mbean>
            


            to:

            <invoker-proxy-binding>
             <name>stateless-http-invoker</name>
             <invoker-mbean>jboss:service=invoker,type=http</invoker-mbean>
            


            This change enabled the http invoker for all stateless session beans.

            Then edit the file /server/legolas/deploy/http-invoker.sar/META-INF/jboss-service.xml and add or change the text in the http invoker (in bold):

             <mbean code="org.jboss.invocation.http.server.HttpInvoker"
             name="jboss:service=invoker,type=http">
             <attribute name="InvokerURLPrefix">http://</attribute>
             <attribute name="InvokerURLSuffix">:8080/invoker/EJBInvokerServlet</attribute>
             <attribute name="InvokerURL">http://<server>:80/invoker/EJBInvokerServlet</attribute>
             <attribute name="UseHostName">false</attribute>
            
             </mbean>
            


            and for the HttpProxyFactory:
             <mbean code="org.jboss.invocation.http.server.HttpProxyFactory"
             name="jboss:service=invoker,type=http,target=Naming">
             ?
             <attribute name="InvokerURL">http://<server>:80/invoker/JMXInvokerServlet</attribute>
             <attribute name="UseHostName">false</attribute>
            
             ?
            


            Change the servername and portnumber to the actual servername of the server Jboss is running or to the name of the loadbalancer server.


            • 3. Re: Using the http RMI invoker
              Marc Reis Novice

              Thanks for the reply !
              In this context, I havent looked into those configs very much until now.
              We also try to get our App/JBoss to just use one port. Have you done any approach into configuring jboss to do this ?
              We started with the \ejb3.deployer\META-INF\jbosss-service.xml and configured

              <mbean code="org.jboss.remoting.transport.Connector"
               xmbean-dd="org/jboss/remoting/transport/Connector.xml"
               name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
               <depends>jboss.aop:service=AspectDeployer</depends>
              <!-- Tomcat doesnt like it when doing http://....:8080-->
               <attribute name="InvokerLocator">servlet://${jboss.bind.address}:8080/invoker/EJBInvokerServlet</attribute>
               <!--attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute-->
               <attribute name="Configuration">
               <handlers>
               <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
               </handlers>
               </attribute>
               </mbean>
              

              The problem we had is that after fetching the JNDI, method invocations try going to 3873 again instead of using 8080.
              With the annotation
              "@RemoteBinding(... cientBindUrl="http://<server>:8080/invoker/EJBInvokerServlet")
              at least that changed (not a good solution though), but from here on there are still poblems. ( I posted about this in http://www.jboss.com/index.html?module=bb&op=viewtopic&t=82345 )
              Thanks again for your reply and help!