2 Replies Latest reply on Dec 6, 2002 3:07 AM by Konrad Neitzel

    Execution side : client or server ?

    Luigi Fonti Newbie

      At beginning I believed that ejb's methods always runned on the server machine.

      Now I've verified that if you have a client application running on a different machine than jboss server, and this one recall a method of an ejb, and this method makes access to the local file system, the CLIENT machine file system is accessed, not the SERVER one !!!!!!

      That is very strange for me, because I know that EJB is based on RMI, and with RMI the execution of remote methods is don on the server, not on the client side.
      Luigi Fonti

        • 1. Re: Execution side : client or server ?
          patrick Novice

          This is a very strange thing.

          Are you sure???

          • 2. Re: Execution side : client or server ?
            Konrad Neitzel Newbie

            Just describe what you have done. In the moment I can emagine two things:

            1) You get a RMI-Object. Then everything is done in the server. So normaly you get a Session and in your Session you call a function.

            PlayerSession mysession;

            ->> doSomething is done at the Server!

            2) You call a function, that returns an Object and then you call a Function on that Object.

            PlayerSession mysession;
            --> getObject() is called on the Server. This call returns
            an Object. Then this Object is on your client. On this local Object you are calling a function and this is (of course) called localy!

            Maybe it's clearer if you divide it into parts:

            PlayerSession mysession;
            MyObj obj = mysession.getObject(); // remote call
            obj.doSomething(); // local Call - obj is a local Object

            If you have done something different: Feel free to describe it and maybe I (or somebody else) could explain you, what happens.