2 Replies Latest reply on May 14, 2005 7:24 PM by Lukasz C

    considering about local and remote instance ...

    Lukasz C Newbie

      Hello,

      Maybe example:
      I have got class Person (might be entity):

      public class Person implements java.io.Serialization {
       Strnig name;
       public Person(string name) { this.name=name; }
       get/setName()
      }
      

      And I have got Stateless bean with one method:
      void changeName(Person p, String name) {
       p.setName(name);
      }
      


      Ok and I do something like this:
      MyStatelessBean msb = ctx.lookup(..);
      Person p = new Person("flower");
      System.out.println(p.getName()); // [stdout] flower
      msb.changeName(p,"RedFlower");
      System.out.println(p.getName()); // [stdout] flower
      


      Ok, so ..
      I calling changeName(p,"...") ...
      application serialized p and sent it to application server (AS)
      AS convert serialized data into p' instance
      AS change p' instance
      calling was end and AS _didn't_ send back p` instance.

      Consequently in client side , p wasn't changing.

      Shouldn't they replace local p instance by p' ?

      Greetings
      Flower