3 Replies Latest reply on Jun 7, 2004 3:25 AM by armandoxxx

    why is my bean working in synchronus way

    armandoxxx

      here is the deal ..

      I've developed some bean that does something ..
      when I deploy and start 2 clients on my server ..and press the client button to call my newly created statefull bean .. first it executes for the first client and then for the second ..

      for example ..

      I've put in my bean for(int i = 0; i<100;i++) {System.out.prinln(i);}

      and it prints out first hundred and then second hundred for the second client !?!?

      is there a way to make this asynchronus.. I think there is some setting to do this where ?

      bye

      Armando

        • 1. Re: why is my bean working in synchronus way
          carpy1970

          I assume that what you're trying to prove is that the 2 clients can both access their instances of the beans simuletansously without blocking each other? If this is the case then it occurs to me that what your're doing is not a very good test of this. After all how long is it going to take a your computer to count to 100? Even if you fire off the requests almost simuletaneously, the first request received could be caught and and processed before the second request is received. I would try putting a pause of say a couple of seconds within your loop. This would then be a much more valid test (IMO).

          • 2. Re: why is my bean working in synchronus way
            armandoxxx

            this was a stupid test .. I agree ..

            the only think I wanted to know was if the request would perform in sync way or asycn way ..

            bye

            Armando

            • 3. Re: why is my bean working in synchronus way
              armandoxxx

              and since this bean does a lot of stuff .. like searching the database .. the practise would be really moronic if I had to wait for 10 users to complete the search and than my turn came out !

              bye

              Armando