2 Replies Latest reply on Nov 1, 2004 11:15 PM by Brad Rust

    rmi over http (httpinvoker) selectively

    Brad Rust Newbie

      I've successfully configured a jboss 3.2.4 instance to expose my SLSB's over http. This was done following documentation and other people's posts.

      My main question is... is it possible to call my remote interfaces with RMI via JRMPInvoker soley based on jndi.properties (or appropriate ENV) changes?

      It appears that once I have these beans marked to use the invoker-proxy-binding-name bound to httpinvoker mbean, I can't go back to straight RMI. I want client->internet->server to be RMI over HTTP but I want server->server remote invocations to be RMI (1099,4444).

      The way I have things configured is this,...

      1. each session bean has a invoker-proxy-binding-name set to a invoker-proxy-binding configured to use jboss:service=invoker,type=http.
      2. http invoker service is configured close to defaults.
      3. client uses HttpNamingContextFactory and appropriate URL config to make the servlet calls

      Thanks in advance!

        • 1. Re: rmi over http (httpinvoker) selectively
          Scott Stark Master

          You can have a component invocable by multiple transports at the same time. Here is an example from the testsuite that shows a stateless session bean with an RMI/JRMP and RMI/Socket transport active. The client chooses which transport to use by selecting the corresponding jndi-name for the ejb home binding, PooledStatelessSession=RMI/Socket, StatelessSession=RMI/JRMP:

          <?xml version="1.0"?>
          <!DOCTYPE jboss PUBLIC
           "-//JBoss//DTD JBOSS 4.0//EN"

          • 2. Re: rmi over http (httpinvoker) selectively
            Brad Rust Newbie

            Works great! Thanks.

            I ended up creating a custom jboss_xml.xdt and lookup.xdt xdoclet template files. They register all my remotes using the http-invoker and the standard rmi-invoker. Now my clients use their standard util classes to automagically lookup and invoke depending on some setting.