Axis2
  1. Axis2
  2. AXIS2-42

Message Context Serialization Support

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: kernel
    • Labels:
      None

      Description

      Support to store and restore the Message context .. this involve the Axis storage and context serialization

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          42d 2h 31m 1 Deepal Jayasinghe 04/Aug/05 17:35
          In Progress In Progress Open Open
          42d 17h 29m 1 Deepal Jayasinghe 16/Sep/05 11:04
          Open Open Resolved Resolved
          31m 19s 1 Chamikara Jayalath 16/Sep/05 11:36
          Chamikara Jayalath made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Chamikara Jayalath added a comment -

          I have developed the functionality to serialize the complete context hierarchy. We have clearly identified the non-serializable instance variables in Context classes and named them as transient (these include descriptions). When somebody serialize the current configurationContext, the whole context hierarchy will be serialized including message contexts (so the issue of MessageContext serialization becomes a subset of this solution ). The names of descriptions will be saved in special variables, these names will also get serialized.

          In deserializing the caller simply have to deserialize an ConfigurationContext object from the file. This will have the complete context hierarchy. New instances of some transient variables will be set in the readObject function (e.g. ThreadPools ). But the description hierarchy cannot be attached at this moment since the axisConfiguraion is unavalable. To set the descriptors the init (axisConfiguration) method of the deserialized configurationContext have to be called passing the current AxisConfiguration object as the parameter this will recursively set the descriptors of all the context classes upto MessageContext.

          I also added a test case to test the serialization and deserialization functionality. This is available as core\test\org\apache\axis2\context\ContextSerializationTest.java.

          So I belive this issue can be closed now

          Chamikara

          Show
          Chamikara Jayalath added a comment - I have developed the functionality to serialize the complete context hierarchy. We have clearly identified the non-serializable instance variables in Context classes and named them as transient (these include descriptions). When somebody serialize the current configurationContext, the whole context hierarchy will be serialized including message contexts (so the issue of MessageContext serialization becomes a subset of this solution ). The names of descriptions will be saved in special variables, these names will also get serialized. In deserializing the caller simply have to deserialize an ConfigurationContext object from the file. This will have the complete context hierarchy. New instances of some transient variables will be set in the readObject function (e.g. ThreadPools ). But the description hierarchy cannot be attached at this moment since the axisConfiguraion is unavalable. To set the descriptors the init (axisConfiguration) method of the deserialized configurationContext have to be called passing the current AxisConfiguration object as the parameter this will recursively set the descriptors of all the context classes upto MessageContext. I also added a test case to test the serialization and deserialization functionality. This is available as core\test\org\apache\axis2\context\ContextSerializationTest.java. So I belive this issue can be closed now Chamikara
          Eran Chinthaka made changes -
          Assignee Deepal Jayasinghe [ deepal ] Chamikara Jayalath [ chamikara ]
          Hide
          Eran Chinthaka added a comment -

          Chamikara I know you have done the work. Please update the JIRA explaining the stuff and the extent you have done this. Hope you will be having some good test cases too.

          Show
          Eran Chinthaka added a comment - Chamikara I know you have done the work. Please update the JIRA explaining the stuff and the extent you have done this. Hope you will be having some good test cases too.
          Deepal Jayasinghe made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Eran Chinthaka made changes -
          Link This issue blocks AXIS2-214 [ AXIS2-214 ]
          Hide
          Chamikara Jayalath added a comment -

          Sandesha currently badly needs message context serialization support. But serialization should be minimum to get a resonable performance. To support in-order invocation Sandesha will have to serialize all the messages (since most of the time they won't come in order). if the complete context hierarchy get serialized with every MC serialization , that is going to be a big overhead.

          So I believe the amount of data that get serialized should be minimum. A serialization of a message should only include the info. necessary to that message. (It is great if this can be limited to SOAP envelops and the properties of the message context).

          Other Contexts which has data common to several message context can be serialized to a common place (if needed).

          Show
          Chamikara Jayalath added a comment - Sandesha currently badly needs message context serialization support. But serialization should be minimum to get a resonable performance. To support in-order invocation Sandesha will have to serialize all the messages (since most of the time they won't come in order). if the complete context hierarchy get serialized with every MC serialization , that is going to be a big overhead. So I believe the amount of data that get serialized should be minimum. A serialization of a message should only include the info. necessary to that message. (It is great if this can be limited to SOAP envelops and the properties of the message context). Other Contexts which has data common to several message context can be serialized to a common place (if needed).
          Hide
          Deepal Jayasinghe added a comment -

          I am thinking of fixing the JIRA on Message Context sterilization , but it is jut not message Context all the context hierarchy has to be serialized and there are much more, therefor this involve major change in "core" module.

          Therefor I would like if you guys are not going to make changes to core class in axis2 , else it will be a big trouble for me. Can I go ahead and do the changes ..........

          Show
          Deepal Jayasinghe added a comment - I am thinking of fixing the JIRA on Message Context sterilization , but it is jut not message Context all the context hierarchy has to be serialized and there are much more, therefor this involve major change in "core" module. Therefor I would like if you guys are not going to make changes to core class in axis2 , else it will be a big trouble for me. Can I go ahead and do the changes ..........
          Deepal Jayasinghe made changes -
          Priority Minor [ 4 ] Critical [ 2 ]
          Hide
          Deepal Jayasinghe added a comment -

          Serialization of Message Context includes number of changes to be done.
          1. Has to serialize bottom to top (Message Context to service context)
          2. Make all the descriptions transient and provide get/set methods to change them.
          3. For each context has to have init() method so that inside that method we can called above get/set methods.
          4. When we serialize only the SOAPMessage and properties has to be serialize nothing else, and all the others has to come throgh deployment.

          And this issue can not fix for the 0.95 and will be there in RC1

          Show
          Deepal Jayasinghe added a comment - Serialization of Message Context includes number of changes to be done. 1. Has to serialize bottom to top (Message Context to service context) 2. Make all the descriptions transient and provide get/set methods to change them. 3. For each context has to have init() method so that inside that method we can called above get/set methods. 4. When we serialize only the SOAPMessage and properties has to be serialize nothing else, and all the others has to come throgh deployment. And this issue can not fix for the 0.95 and will be there in RC1
          Deepal Jayasinghe made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Eran Chinthaka made changes -
          Assignee Jaliya Ekanayake [ jaliya ] Deepal Jayasinghe [ deepal ]
          Hide
          Saminda Wishwajith Abeyruwan added a comment -

          Serialization and Deserialization of Message Context work perfectly with standard Serialization of java. To achieve this, most of the Interfaces should be extended form java.io.Serialization. Once being serialized particular instance of msgCtx will be around 11-14kb on a Windows platform, Client side and Server side respectively

          Show
          Saminda Wishwajith Abeyruwan added a comment - Serialization and Deserialization of Message Context work perfectly with standard Serialization of java. To achieve this, most of the Interfaces should be extended form java.io.Serialization. Once being serialized particular instance of msgCtx will be around 11-14kb on a Windows platform, Client side and Server side respectively
          Srinath Perera made changes -
          Field Original Value New Value
          Assignee Jaliya Ekanayake [ jaliya ]
          Srinath Perera created issue -

            People

            • Assignee:
              Chamikara Jayalath
              Reporter:
              Srinath Perera
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development