title: Java Session Bean on Lan
body: <p>Hi have create a interface as </p>
  
  <pre><code>@Remote
  public interface MathInter{
      public int add(int x, int y);
      public int  showResult();
  }
  </code></pre>
  
  <p>and the class as </p>
  
  <pre><code>@Stateful(mappedName="test")
  public class MathImp implements MathInter{
      public int result;
      public int showResult()
      {
          return result;
      }
      @Override
      public int add(int x, int y) {
          result = x + y;
          return x+y;
      }
  
  }
  </code></pre>
  
  <p>and used it on a client.jsp</p>
  
  <pre><code>&lt;%!
      @EJB(mappedName="abc")
      MathInter m;
  %&gt;
  
  &lt;%
      out.write("previous result was "+m.showResult());
      out.write("result is "+m.add((int)(Math.random()*100), (int)(Math.random()*100)));
  %&gt;
  </code></pre>
  
  <p>The problem is that on Lan, I have 2 computers with IP address as 192.168.1.4 and 192.168.1.2. The server begin 192.168.1.4, when I visit the client.jsp page from the server, a new object of MathImp is created, and then when I access via the other comp, the same object seems to be used</p>
  
  <p>Isn't it required that a new request for a new client has a new object created?</p>