0 Replies Latest reply on May 21, 2010 6:07 AM by mayaning

    Question about higher level transactions and synchronization

    mayaning

      Hi All,

       

      I have a quetion about implementing higher level transactions and data synchronization based on data management service. As far as I understand the idea of data management service, every managed object is a persistent entity and transaction is used when we want multiple property updates is done as a atomic action. However in many other cases, updates to different persistent objects should be done in one transaction, and I am wondering does LCDS provide this kind of solution or we have to implement it by ourselves?

       

      To state my question more clearly, let's assume we have a User entity and a KeyCode entity. In business logic, we want to give a user certain credits when he/she successfully submit a valid keycode. We inform the user that his/her operation is done if and only if both of the keycode entity and the user entity are successfully updated. Otherwise, the whole transaction is rolled back.

       

      It is obvious that using the transaction within an assembler does not meet the requirement, what I can think of right now is implementing a service out side the data management service to do the work and use the server push api to synchronize the data changes to the managed client. However, I havent try it out, and dont know if I am on the right track or not. If it is one of the options, does it mean I have to implement DAOs by myself? It seems create an instance of an assembler and call its fill() method always gives me a NullPointer exception when the FiberAssembler.updateFillParameters() is called.

       

      Any suggestions will be appreciated!