1 Reply Latest reply on Mar 16, 2004 6:25 PM by Nichol Draper

    SAOP vs RMI

    cari34 Newbie

      Hi guys,
      I have a very simple question.
      Is there any advantage to use SOAP as a communication layer between
      two Java applications (client and server) compared to RMI?

      Imagine the following situation.
      I have an EJB deployed on JBOSS.
      I have a Java client (standalone application or Web servlet) running on a different JVM that has to communicate with the EJB.

      What would be the benefits (if any) of using SOAP/HTTP protocol instead of the standard RMI protocol when only Java applications are involved ?

      Has RMI any drawbacks compared to SOAP, apart the fact that SOAP allows applications developed in different languages to communicate?

      Can anybody bring some lights about these questions.

      Thank you very much.

      Cari 34

        • 1. Re: SAOP vs RMI
          Nichol Draper Newbie

          When you have two servers that you want running 7x24 that need to communicate. We have an environment where we want our servers always available. Through RMI there is a case where one server “A” will cache the connection to another server “B.” When the server “B” goes down, server “A” must flush it’s cache. We have some code that uses an external JNDI service and reloads the RMI connection, but the SOAP code is much simpler.

          A second example may be when you want to communicate over HTTP. You may have a thick client that you want deployed on road warriors laptops. Often hotspots restrict other types of traffic.

          SOAP has a bit more overhead. We started using it as a means of implementing new code in Java without rewriting all of our C++ and VB code. We have kept it unless we needed optimized communication – sometimes even when both components are now in Java running in the same JVM.