Results 1 to 2 of 2

Thread: Object update with remoting

  1. #1

    Default Object update with remoting

    I'm using the HttpInvokerServiceExporter to export some of my service facades. The issue that I have come across is when I send an object over from the client to the server, the server performs some business logic which might update the passed in object, but the service does not return the passed in object. How is the client suppose to see the modifications?

    -- Client side:
    Code:
    SomeObject obj = new SomeObject();
    removeServiceHandle.updateObject(obj);
    -- Server Side:
    Code:
    updateObject(SomeObject obj) {
      obj.setVersion(obj.getVersion() + 1);
    
      return 1;
    }

    Now the server has updated the passed in object but the client will never see the changes. So what is the work-around for this issue?

    Does the object that gets updated always need to be returned or is there another way for the client to see the changes made?

    Thanks for the help..

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Either retrieve the object after completion of the business logic or return the updated object from your method. Else the client won´t see the updated object.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •