4 Replies Latest reply on Jun 12, 2012 4:27 AM by gandon

    Does JBoss 7 support RMI programming

    gandon

      Hi,

       

      Greetings.

       

      I want to deploy an application on JBoss 7 container, and call its method from client side. For example, I have several tests that needs to run on server side VM, and I want to invoke the tests and get results from client side VM.  On JBoss 5, I can achieve this by deploying an agent on server and looking up JNDI name through jnp://host:1090.  I know jnp protocol is not supported in JBoss 7 any more. Is it possible to do the same thing as above on JBoss 7?

       

      I've read the documentation and lots articles, and I know JBoss 7.1 suports looking up remote custom object through remote://localhost:4447 bound to java:jboss/exported JNDI tree view. But I still did not find a way to call remote method on JBoss 7.

       

      Can someone tell me how to implement this, or is this possible on JBoss 7?

       

      Thanks,

      Gan

        • 1. Re: Does JBoss 7 support RMI programming
          jaysensharma

          HI Gan,

           

                     There are various options available to achieve your goal of invoking the tests on Server VM and getting the results in Client VM.  EJBs are RMI Based technology.  EJBs are one of those where an EJB Client can trigger an operation on server side Remotely and the Client VM can get the result back as well , Like http://middlewaremagic.com/jboss/?p=1466

           

                      There is another better approch like using the SAR (service Archives) in JBoss AS7 http://middlewaremagic.com/jboss/?p=1081   NOTE:  once you create a Service archive then using any JMX utility like JConsole or VisualVm etc... you can access the data from your SAR MBean, by invoking it's various operations remotely.

          1 of 1 people found this helpful
          • 2. Re: Does JBoss 7 support RMI programming
            gandon

            Hi Jay,

             

            Thanks for the quick reply. For some reason we would like to use approaches other than EJB. I'll try the SAR option.

             

            Regards,

            Gan

            • 3. Re: Does JBoss 7 support RMI programming
              wdfink

              Jay Kumar SenSharma wrote:

               

              There are various options available to achieve your goal of invoking the tests on Server VM and getting the results in Client VM.  EJBs are RMI Based technology.  EJBs are one of those where an EJB Client can trigger an operation on server side Remotely and the Client VM can get the result back as well , Like http://middlewaremagic.com/jboss/?p=1466

               

              The linked article is not completely correct, it will mix two different approches. See the description in the JBoss manual for that.

              • 4. Re: Does JBoss 7 support RMI programming
                gandon

                Thanks to all, I think I managed to get it worked, though not using remote:// protocol.

                I deployed the application as a sar file, then use the generic RMI approach, which start a registry on 1099 port and do a normal bind and lookup via rmi protocol.