1 Reply Latest reply on Apr 22, 2004 11:51 PM by ovidiu.feodorov

    JRMPInvoker in EJB Container, I'd like to know the detail in

    shi_hang_nk

      Hi , everyone,
      I am reading the source code of JBoss 3.2.3. But I am confused for JRMPInvoker.
      As we known, there is a communication object named JRMPInvoker, which is a ServiceMBean, stands in the server side and listens request from clients. And server assembles a dynamic proxy for clients to send invocation. There is an object named JRMPInvokerProxy inside the dynamic proxy responsible for concrete communication.
      It is strange that what the JRMPInvokerProxy invokes in client side is JRMPInvoker itself according to source code. But JRMPInvoker should be an object in the SERVER SIDE! It looks up Registry, which is inside the application server, for a corresponding EJB container and forwards the invocation to the container.
      I can’t believe my eyes and check again. But it is true that the JRMPInvokerProxy invokes a member variable named remoteInvoker which type is Invoker. The remoteInvoker is initialized to JRMPInvoker in the constructor of JRMPInvokerProxy in server side. (JRMPInvoker.java line 387)

      I suppose that what the JRMPInvokerProxy invokes is not the really JRMPInvoker but a stub because JRMPInvoker extends RemoteServer. But I can not find enough evidence to prove it.
      Does anyone have some idea? Any help is appreciated.



        • 1. Re: JRMPInvoker in EJB Container, I'd like to know the detai
          ovidiu.feodorov

          A JRMPInvoker (Service MBean, RemoteServer, etc) is plugged into the JMX spine and sits there listening for remote invocations and putting them on the invocation bus. It's server-side.

          The client-side object that starts the invocation sequence is a dynamic proxy, created by a JRMPInvokerProxy MBean. The dynamic proxy gets on the client because the client process looks it up in JNDI and downloads it.

          Once downloaded, the client process could use it by calling a method on it. The dynamic proxy's invocation handler applies a whole chain of client-side interceptors on the Invocation, and the last interceptor in the chain happens to be an InvokerInterceptor that knows how to call the JRMPInvoker (via JRMPInvokerProxy) over RMI/JRMP.