You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2008/08/13 04:19:59 UTC

svn commit: r685419 - in /webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008: config/ samples/rm_echo_1_0/ src/msgprocessors/ src/storage/sqlite/ src/util/

Author: damitha
Date: Tue Aug 12 19:19:58 2008
New Revision: 685419

URL: http://svn.apache.org/viewvc?rev=685419&view=rev
Log:
Working on dual channel rm 1.0

Modified:
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/config/axis2.xml
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_1_0/rm_echo.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_sender_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_init.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_retrans_adjuster.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/seq_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/config/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/config/axis2.xml?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/config/axis2.xml (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/config/axis2.xml Tue Aug 12 19:19:58 2008
@@ -25,7 +25,7 @@
     <!-- Transport Ins -->
     <!-- ================================================= -->
     <transportReceiver name="http" class="axis2_http_receiver">
-        <parameter name="port" locked="false">6060</parameter>
+        <parameter name="port" locked="false">6061</parameter>
     </transportReceiver>
 
     <!-- ================================================= -->

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_1_0/rm_echo.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_1_0/rm_echo.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_1_0/rm_echo.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/rm_echo_1_0/rm_echo.c Tue Aug 12 19:19:58 2008
@@ -146,6 +146,18 @@
         return -1;
     }
     axis2_options_set_soap_version(options, env, AXIOM_SOAP11);
+
+    /* Offer sequence */
+    axis2_char_t *offered_seq_id = axutil_uuid_gen(env);
+    property = axutil_property_create(env);
+    if(property)
+    {
+        axutil_property_set_value(property, env, axutil_strdup(env, 
+            offered_seq_id));
+        axis2_options_set_property(options, env, 
+            SANDESHA2_CLIENT_OFFERED_SEQ_ID, property);
+    }
+
     /* RM Version 1.0 */
     property = axutil_property_create_with_args(env, 3, 0, 0, 
         SANDESHA2_SPEC_VERSION_1_0);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/app_msg_processor.c Tue Aug 12 19:19:58 2008
@@ -86,9 +86,27 @@
     axis2_char_t *msg_id;
     axis2_bool_t is_server_side;
     int retrans_interval;
+    void *bean;
+    void *msg_ctx;
 };
 
 static void * AXIS2_THREAD_FUNC
+sandesha2_app_msg_processor_create_seq_msg_worker_function(
+    axutil_thread_t *thd, 
+    void *data);
+
+static axis2_status_t
+sandesha2_app_msg_processor_start_create_seq_msg_resender(
+    const axutil_env_t *env,
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_char_t *internal_sequence_id,
+    axis2_char_t *msg_id,
+    const axis2_bool_t is_server_side,
+    int retrans_interval,
+    sandesha2_sender_bean_t *create_sequence_sender_bean,
+    axis2_msg_ctx_t *create_seq_msg_ctx);
+
+static void * AXIS2_THREAD_FUNC
 sandesha2_app_msg_processor_application_msg_worker_function(
     axutil_thread_t *thd, 
     void *data);
@@ -100,7 +118,8 @@
     axis2_char_t *internal_sequence_id,
     axis2_char_t *msg_id,
     const axis2_bool_t is_server_side,
-    int retrans_interval);
+    int retrans_interval,
+    axis2_msg_ctx_t *app_msg_ctx);
 
 static axis2_status_t AXIS2_CALL 
 sandesha2_app_msg_processor_process_in_msg (
@@ -165,7 +184,8 @@
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
-    sandesha2_sender_mgr_t *sender_mgr);
+    sandesha2_sender_mgr_t *sender_mgr,
+    axis2_msg_ctx_t *app_msg_ctx);
 
 static axis2_status_t AXIS2_CALL                 
 sandesha2_app_msg_processor_set_next_msg_no(
@@ -1703,7 +1723,8 @@
     sandesha2_sender_mgr_t *sender_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr)
 {
-    axis2_endpoint_ref_t *to_epr = NULL;
+    /*axis2_endpoint_ref_t *to_epr = NULL;
+    axis2_endpoint_ref_t *temp_to_epr = NULL;*/
     const axis2_char_t *reply_to_addr = NULL;
     sandesha2_seq_property_bean_t *acks_to_bean = NULL;
     axis2_char_t *acks_to_str = NULL;
@@ -1748,8 +1769,8 @@
         return AXIS2_FAILURE;
     }
 
-    to_epr = axis2_msg_ctx_get_to(msg_ctx, env);
-    /*if(temp_to_epr)
+    /*temp_to_epr = axis2_msg_ctx_get_to(msg_ctx, env);
+    if(temp_to_epr)
     {
         const axis2_char_t *temp_to_addr = NULL;
 
@@ -1763,7 +1784,7 @@
     reply_to_epr = axis2_msg_ctx_get_reply_to(msg_ctx, env);
     if(reply_to_epr)
     {
-        reply_to_addr = axis2_endpoint_ref_get_address(reply_to_epr, env);
+       reply_to_addr = axis2_endpoint_ref_get_address(reply_to_epr, env);
     }
 
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
@@ -1887,10 +1908,10 @@
         axis2_msg_ctx_set_property(ack_msg_ctx, env, SANDESHA2_MESSAGE_STORE_KEY, property);
     }
 
-    if(to_epr)
+    /*if(to_epr)
     {
         axis2_msg_ctx_set_reply_to(ack_msg_ctx, env, to_epr);
-    }
+    }*/
 
     /* If it is one way message in server side this is the only place we can send the acknowledgment.
      * In all other cases we do not send the acknowledgment directly, but piggyback it on application
@@ -1912,10 +1933,6 @@
         /* Reset the message context to avoid double freeing of transport out stream */
         if(ack_msg_ctx)
         {
-            axis2_endpoint_ref_t *temp_epr = NULL;
-
-            temp_epr = axis2_msg_ctx_get_to(ack_msg_ctx, env);
-            axis2_endpoint_ref_free(temp_epr, env);
             axis2_core_utils_reset_out_msg_ctx(env, ack_msg_ctx);
         }
     }
@@ -1930,6 +1947,15 @@
      */
     if(ack_msg_ctx)
     {
+        axis2_endpoint_ref_t *temp_epr = NULL;
+
+        temp_epr = axis2_msg_ctx_get_to(ack_msg_ctx, env);
+        if(temp_epr)
+        {
+            axis2_endpoint_ref_free(temp_epr, env);
+        }
+
+        axis2_core_utils_reset_out_msg_ctx(env, ack_msg_ctx);
         axis2_msg_ctx_free(ack_msg_ctx, env);
     }
 
@@ -1980,6 +2006,10 @@
     axis2_char_t *msg_id = NULL;
     sandesha2_sender_bean_t *create_sequence_sender_bean = NULL;
     long millisecs = 0;
+    sandesha2_seq_property_bean_t *reply_to_bean = NULL;
+    axis2_char_t *reply_to_addr = NULL;
+    axis2_char_t *rm_version = NULL;
+    axis2_bool_t is_svr_side = AXIS2_FALSE;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2]Entry:sandesha2_app_msg_processor_send_create_seq_msg");
@@ -2102,95 +2132,152 @@
         sandesha2_msg_ctx_free(create_seq_rm_msg_ctx, env);
     }
 
-    if(axis2_engine_send(engine, env, create_seq_msg_ctx))
-    {
-        if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
-        {
-            status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx, 
-                    storage_mgr);
-        }
-    }
-    else
-    {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Engine Send failed");
-    }
-    
-    if(engine)
-    {
-        axis2_engine_free(engine, env);
-    }
 
     property_bean = sandesha2_utils_get_property_bean(env, axis2_conf_ctx_get_conf(conf_ctx, env));
     retrans_interval = sandesha2_property_bean_get_retrans_interval(property_bean, env); 
 
-    rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
-            SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
-
     create_seq_op = axis2_msg_ctx_get_op(create_seq_msg_ctx, env);
     transport_out = axis2_msg_ctx_get_transport_out_desc(create_seq_msg_ctx, env);
     transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
 
-    while(!rms_sequence_bean)
+    reply_to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
+            SANDESHA2_SEQ_PROP_REPLY_TO_EPR);
+
+    if(reply_to_bean)
     {
-        continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, create_sequence_sender_bean, 
-                conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+        reply_to_addr = sandesha2_seq_property_bean_get_value(reply_to_bean, env);
+    }
 
-        sandesha2_sender_mgr_update(sender_mgr, env, create_sequence_sender_bean);
+    rm_version = sandesha2_utils_get_rm_version(env, internal_sequence_id, seq_prop_mgr);
+    if(!rm_version)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[sandesha2] Unable to find RM spec version for the rms internal_sequence_id %s", 
+                internal_sequence_id);
 
-        if(!continue_sending)
+        return AXIS2_FAILURE;
+    }
+    
+    is_svr_side = axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env);
+
+    if(!is_svr_side && (!reply_to_addr || sandesha2_utils_is_rm_1_0_anonymous_acks_to(env, 
+            rm_version, reply_to_addr)))
+    {
+        if(axis2_engine_send(engine, env, create_seq_msg_ctx))
         {
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                    "[sandesha2] Do not continue sending the create sequence message");
-            break;
+            if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
+            {
+                status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx, 
+                        storage_mgr);
+            }
+        }
+        else
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Engine Send failed");
+        }
+        
+        if(engine)
+        {
+            axis2_engine_free(engine, env);
         }
 
-        AXIS2_SLEEP(retrans_interval);
+        rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
+            SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
 
-        if(transport_sender)
+        while(!rms_sequence_bean)
         {
-            /* This is neccessary to avoid a double free */
-            axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
-            if(!AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, create_seq_msg_ctx))
+            continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, create_sequence_sender_bean, 
+                    conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+
+            sandesha2_sender_mgr_update(sender_mgr, env, create_sequence_sender_bean);
+
+            if(!continue_sending)
             {
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Transport sender invoke failed");
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+                        "[sandesha2] Do not continue sending the create sequence message");
+                break;
             }
+
+            AXIS2_SLEEP(retrans_interval);
+
+            if(transport_sender)
+            {
+                /* This is neccessary to avoid a double free */
+                axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
+                if(!AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, create_seq_msg_ctx))
+                {
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Transport sender invoke failed");
+                }
+            }
+
+            if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
+            {
+                status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx, 
+                    storage_mgr);
+        
+                if(AXIS2_SUCCESS != status)
+                {
+                    break;
+                }
+            }
+
+            rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
+                SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
         }
 
-        if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
+        if(rms_sequence_bean)
         {
-            status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx, 
-                storage_mgr);
-    
-            if(AXIS2_SUCCESS != status)
+            sandesha2_seq_property_bean_free(rms_sequence_bean, env);
+        }
+
+        if(create_sequence_sender_bean)
+        {
+            sandesha2_sender_bean_free(create_sequence_sender_bean, env);
+        }
+
+        /* We have created this message context using sandesha2_utils_create_new_related_msg_ctx(). It is our
+         * reponsiblity to free if after use.
+         */
+        if(create_seq_msg_ctx)
+        {
+            axis2_msg_ctx_free(create_seq_msg_ctx, env);
+        }
+    }
+    else
+    {
+        if(axis2_engine_send(engine, env, create_seq_msg_ctx))
+        {
+            if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
             {
-                break;
+                status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx, 
+                        storage_mgr);
             }
         }
+        else
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Engine Send failed");
+        }
+        
+        if(engine)
+        {
+            axis2_engine_free(engine, env);
+        }
 
         rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
             SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
+        /* Dual channel */
+        sandesha2_app_msg_processor_start_create_seq_msg_resender(env, conf_ctx, internal_sequence_id, 
+            msg_id, is_svr_side, retrans_interval, create_sequence_sender_bean, create_seq_msg_ctx);
     }
 
-    if(rms_sequence_bean)
-    {
-        sandesha2_seq_property_bean_free(rms_sequence_bean, env);
-    }
-
-    if(create_sequence_sender_bean)
-    {
-        sandesha2_sender_bean_free(create_sequence_sender_bean, env);
-    }
-
-    /* We have created this message context using sandesha2_utils_create_new_related_msg_ctx(). It is out
-     * reponsiblity to free if after use.
-     */
-    if(create_seq_msg_ctx)
+    if(rm_version)
     {
-        axis2_msg_ctx_free(create_seq_msg_ctx, env);
+        AXIS2_FREE(env->allocator, rm_version);
     }
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2]Exit:sandesha2_app_msg_processor_send_create_seq_msg");
+
     return status;
 }
 
@@ -2408,7 +2495,7 @@
         axis2_endpoint_ref_t *temp_to_epr = NULL;
         
         temp_to_epr = axis2_endpoint_ref_create(env, new_to_str);
-        sandesha2_msg_ctx_set_to(rm_msg_ctx, env, temp_to_epr);
+        /*sandesha2_msg_ctx_set_to(rm_msg_ctx, env, temp_to_epr);*/
         if(to_epr)
         {
             axis2_endpoint_ref_free(to_epr, env);
@@ -2743,24 +2830,6 @@
         }
     }
 
-    engine = axis2_engine_create(env, conf_ctx);
-    if(axis2_engine_resume_send(engine, env, app_msg_ctx))
-    {
-        if(!axis2_msg_ctx_get_server_side(app_msg_ctx, env))
-        {    
-            status = sandesha2_app_msg_processor_process_app_msg_response(env, app_msg_ctx);
-        }
-    }
-    else
-    {
-        AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "[sandesha2] Engine resume send failed");
-    }
-
-    if(engine)
-    {
-        axis2_engine_free(engine, env);
-    }
-
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     qname = axutil_qname_create(env, SANDESHA2_MODULE, NULL, NULL);
     module_desc = axis2_conf_get_module(conf, env, qname);
@@ -2777,6 +2846,24 @@
 
     if(!is_svr_side && (!reply_to_addr || sandesha2_utils_is_rm_1_0_anonymous_acks_to(env, rm_version, reply_to_addr)))
     {
+        engine = axis2_engine_create(env, conf_ctx);
+        if(axis2_engine_resume_send(engine, env, app_msg_ctx))
+        {
+            if(!axis2_msg_ctx_get_server_side(app_msg_ctx, env))
+            {    
+                status = sandesha2_app_msg_processor_process_app_msg_response(env, app_msg_ctx);
+            }
+        }
+        else
+        {
+            AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "[sandesha2] Engine resume send failed");
+        }
+
+        if(engine)
+        {
+            axis2_engine_free(engine, env);
+        }
+
         /* If application client side and single channel, resend is done in the same 
          * thread as the application client.
          */
@@ -2882,6 +2969,33 @@
 
         return status;
     }
+    else
+    {
+        axis2_msg_ctx_increment_ref(app_msg_ctx, env);
+        engine = axis2_engine_create(env, conf_ctx);
+        if(axis2_engine_resume_send(engine, env, app_msg_ctx))
+        {
+            if(!axis2_msg_ctx_get_server_side(app_msg_ctx, env))
+            {    
+                status = sandesha2_app_msg_processor_process_app_msg_response(env, app_msg_ctx);
+            }
+        }
+        else
+        {
+            AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "[sandesha2] Engine resume send failed");
+        }
+
+        if(engine)
+        {
+            axis2_engine_free(engine, env);
+        }
+
+        /* If not (single channel) spawn a thread and see whether acknowledgment has arrived through the 
+         * sandesha2_sender_mgr_get_application_msg_to_send() function. If it has arrived exit from
+         * the thread.*/
+        sandesha2_app_msg_processor_start_application_msg_resender(env, conf_ctx, internal_sequence_id, 
+                msg_id, is_svr_side, retrans_interval, app_msg_ctx);
+    }
    
     if(rm_version)
     {
@@ -2893,10 +3007,10 @@
         AXIS2_FREE(env->allocator, reply_to_addr);
     }
 
-    if(reply_to_epr)
+    /*if(reply_to_epr)
     {
         axis2_endpoint_ref_free(reply_to_epr, env);
-    }
+    }*/
 
     if(from_acks_to_addr)
     {
@@ -2907,12 +3021,6 @@
         AXIS2_FREE(env->allocator, rms_sequence_id);
     }
 
-    /* If not (single channel) spawn a thread and see whether acknowledgment has arrived through the 
-     * sandesha2_sender_mgr_get_application_msg_to_send() function. If it has arrived exit from
-     * the thread.*/
-    sandesha2_app_msg_processor_start_application_msg_resender(env, conf_ctx, internal_sequence_id, 
-            msg_id, is_svr_side, retrans_interval);
-
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[Sandesha2] Exit:sandesha2_app_msg_processor_send_app_msg");
 
     return status;
@@ -2929,22 +3037,22 @@
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
-    sandesha2_sender_mgr_t *sender_mgr)
+    sandesha2_sender_mgr_t *sender_mgr,
+    axis2_msg_ctx_t *app_msg_ctx)
 {
     sandesha2_sender_bean_t *sender_worker_bean = NULL;
     sandesha2_sender_bean_t *bean1 = NULL;
-    axis2_char_t *key = NULL;
+    /*axis2_char_t *key = NULL;*/
     axis2_bool_t continue_sending = AXIS2_TRUE;
-    axis2_msg_ctx_t *msg_ctx = NULL;
-    sandesha2_msg_ctx_t *rm_msg_ctx = NULL;
+    /*sandesha2_msg_ctx_t *rm_msg_ctx = NULL;*/
     axis2_transport_out_desc_t *transport_out = NULL;
     axis2_transport_sender_t *transport_sender = NULL;
     axis2_bool_t successfully_sent = AXIS2_FALSE;
     axis2_status_t status = AXIS2_SUCCESS;
     axis2_bool_t resend = AXIS2_FALSE;
 
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Entry:sandesha2_app_msg_processor_resend");        
-    
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Entry:sandesha2_app_msg_processor_resend");
+
     sender_worker_bean = sandesha2_sender_mgr_retrieve(sender_mgr, env, msg_id);
     if(!sender_worker_bean)
     {
@@ -2952,31 +3060,6 @@
         return AXIS2_FAILURE;
     }
 
-    key = sandesha2_sender_bean_get_msg_ctx_ref_key(sender_worker_bean, env);
-    if(is_svr_side)
-    {
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Retrieving msg_ctx from database");
-        msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env, key, conf_ctx, AXIS2_TRUE);
-    }
-    else
-    {
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                "[sandesha2] Retrieving msg_ctx from configuration context");
-        msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env, key, conf_ctx, 
-                AXIS2_FALSE);
-    }
-
-    if(!msg_ctx)
-    {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] msg_ctx is not present in the store.");
-        if(sender_worker_bean)
-        {
-            sandesha2_sender_bean_free(sender_worker_bean, env);
-        }
-
-        return AXIS2_FAILURE;
-    }
-
     continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, sender_worker_bean, 
             conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
     sandesha2_sender_mgr_update(sender_mgr, env, sender_worker_bean);
@@ -2992,15 +3075,15 @@
         return AXIS2_FAILURE;
     }
     
-    rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
+    /*rm_msg_ctx = sandesha2_msg_init_init_msg(env, app_msg_ctx);
     
-    if(!sandesha2_util_is_ack_already_piggybacked(env, rm_msg_ctx))
+    if(!sandesha2_util_is_ack_already_piggybacked(env, app_rm_msg_ctx))
     {
-        sandesha2_ack_mgr_piggyback_acks_if_present(env, rm_msg_ctx, storage_mgr, seq_prop_mgr, 
+        sandesha2_ack_mgr_piggyback_acks_if_present(env, app_rm_msg_ctx, storage_mgr, seq_prop_mgr, 
                 sender_mgr);
-    }
+    }*/
     
-    transport_out = axis2_msg_ctx_get_transport_out_desc(msg_ctx, env);
+    transport_out = axis2_msg_ctx_get_transport_out_desc(app_msg_ctx, env);
     if(transport_out)
     {
         transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
@@ -3008,8 +3091,8 @@
     if(transport_sender)
     {
         /* This is neccessary to avoid a double free */
-        axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
-        if(AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx))
+        /*axis2_msg_ctx_set_property(app_msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);*/
+        if(AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, app_msg_ctx))
 		{
         	successfully_sent = AXIS2_TRUE;
 		}else
@@ -3042,9 +3125,9 @@
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Application message successfully sent");
 
-        if(!axis2_msg_ctx_get_server_side(msg_ctx, env))
+        if(!axis2_msg_ctx_get_server_side(app_msg_ctx, env))
         {
-            /*status = sandesha2_app_msg_processor_process_app_msg_response(env, msg_ctx, storage_mgr);
+            /*status = sandesha2_app_msg_processor_process_app_msg_response(env, app_msg_ctx, storage_mgr);
             if(AXIS2_SUCCESS != status)
             {
                 return status;
@@ -3057,10 +3140,10 @@
         sandesha2_sender_bean_free(bean1, env);
     }
 
-    if(rm_msg_ctx)
+    /*if(rm_msg_ctx)
     {
         sandesha2_msg_ctx_free(rm_msg_ctx, env);
-    }
+    }*/
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Exit:sandesha2_app_msg_processor_resend");
 
@@ -3261,13 +3344,190 @@
 }
 
 static axis2_status_t
+sandesha2_app_msg_processor_start_create_seq_msg_resender(
+    const axutil_env_t *env,
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_char_t *internal_sequence_id,
+    axis2_char_t *msg_id,
+    const axis2_bool_t is_server_side,
+    int retrans_interval,
+    sandesha2_sender_bean_t *create_sequence_sender_bean,
+    axis2_msg_ctx_t *create_seq_msg_ctx)
+{
+    axutil_thread_t *worker_thread = NULL;
+    sandesha2_app_msg_processor_args_t *args = NULL;
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] Entry:sandesha2_app_msg_processor_start_create_seq_msg_resender");
+    
+    args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_app_msg_processor_args_t));
+    args->env = axutil_init_thread_env(env);
+    args->conf_ctx = conf_ctx;
+    args->internal_sequence_id = internal_sequence_id;
+    args->msg_id = msg_id;
+    args->retrans_interval = retrans_interval;
+    args->is_server_side = is_server_side;
+    args->bean = create_sequence_sender_bean;
+    args->msg_ctx = create_seq_msg_ctx;
+
+    worker_thread = axutil_thread_pool_get_thread(env->thread_pool, 
+            sandesha2_app_msg_processor_create_seq_msg_worker_function, (void*)args);
+    if(!worker_thread)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] Thread creation failed for sandesha2_app_msg_processor_start_create_seq_msg_resender");
+        return AXIS2_FAILURE;
+    }
+
+    axutil_thread_pool_thread_detach(env->thread_pool, worker_thread);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+            "[sandesha2] Exit:sandesha2_app_msg_processor_start_create_seq_msg_resender");
+    return AXIS2_SUCCESS;
+}
+
+static void * AXIS2_THREAD_FUNC
+sandesha2_app_msg_processor_create_seq_msg_worker_function(
+    axutil_thread_t *thd, 
+    void *data)
+{
+    sandesha2_app_msg_processor_args_t *args;
+    axutil_env_t *env = NULL;
+    sandesha2_storage_mgr_t *storage_mgr = NULL;
+    sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
+    sandesha2_create_seq_mgr_t *create_seq_mgr = NULL;
+    sandesha2_sender_mgr_t *sender_mgr = NULL;
+    int retrans_interval = 0;
+    axis2_char_t *dbname = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_char_t *internal_sequence_id = NULL;
+    axis2_bool_t is_server_side = AXIS2_FALSE;
+    sandesha2_sender_bean_t *create_sequence_sender_bean = NULL;
+    axis2_char_t *msg_id = NULL;
+    sandesha2_seq_property_bean_t *rms_sequence_bean = NULL;
+    axis2_bool_t continue_sending = AXIS2_TRUE;
+    axis2_transport_out_desc_t *transport_out = NULL;
+    axis2_transport_sender_t *transport_sender = NULL;
+    axis2_op_t *create_seq_op = NULL;
+
+    args = (sandesha2_app_msg_processor_args_t*) data;
+    env = args->env;
+    axutil_allocator_switch_to_global_pool(env->allocator);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2] Entry:sandesha2_app_msg_processor_create_seq_msg_worker_function");
+
+    conf_ctx = args->conf_ctx;
+    msg_id = args->msg_id;
+    internal_sequence_id = axutil_strdup(env, args->internal_sequence_id);
+    is_server_side = args->is_server_side;
+    retrans_interval = args->retrans_interval;
+    create_sequence_sender_bean = (sandesha2_sender_bean_t *) args->bean;
+    axis2_msg_ctx_t *create_seq_msg_ctx = (axis2_msg_ctx_t *) args->msg_ctx;
+
+    dbname = sandesha2_util_get_dbname(env, conf_ctx);
+    storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+    seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
+    create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
+    sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
+
+    rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
+            SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
+
+    create_seq_op = axis2_msg_ctx_get_op(create_seq_msg_ctx, env);
+    transport_out = axis2_msg_ctx_get_transport_out_desc(create_seq_msg_ctx, env);
+    transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
+
+    AXIS2_SLEEP(retrans_interval);
+
+    while(!rms_sequence_bean)
+    {
+        continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, create_sequence_sender_bean, 
+                conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+
+        sandesha2_sender_mgr_update(sender_mgr, env, create_sequence_sender_bean);
+
+        if(!continue_sending)
+        {
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+                    "[sandesha2] Do not continue sending the create sequence message");
+            break;
+        }
+
+        AXIS2_SLEEP(retrans_interval);
+
+        if(transport_sender)
+        {
+            /* This is neccessary to avoid a double free */
+            /*axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);*/
+            if(!AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, create_seq_msg_ctx))
+            {
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Transport sender invoke failed");
+            }
+        }
+
+        /*if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
+        {
+            status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx, 
+                storage_mgr);
+    
+            if(AXIS2_SUCCESS != status)
+            {
+                break;
+            }
+        }*/
+
+        rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id, 
+            SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
+    }
+
+    if(rms_sequence_bean)
+    {
+        sandesha2_seq_property_bean_free(rms_sequence_bean, env);
+    }
+
+    if(create_seq_msg_ctx)
+    {
+        axis2_msg_ctx_free(create_seq_msg_ctx, env);
+    }
+
+    if(storage_mgr)
+    {
+        sandesha2_storage_mgr_free(storage_mgr, env);
+    }
+    
+    if(create_seq_mgr)
+    {
+        sandesha2_create_seq_mgr_free(create_seq_mgr, env);
+    }
+    
+    if(sender_mgr)
+    {
+        sandesha2_sender_mgr_free(sender_mgr, env);
+    }
+    
+    if(seq_prop_mgr)
+    {
+        sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
+    }
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2] Exit:sandesha2_app_msg_processor_create_seq_msg_worker_function");
+    
+    axutil_allocator_switch_to_local_pool(env->allocator);
+
+    return NULL;
+}
+
+static axis2_status_t
 sandesha2_app_msg_processor_start_application_msg_resender(
     const axutil_env_t *env,
     axis2_conf_ctx_t *conf_ctx,
     axis2_char_t *internal_sequence_id,
     axis2_char_t *msg_id,
     const axis2_bool_t is_server_side,
-    int retrans_interval)
+    int retrans_interval,
+    axis2_msg_ctx_t *app_msg_ctx)
 {
     axutil_thread_t *worker_thread = NULL;
     sandesha2_app_msg_processor_args_t *args = NULL;
@@ -3275,15 +3535,14 @@
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Entry:sandesha2_app_msg_processor_start_application_msg_resender");
     
-    axutil_allocator_switch_to_global_pool(env->allocator);
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_app_msg_processor_args_t));
     args->env = axutil_init_thread_env(env);
-    axutil_allocator_switch_to_local_pool(env->allocator);
     args->conf_ctx = conf_ctx;
     args->internal_sequence_id = internal_sequence_id;
     args->msg_id = msg_id;
     args->retrans_interval = retrans_interval;
     args->is_server_side = is_server_side;
+    args->msg_ctx = app_msg_ctx;
 
     worker_thread = axutil_thread_pool_get_thread(env->thread_pool, 
             sandesha2_app_msg_processor_application_msg_worker_function, (void*)args);
@@ -3320,10 +3579,13 @@
     sandesha2_sender_bean_t *sender_bean = NULL;
     axis2_char_t *msg_id = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_msg_ctx_t *app_msg_ctx = NULL;
 
     args = (sandesha2_app_msg_processor_args_t*) data;
     env = args->env;
     axutil_allocator_switch_to_global_pool(env->allocator);
+    app_msg_ctx = (axis2_msg_ctx_t *) args->msg_ctx;
+
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2] Entry:sandesha2_app_msg_processor_application_msg_worker_function");
     conf_ctx = args->conf_ctx;
@@ -3352,7 +3614,7 @@
 
         status = sandesha2_app_msg_processor_resend(env, conf_ctx, msg_id, is_server_side,
                 internal_sequence_id, storage_mgr, seq_prop_mgr, create_seq_mgr, 
-                sender_mgr);
+                sender_mgr, app_msg_ctx);
 
         if(AXIS2_SUCCESS != status)
         {
@@ -3373,8 +3635,35 @@
         }
     }
 
+    if(app_msg_ctx)
+    {
+        axis2_msg_ctx_free(app_msg_ctx, env);
+    }
+
+    if(storage_mgr)
+    {
+        sandesha2_storage_mgr_free(storage_mgr, env);
+    }
+    
+    if(create_seq_mgr)
+    {
+        sandesha2_create_seq_mgr_free(create_seq_mgr, env);
+    }
+    
+    if(sender_mgr)
+    {
+        sandesha2_sender_mgr_free(sender_mgr, env);
+    }
+    
+    if(seq_prop_mgr)
+    {
+        sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
+    }
+
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
-        "[sandesha2] Entry:sandesha2_app_msg_processor_application_msg_worker_function");
+        "[sandesha2] Exit:sandesha2_app_msg_processor_application_msg_worker_function");
+    
+    axutil_allocator_switch_to_local_pool(env->allocator);
     
     return NULL;
 }

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/create_seq_res_msg_processor.c Tue Aug 12 19:19:58 2008
@@ -516,6 +516,7 @@
 
         if(create_seq_msg)
         {
+            axis2_core_utils_reset_out_msg_ctx(env, create_seq_msg);
             axis2_msg_ctx_free(create_seq_msg, env);
         }
 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_bean_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_bean_mgr.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_bean_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_bean_mgr.c Tue Aug 12 19:19:58 2008
@@ -106,10 +106,15 @@
         if(0 == axutil_strcmp(col_name[i], "msg_id"))
             if(argv[i])
                 sandesha2_msg_store_bean_set_msg_id(bean, env, argv[i]);
-        if(0 == axutil_strcmp(col_name[i], "soap_env_str"))
-            if(argv[i])
-                sandesha2_msg_store_bean_set_soap_envelope_str(bean, env, 
-                    argv[i]);
+
+        if(!axutil_strcmp(col_name[i], "soap_env_str"))
+        {
+            if(argv[i] && axutil_strcmp("(null)", argv[i]))
+            {
+                sandesha2_msg_store_bean_set_soap_envelope_str(bean, env, argv[i]);
+            }
+        }
+
         if(0 == axutil_strcmp(col_name[i], "soap_version"))
             if(argv[i])
                 sandesha2_msg_store_bean_set_soap_version(bean, env, AXIS2_ATOI(argv[i]));

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_sender_mgr.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_sender_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_sender_mgr.c Tue Aug 12 19:19:58 2008
@@ -623,7 +623,7 @@
         sprintf(sql_find + axutil_strlen(sql_find), "and msg_id='%s'", msg_id);
     }
         
-    sprintf(sql_find + axutil_strlen(sql_find), " and send=%d", AXIS2_TRUE);
+    sprintf(sql_find + axutil_strlen(sql_find), " and send='%d'", AXIS2_TRUE);
 
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "sql_find:%s", sql_find);  
 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_storage_mgr.c Tue Aug 12 19:19:58 2008
@@ -153,10 +153,10 @@
     const axutil_env_t *env,
     axis2_msg_ctx_t *msg_ctx);
 
-static axutil_hash_t *AXIS2_CALL
+/*static axutil_hash_t *AXIS2_CALL
 sandesha2_permanent_storage_mgr_get_property_map_from_string(
     const axutil_env_t *env,
-    axis2_char_t *str);
+    axis2_char_t *str);*/
 
 static axis2_char_t *AXIS2_CALL
 sandesha2_permanent_storage_mgr_get_property_string(
@@ -398,17 +398,10 @@
     axis2_msg_ctx_t *msg_ctx = NULL;
     axis2_conf_t *conf = NULL;
     AXIS2_TRANSPORT_ENUMS transport_out = -1;
-    /*axis2_svc_grp_t *svc_grp = NULL;
-    axis2_svc_t *svc = NULL;
-    axis2_char_t *svc_grp_name_str = NULL;
-    axis2_char_t *svc_name_str = NULL;
-    axis2_char_t *op_name_str = NULL;
-    axis2_op_t *op = NULL;
-    axis2_char_t *op_mep_str = NULL;*/
     axis2_char_t *to_url_str = NULL;
     axis2_char_t *reply_to_str = NULL;
     axis2_char_t *transport_to_str = NULL;
-    axis2_char_t *persistent_prop_str = NULL;
+    /*axis2_char_t *persistent_prop_str = NULL;*/
     axis2_transport_out_desc_t *transport_out_desc = NULL;
     axis2_endpoint_ref_t *endpoint_ref = NULL;
     axiom_xml_reader_t *reader = NULL;
@@ -418,28 +411,9 @@
     axiom_soap_envelope_t *soap_envelope = NULL;
     sandesha2_msg_store_bean_t *msg_store_bean = NULL;
     axis2_char_t *soap_env_str = NULL;
-    axutil_property_t *prop_property = NULL;
+    /*axutil_property_t *prop_property = NULL;*/
 
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
-    /*if(!persistent)
-    {
-        axutil_property_t *property = NULL;
-        axis2_ctx_t *ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-        axutil_hash_t *msg_ctx_map = NULL;
-
-        property = axis2_ctx_get_property(ctx, env, SANDESHA2_MSG_CTX_MAP);
-        if(property)
-        {
-            msg_ctx_map = axutil_property_get_value(property, env);
-            msg_ctx = (axis2_msg_ctx_t *) axutil_hash_get(msg_ctx_map, key, 
-                AXIS2_HASH_KEY_STRING);
-        }
-    }
-
-    if(msg_ctx)
-    {
-        return msg_ctx;
-    }*/
 
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Message context retrieved from database");
 
@@ -453,168 +427,51 @@
 
     msg_ctx = axis2_msg_ctx_create(env, conf_ctx, NULL, NULL);
     soap_env_str = axutil_strdup(env, sandesha2_msg_store_bean_get_soap_envelope_str(msg_store_bean, env));
-    axutil_array_list_add(storage_mgr_impl->envelope_buffer_list, env, soap_env_str); 
-
-    reader = axiom_xml_reader_create_for_memory(env, soap_env_str, axutil_strlen(soap_env_str), 
-            NULL, AXIS2_XML_PARSER_TYPE_BUFFER);
-
-    om_builder = axiom_stax_builder_create(env, reader);
-    soap_version = sandesha2_msg_store_bean_get_soap_version(msg_store_bean, env);
-
-    if(SANDESHA2_SOAP_VERSION_1_1 == soap_version)
+    if(soap_env_str)
     {
-        soap_builder = axiom_soap_builder_create(env, om_builder,
-            AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
-    }
-    else if(SANDESHA2_SOAP_VERSION_1_2 == soap_version)
-    {
-        soap_builder = axiom_soap_builder_create(env, om_builder,
-            AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
-    }
-    
-    soap_envelope = axiom_soap_builder_get_soap_envelope(soap_builder, env);
-    if (!soap_envelope)
-    {
-        axiom_soap_builder_free(soap_builder, env);
-        
-        if(msg_store_bean)
-        {
-            sandesha2_msg_store_bean_free(msg_store_bean, env);
-        }
-
-        return NULL;
-    }
+        axutil_array_list_add(storage_mgr_impl->envelope_buffer_list, env, soap_env_str); 
 
-    axis2_msg_ctx_set_soap_envelope(msg_ctx, env, soap_envelope);
+        reader = axiom_xml_reader_create_for_memory(env, soap_env_str, axutil_strlen(soap_env_str), 
+            NULL, AXIS2_XML_PARSER_TYPE_BUFFER);
 
-    axis2_msg_ctx_set_msg_id(msg_ctx, env, sandesha2_msg_store_bean_get_msg_id(msg_store_bean, env));
+        om_builder = axiom_stax_builder_create(env, reader);
 
-    conf = axis2_conf_ctx_get_conf(conf_ctx, env);
-    transport_out = sandesha2_msg_store_bean_get_transport_out(msg_store_bean, 
-        env);
-    transport_out_desc = axis2_conf_get_transport_out(conf, env, transport_out);
-    axis2_msg_ctx_set_transport_out_desc(msg_ctx, env, transport_out_desc);
+        soap_version = sandesha2_msg_store_bean_get_soap_version(msg_store_bean, env);
 
-    /*svc_grp_name_str = sandesha2_msg_store_bean_get_svc_grp(msg_store_bean, env);
-    if(svc_grp_name_str)
-    {
-        svc_grp = axis2_conf_get_svc_grp(conf, env, svc_grp_name_str);
-        if(svc_grp)
+        if(SANDESHA2_SOAP_VERSION_1_1 == soap_version)
         {
-            axis2_msg_ctx_set_svc_grp(msg_ctx, env, svc_grp);
+            soap_builder = axiom_soap_builder_create(env, om_builder,
+                AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
         }
-    }
-    else
-    {
-        svc_grp = axis2_svc_grp_create_with_conf(env, conf);
-        axis2_msg_ctx_set_svc_grp(msg_ctx, env, svc_grp);
-    }
-
-    svc_name_str = sandesha2_msg_store_bean_get_svc(msg_store_bean, env);
-    if(svc_name_str)
-    {
-        svc = axis2_conf_get_svc(conf, env, svc_name_str);
-        if(svc)
-        {
-            axis2_msg_ctx_set_svc(msg_ctx, env, svc);
-        }
-    }
-
-    op_mep_str = sandesha2_msg_store_bean_get_op_mep(msg_store_bean, env);
-    op_name_str = sandesha2_msg_store_bean_get_op(msg_store_bean, env);
-    svc = axis2_msg_ctx_get_svc(msg_ctx, env);
-    if((op_name_str || op_mep_str) && svc)
-    {
-        axis2_op_t *op = NULL;
-        if(op_name_str)
+        else if(SANDESHA2_SOAP_VERSION_1_2 == soap_version)
         {
-            axutil_qname_t *op_qname = axutil_qname_create_from_string(env, op_name_str);
-            op = axis2_svc_get_op_with_qname(svc, env, op_qname);
-            if(op_qname)
-            {
-                axutil_qname_free(op_qname, env);
-            }
+            soap_builder = axiom_soap_builder_create(env, om_builder,
+                AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
         }
-
-        if(!op && op_mep_str && svc)
+        
+        soap_envelope = axiom_soap_builder_get_soap_envelope(soap_builder, env);
+        if (!soap_envelope)
         {
-            axutil_hash_t *all_ops = NULL;
-            axutil_hash_index_t *index = NULL;
-
-            //Finding an operation using the MEP
-            all_ops = axis2_svc_get_all_ops(svc, env);
-            for (index = axutil_hash_first(all_ops, env); index; index = 
-                axutil_hash_next(env, index))
+            axiom_soap_builder_free(soap_builder, env);
+            
+            if(msg_store_bean)
             {
-                void *v = NULL;
-                axis2_char_t *mep = NULL;
-                axis2_op_t *temp = NULL;
-
-                axutil_hash_this(index, NULL, NULL, &v);
-                temp = (axis2_op_t *) v;
-                mep = (axis2_char_t *) axis2_op_get_msg_exchange_pattern(temp, env);
-                if(!axutil_strcmp(mep, op_mep_str))
-                {
-                    op = temp;
-                    break;
-                }
+                sandesha2_msg_store_bean_free(msg_store_bean, env);
             }
-        }
 
-        if(op)
-        {
-            axis2_msg_ctx_set_op(msg_ctx, env, op);
-        }
-        else
-        {
-            AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, 
-                    "[sandesha2] Cannot find a suitable operation for the generated message");
+            return NULL;
         }
-    }
-
-    // Setting contexts TODO is this necessary?
-    svc_grp = axis2_msg_ctx_get_svc_grp(msg_ctx, env);
-    if(svc_grp)
-    {
-        const axis2_char_t *svc_grp_id = NULL;
 
-        axis2_svc_grp_ctx_t *svc_grp_ctx = axis2_svc_grp_ctx_create(env, svc_grp, conf_ctx);
-        axis2_msg_ctx_set_svc_grp_ctx(msg_ctx, env, svc_grp_ctx);
-        svc_grp_id = axis2_svc_grp_ctx_get_id(svc_grp_ctx, env);
-        axis2_conf_ctx_register_svc_grp_ctx(conf_ctx, env, svc_grp_id, svc_grp_ctx);
+        axis2_msg_ctx_set_soap_envelope(msg_ctx, env, soap_envelope);
     }
 
-    svc = axis2_msg_ctx_get_svc(msg_ctx, env);
-    if(svc)
-    {
-        axis2_svc_grp_ctx_t *svc_grp_ctx = axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env);
-        axis2_svc_ctx_t *svc_ctx = axis2_svc_ctx_create(env, svc, svc_grp_ctx);
-        if(svc_ctx)
-        {
-            const axis2_char_t *svc_id = NULL;
-
-            axis2_svc_ctx_set_parent(svc_ctx, env, svc_grp_ctx);
-            axis2_msg_ctx_set_svc_ctx(msg_ctx, env, svc_ctx);
-            svc_id = axis2_svc_ctx_get_svc_id(svc_ctx, env);
-            axis2_conf_ctx_register_svc_ctx(conf_ctx, env, svc_id, svc_ctx);
-        }
-    }
+    axis2_msg_ctx_set_msg_id(msg_ctx, env, sandesha2_msg_store_bean_get_msg_id(msg_store_bean, env));
 
-    op = axis2_msg_ctx_get_op(msg_ctx, env);
-    if(op)
-    {
-		axis2_op_ctx_t *op_ctx = NULL;
-        axis2_svc_ctx_t *svc_ctx = axis2_msg_ctx_get_svc_ctx(msg_ctx, env);
-		op_ctx = axis2_op_ctx_create(env, op, svc_ctx);
-        if(op_ctx)
-        {
-            axis2_char_t *msg_id = NULL;
-
-            axis2_op_ctx_set_parent(op_ctx, env, svc_ctx);
-            axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_ctx);
-            msg_id = (axis2_char_t *) axis2_msg_ctx_get_msg_id(msg_ctx, env);
-        }
-    }*/
+    conf = axis2_conf_ctx_get_conf(conf_ctx, env);
+    transport_out = sandesha2_msg_store_bean_get_transport_out(msg_store_bean, 
+        env);
+    transport_out_desc = axis2_conf_get_transport_out(conf, env, transport_out);
+    axis2_msg_ctx_set_transport_out_desc(msg_ctx, env, transport_out_desc);
 
     axis2_msg_ctx_set_server_side(msg_ctx, env, 
         sandesha2_msg_store_bean_is_svr_side(msg_store_bean, env));
@@ -644,7 +501,7 @@
 
     axis2_msg_ctx_set_wsa_action(msg_ctx, env, sandesha2_msg_store_bean_get_action(msg_store_bean, env));
 
-    persistent_prop_str = axutil_strdup(env, sandesha2_msg_store_bean_get_persistent_property_str(
+    /*persistent_prop_str = axutil_strdup(env, sandesha2_msg_store_bean_get_persistent_property_str(
             msg_store_bean, env));
     
     prop_property = axutil_property_create_with_args(env, 0, AXIS2_TRUE, 0, persistent_prop_str);
@@ -679,8 +536,8 @@
             }
 
             axutil_hash_free(map, env);
-        }   
-    }
+        }  
+    }*/
 
     if(msg_store_bean)
     {
@@ -840,6 +697,7 @@
     if(to)
     {
         address = (axis2_char_t *) axis2_endpoint_ref_get_address(to, env);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_address:%s", address);
         sandesha2_msg_store_bean_set_to_url(bean, env, address);
     }
 
@@ -1003,7 +861,7 @@
     return prop_str;
 }
 
-static axutil_hash_t *AXIS2_CALL
+/*static axutil_hash_t *AXIS2_CALL
 sandesha2_permanent_storage_mgr_get_property_map_from_string(
     const axutil_env_t *env,
     axis2_char_t *str)
@@ -1069,7 +927,7 @@
     }
 
     return map;
-}
+}*/
 
 static axis2_status_t AXIS2_CALL
 sandesha2_permanent_storage_mgr_store_response(

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_creator.c Tue Aug 12 19:19:58 2008
@@ -161,8 +161,12 @@
         axis2_endpoint_ref_t *reply_to_epr = NULL;
 
         reply_to_epr = axis2_endpoint_ref_create(env, axis2_endpoint_ref_get_address(temp_reply_to, env));
-        axis2_msg_ctx_set_reply_to(create_seq_msg_ctx, env, reply_to_epr);
+        if(reply_to_epr)
+        {
+            axis2_msg_ctx_set_reply_to(create_seq_msg_ctx, env, reply_to_epr);
+        }
     }
+
     create_seq_rm_msg = sandesha2_msg_ctx_create(env, create_seq_msg_ctx);
 
     rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, seq_prop_mgr);
@@ -236,6 +240,7 @@
         axis2_endpoint_ref_t *reply_to_epr = NULL;
 
         temp_value = sandesha2_seq_property_bean_get_value(reply_to_bean, env);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_reply_to:%s", temp_value);
         reply_to_epr = axis2_endpoint_ref_create(env, temp_value);
 
         if(reply_to_epr)

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_init.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_init.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_init.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_init.c Tue Aug 12 19:19:58 2008
@@ -134,9 +134,12 @@
     if(msg_ctx)
     {
         ctx = axis2_msg_ctx_get_base(msg_ctx, env);
+        if(ctx)
+        {
+            prop = axis2_ctx_get_property(ctx, env, AXIS2_WSA_VERSION);
+        }
     }
 
-    prop = axis2_ctx_get_property(ctx, env, AXIS2_WSA_VERSION);
     if(prop)
     {
         addressing_ns = axutil_property_get_value(prop, env);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_retrans_adjuster.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_retrans_adjuster.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/msg_retrans_adjuster.c Tue Aug 12 19:19:58 2008
@@ -42,7 +42,7 @@
 sandesha2_msg_retrans_adjuster_finalize_timedout_seq(
     const axutil_env_t *env,
     axis2_char_t *internal_sequence_id,
-    axis2_msg_ctx_t *msg_ctx,
+    axis2_conf_ctx_t *conf_ctx,
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
@@ -59,7 +59,6 @@
     sandesha2_sender_mgr_t *sender_mgr)
 {
     axis2_char_t *stored_key = NULL;
-    axis2_msg_ctx_t *msg_ctx = NULL;
     axis2_char_t *internal_sequence_id = NULL;
     sandesha2_property_bean_t *property_bean = NULL;
     int max_attempts = -1;
@@ -85,9 +84,6 @@
         return AXIS2_FALSE;
     }
 
-    msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env, stored_key, conf_ctx, 
-            AXIS2_FALSE);
-
     internal_sequence_id = sandesha2_sender_bean_get_internal_seq_id(sender_bean, env);
    
     property_bean = sandesha2_utils_get_property_bean(env, axis2_conf_ctx_get_conf(conf_ctx, env));
@@ -115,15 +111,10 @@
     {
         sandesha2_sender_bean_set_send(sender_bean, env, AXIS2_FALSE);
         sandesha2_msg_retrans_adjuster_finalize_timedout_seq(env, internal_sequence_id, 
-            msg_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+            conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
         continue_sending = AXIS2_FALSE;
     }
 
-    if(msg_ctx)
-    {
-        axis2_msg_ctx_free(msg_ctx, env);
-    }
-
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Exit:sandesha2_msg_retrans_adjuster_adjust_retrans");
 
@@ -186,28 +177,22 @@
 sandesha2_msg_retrans_adjuster_finalize_timedout_seq(
     const axutil_env_t *env,
     axis2_char_t *internal_sequence_id,
-    axis2_msg_ctx_t *msg_ctx,
+    axis2_conf_ctx_t *conf_ctx,
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
     sandesha2_sender_mgr_t *sender_mgr)
 {
-    axis2_conf_ctx_t *conf_ctx = NULL;
-    axis2_ctx_t *ctx = NULL;
-    
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2] Entry:sandesha2_msg_retrans_adjuster_finalize_timedout_seq");
 
     AXIS2_PARAM_CHECK(env->error, internal_sequence_id, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, seq_prop_mgr, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, create_seq_mgr, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, sender_mgr, AXIS2_FAILURE);
     
-    conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
-    ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-    
     sandesha2_terminate_mgr_time_out_sending_side_seq(env, conf_ctx, internal_sequence_id,
         AXIS2_FALSE, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
  

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/seq_mgr.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/seq_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/seq_mgr.c Tue Aug 12 19:19:58 2008
@@ -464,15 +464,20 @@
         }
 
         reply_to_epr = axis2_msg_ctx_get_to(req_msg_ctx, env);
-        acks_to_str = (axis2_char_t *) axis2_endpoint_ref_get_address(reply_to_epr, env);
 
         if(reply_to_epr)
         {
-            reply_to_bean = sandesha2_seq_property_bean_create_with_data(env, internal_sequence_id, 
-                    SANDESHA2_SEQ_PROP_REPLY_TO_EPR, (axis2_char_t*)axis2_endpoint_ref_get_address(
-                        reply_to_epr, env));
-            sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, reply_to_bean);
-            sandesha2_seq_property_bean_free(reply_to_bean, env);
+            const axis2_char_t *temp_epr_addr = axis2_endpoint_ref_get_address(reply_to_epr, env);
+            
+            if(temp_epr_addr)
+            {
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "temp_epr_address:%s", temp_epr_addr);
+                acks_to_str = (axis2_char_t *) temp_epr_addr;
+                reply_to_bean = sandesha2_seq_property_bean_create_with_data(env, internal_sequence_id, 
+                    SANDESHA2_SEQ_PROP_REPLY_TO_EPR, (axis2_char_t*) temp_epr_addr);
+                sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, reply_to_bean);
+                sandesha2_seq_property_bean_free(reply_to_bean, env);
+            }
         }
         else
         {
@@ -488,11 +493,15 @@
 
         if(reply_to_epr)
         {
-            reply_to_bean = sandesha2_seq_property_bean_create_with_data(env, internal_sequence_id, 
-                    SANDESHA2_SEQ_PROP_REPLY_TO_EPR, (axis2_char_t*)axis2_endpoint_ref_get_address(
-                        reply_to_epr, env));
-            sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, reply_to_bean);
-            sandesha2_seq_property_bean_free(reply_to_bean, env);
+            const axis2_char_t *temp_epr_addr = axis2_endpoint_ref_get_address(reply_to_epr, env);
+            if(temp_epr_addr)
+            {
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "temp_epr_address:%s", temp_epr_addr);
+                reply_to_bean = sandesha2_seq_property_bean_create_with_data(env, internal_sequence_id, 
+                    SANDESHA2_SEQ_PROP_REPLY_TO_EPR, (axis2_char_t*) temp_epr_addr);
+                sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, reply_to_bean);
+                sandesha2_seq_property_bean_free(reply_to_bean, env);
+            }
         } 
     }
 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c?rev=685419&r1=685418&r2=685419&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c Tue Aug 12 19:19:58 2008
@@ -909,16 +909,19 @@
 
     if(to_bean)
     {
-        to_epr = axis2_endpoint_ref_create(env, sandesha2_seq_property_bean_get_value(to_bean, env));
+        axis2_char_t *temp_addr = NULL;
+
+        temp_addr = sandesha2_seq_property_bean_get_value(to_bean, env);
+        to_epr = axis2_endpoint_ref_create(env, temp_addr);
         sandesha2_seq_property_bean_free(to_bean, env);
     }
 
     if(to_epr)
     {
         to_addr = axis2_endpoint_ref_get_address(to_epr, env);
+        sandesha2_msg_ctx_set_to(terminate_rm_msg_ctx, env, to_epr);
     }
 
-    sandesha2_msg_ctx_set_to(terminate_rm_msg_ctx, env, to_epr);
     rm_ver = sandesha2_utils_get_rm_version(env, internal_sequence_id, seq_prop_mgr);
     if(!rm_ver)
     {
@@ -930,6 +933,14 @@
 
         if(terminate_msg_ctx)
         {
+            axis2_endpoint_ref_t *temp_epr = NULL;
+
+            temp_epr = axis2_msg_ctx_get_to(terminate_msg_ctx, env);
+            if(temp_epr)
+            {
+                axis2_endpoint_ref_free(temp_epr, env);
+            }
+
             /* Reset the message context to avoid double freeing of transport out stream */
             axis2_core_utils_reset_out_msg_ctx(env, terminate_msg_ctx);
             axis2_msg_ctx_free(terminate_msg_ctx, env);
@@ -1009,6 +1020,14 @@
          */
         if(terminate_msg_ctx)
         {
+            axis2_endpoint_ref_t *temp_epr = NULL;
+
+            temp_epr = axis2_msg_ctx_get_to(terminate_msg_ctx, env);
+            if(temp_epr)
+            {
+                axis2_endpoint_ref_free(temp_epr, env);
+            }
+
             /* Reset the message context to avoid double freeing of transport out stream */
             axis2_core_utils_reset_out_msg_ctx(env, terminate_msg_ctx);
             axis2_msg_ctx_free(terminate_msg_ctx, env);
@@ -1205,6 +1224,22 @@
      */
     if(terminate_msg_ctx)
     {
+        axis2_endpoint_ref_t *temp_epr = NULL;
+
+        temp_epr = axis2_msg_ctx_get_to(terminate_msg_ctx, env);
+        if(temp_epr)
+        {
+            axis2_endpoint_ref_free(temp_epr, env);
+            temp_epr = NULL;
+        }
+        
+        temp_epr = axis2_msg_ctx_get_reply_to(terminate_msg_ctx, env);
+        if(temp_epr)
+        {
+            axis2_endpoint_ref_free(temp_epr, env);
+        }
+
+        axis2_core_utils_reset_out_msg_ctx(env, terminate_msg_ctx);
         axis2_msg_ctx_free(terminate_msg_ctx, env);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org