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/06/03 18:28:55 UTC

svn commit: r662832 - in /webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008: include/ src/msgprocessors/ src/storage/ src/storage/sqlite/ src/util/

Author: damitha
Date: Tue Jun  3 09:28:54 2008
New Revision: 662832

URL: http://svn.apache.org/viewvc?rev=662832&view=rev
Log:
Invoking all messages in the same thread as client thread

Modified:
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_client_constants.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_utils.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/terminate_seq_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/Makefile.am
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/sqlite/permanent_seq_property_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/fault_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/sandesha2_utils.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/terminate_mgr.c

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_client_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_client_constants.h?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_client_constants.h (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_client_constants.h Tue Jun  3 09:28:54 2008
@@ -38,7 +38,6 @@
 #define SANDESHA2_CLIENT_LAST_MESSAGE "Sandesha2LastMessage"
 #define SANDESHA2_CLIENT_OFFERED_SEQ_ID "Sandesha2OfferedSequenceId"
 #define SANDESHA2_CLIENT_DEBUG_MODE "Sandesha2DebugMode"
-#define SANDESHA2_CLIENT_SEQ_KEY "Sandesha2SequenceKey"
 #define SANDESHA2_CLIENT_MESSAGE_NUMBER "Sandesha2MessageNumber"
 #define SANDESHA2_CLIENT_RM_SPEC_VERSION "Sandesha2RMSpecVersion"
 #define SANDESHA2_CLIENT_DUMMY_MESSAGE "Sandesha2DummyMessage" /* If this 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h Tue Jun  3 09:28:54 2008
@@ -464,6 +464,12 @@
 	
 	#define SANDESHA2_INTERNAL_SEQ_PREFIX  "Sandesha2InternalSequence"
 	
+    #define SANDESHA2_INTERNAL_SERVER_SEQUENCE_PREFIX  "Sandesha2InternalServerSequence"
+	
+    #define SANDESHA2_INTERNAL_CLIENT_SEQUENCE_PREFIX  "Sandesha2InternalClientSequence"
+	
+    #define SANDESHA2_CLIENT_INTERNAL_SEQUENCE_ID  "Sandesha2ClientInternalSequenceId"
+	
 	#define SANDESHA2_SANDESHA_PROPERTY_BEAN  "Sandesha2PropertyBean"
 	
 	#define SANDESHA2_LIST_SEPERATOR ","
@@ -518,6 +524,8 @@
 	#define SANDESHA2_POLLING_WAIT  "PollingWaitTime"
 	#define SANDESHA2_MODULE  "sandesha2"
 	#define SANDESHA2_ISOLATED_LAST_MSG "isolated_last_msg"
+    #define SANDESHA2_CLIENT_SEQ_KEY "Sandesha2SequenceKey"
+
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h Tue Jun  3 09:28:54 2008
@@ -84,6 +84,7 @@
     axis2_msg_ctx_t *first_app_msg,
     axis2_char_t *rms_internal_sequence_id,
     axis2_char_t *spec_version,
+    axis2_char_t *client_sequence_key,
     struct sandesha2_seq_property_mgr *seq_prop_mgr);
 
 /** @} */

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_utils.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_utils.h?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_utils.h (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_utils.h Tue Jun  3 09:28:54 2008
@@ -126,7 +126,8 @@
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 sandesha2_utils_get_rms_internal_sequence_id(
     const axutil_env_t *env,
-    axis2_char_t *rmd_seq_id);
+    axis2_bool_t svr_side,
+    axis2_char_t *seq_id);
 
 AXIS2_EXTERN axis2_transport_out_desc_t* AXIS2_CALL
 sandesha2_utils_get_transport_out(

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c Tue Jun  3 09:28:54 2008
@@ -109,7 +109,7 @@
     axis2_msg_ctx_t *app_msg_ctx,
     sandesha2_storage_mgr_t *storage_mgr);
 
-static axis2_status_t AXIS2_CALL
+static sandesha2_create_seq_bean_t *AXIS2_CALL
 sandesha2_app_msg_processor_send_create_seq_msg(
     const axutil_env_t *env,
     sandesha2_msg_ctx_t *msg_ctx,
@@ -343,7 +343,6 @@
     seq = sandesha2_msg_ctx_get_sequence(rm_msg_ctx, env);
     sandesha2_seq_set_must_understand(seq, env, AXIS2_FALSE);
     rmd_sequence_id = sandesha2_identifier_get_identifier(sandesha2_seq_get_identifier(seq, env), env);
-    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "rmd_sequence_id:%s", rmd_sequence_id);
     fault_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env,rm_msg_ctx, rmd_sequence_id, seq_prop_mgr, 
             create_seq_mgr, next_msg_mgr);
     if(fault_ctx)
@@ -351,7 +350,7 @@
         axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
 
 		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "[sandesha2]sandesha2_app_msg_processor_process_in_msg send Fault");
+            "[sandesha2] sandesha2_app_msg_processor_process_in_msg send Fault");
 
         if(seq_prop_mgr)
         {
@@ -515,10 +514,6 @@
         sandesha2_seq_property_bean_t *highest_msg_key_bean = NULL;
         sandesha2_seq_property_bean_t *highest_msg_id_bean = NULL;
         const axis2_char_t *msg_id = NULL;
-        /*axiom_soap_envelope_t *response_envelope = NULL;*/
-        /*int soap_version = -1;*/
-        axutil_property_t *property = NULL;
-        axis2_char_t *client_seq_key = NULL;
         
         highest_in_msg_no = msg_no;
         msg_id = axis2_msg_ctx_get_msg_id(msg_ctx, env);
@@ -535,33 +530,7 @@
             highest_in_msg_key_str, conf_ctx, -1);
         sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, 
             highest_in_msg_key_str, msg_ctx);
-        /*response_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);*/
-        property = axis2_msg_ctx_get_property(msg_ctx, env, SANDESHA2_CLIENT_SEQ_KEY);
-        if(property)
-        {
-            client_seq_key = axutil_property_get_value(property, env);
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                "[sandesha2]Client sequence key:%s found", client_seq_key);
-        }
-        else
-        {
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                "[sandesha2]Client sequence key not found");
-        }
-        /*if(client_seq_key)
-        {
-            if(axis2_msg_ctx_get_is_soap_11(msg_ctx, env))
-                soap_version = SANDESHA2_SOAP_VERSION_1_1;
-            else
-                soap_version = SANDESHA2_SOAP_VERSION_1_2;
-            if(response_envelope)
-            {
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                    "[sandesha2]Client sequence key:%s", client_seq_key);
-                sandesha2_storage_mgr_store_response(storage_mgr, env, 
-                    client_seq_key, response_envelope, msg_no, soap_version);
-            }
-        }*/
+        
         if(highest_in_msg_no_str)
         {
             sandesha2_seq_property_mgr_update(seq_prop_mgr, env, 
@@ -956,6 +925,7 @@
     sandesha2_seq_property_bean_t *seq_timeout_bean = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;
+    axis2_char_t *client_sequence_key = NULL;
     
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Entry:sandesha2_app_msg_processor_process_out_msg");
@@ -1029,7 +999,7 @@
         req_seq = sandesha2_msg_ctx_get_sequence(req_rm_msg_ctx, env);
         if(!req_seq)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]Sequence is NULL");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence is NULL");
             AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SEQ_NOT_EXIST, AXIS2_FAILURE);
             if(req_rm_msg_ctx)
             {
@@ -1085,7 +1055,7 @@
         }
 
         request_msg_no = sandesha2_msg_number_get_msg_num(sandesha2_seq_get_msg_num(req_seq, env), env);
-        rms_internal_sequence_id = sandesha2_utils_get_rms_internal_sequence_id(env, rmd_sequence_id);
+        rms_internal_sequence_id = sandesha2_utils_get_rms_internal_sequence_id(env, is_svr_side, rmd_sequence_id);
 
         /* Deciding whether this is the last message. We assume it is if it 
          * relates to a message which arrived with the LastMessage flag on it.
@@ -1108,25 +1078,40 @@
     else /* Client side */
     {
         axis2_char_t *to = NULL;
-        axis2_char_t *seq_key = NULL;
         axis2_char_t *last_app_msg = NULL;
+        sandesha2_seq_property_bean_t *client_sequence_key_bean = NULL;
         
         to = (axis2_char_t*)axis2_endpoint_ref_get_address(to_epr, env);
         property = axis2_msg_ctx_get_property(msg_ctx, env, SANDESHA2_CLIENT_SEQ_KEY);
         if(property)
         {
-            seq_key = axutil_property_get_value(property, env);
+            client_sequence_key = axutil_property_get_value(property, env);
         }
 
-        if(!seq_key)
+        if(!client_sequence_key)
         {
-            seq_key = axutil_uuid_gen(env);
-            property = axutil_property_create_with_args(env, 0, 0, 0, seq_key);
+            client_sequence_key = axutil_uuid_gen(env);
+            property = axutil_property_create_with_args(env, 0, 0, 0, client_sequence_key);
             axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_CLIENT_SEQ_KEY, property);
         }
 
-        rms_internal_sequence_id = sandesha2_utils_get_client_rms_internal_sequence_id(env, to, 
-                seq_key);
+        client_sequence_key_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, client_sequence_key, 
+                SANDESHA2_CLIENT_SEQ_KEY);
+
+        if(client_sequence_key_bean)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "came1");
+            rms_internal_sequence_id = sandesha2_seq_property_bean_get_value(client_sequence_key_bean, env);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "rms_internal_sequence_id:%s", rms_internal_sequence_id);
+        }
+
+        if(!rms_internal_sequence_id)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "came2");
+            rms_internal_sequence_id = sandesha2_utils_get_client_rms_internal_sequence_id(env, to, 
+                client_sequence_key);
+        }
+
         property = axis2_msg_ctx_get_property(msg_ctx, env, SANDESHA2_CLIENT_LAST_MESSAGE);
         if(property)
         {
@@ -1396,11 +1381,12 @@
 
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Spec version:%s", spec_ver);
         sandesha2_seq_mgr_setup_temporary_rms_sequence(env, msg_ctx, rms_internal_sequence_id, spec_ver, 
-            seq_prop_mgr);
+            client_sequence_key, seq_prop_mgr);
 
         if(send_create_seq)
         {
             sandesha2_seq_property_bean_t *create_seq_added = NULL;
+            sandesha2_create_seq_bean_t *updated_create_seq_bean = NULL;
 
             create_seq_added = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rms_internal_sequence_id, 
                     SANDESHA2_SEQ_PROP_OUT_CREATE_SEQ_SENT);
@@ -1495,8 +1481,10 @@
                  * TODO handle acks_to == anon_uri case
                  */
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "acks_to:%s", acks_to);
-                sandesha2_app_msg_processor_send_create_seq_msg(env, rm_msg_ctx, rms_internal_sequence_id, 
-                        acks_to, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+                updated_create_seq_bean = sandesha2_app_msg_processor_send_create_seq_msg(env, rm_msg_ctx, 
+                        rms_internal_sequence_id, acks_to, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+                rms_internal_sequence_id = sandesha2_create_seq_bean_get_rms_internal_sequence_id(
+                        updated_create_seq_bean, env);
             }
         }
         sandesha2_seq_mgr_setup_new_rms_sequence(env, msg_ctx, rms_internal_sequence_id, spec_ver, 
@@ -1811,7 +1799,7 @@
     return AXIS2_SUCCESS;
 }
                     	
-static axis2_status_t AXIS2_CALL
+static sandesha2_create_seq_bean_t *AXIS2_CALL
 sandesha2_app_msg_processor_send_create_seq_msg(
     const axutil_env_t *env,
     sandesha2_msg_ctx_t *rm_msg_ctx,
@@ -1829,6 +1817,7 @@
     sandesha2_seq_offer_t *seq_offer = NULL;
     axis2_msg_ctx_t *create_seq_msg = NULL;
     sandesha2_create_seq_bean_t *create_seq_bean = NULL;
+    sandesha2_create_seq_bean_t *updated_create_seq_bean = NULL;
     axis2_char_t *addr_ns_uri = NULL;
     axis2_char_t *anon_uri = NULL;
     axis2_char_t *create_sequence_msg_store_key = NULL;
@@ -1838,6 +1827,7 @@
     axis2_op_t *create_seq_op = NULL;
     axis2_op_ctx_t *create_seq_op_ctx = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *create_seq_msg_id = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2]Entry:sandesha2_app_msg_processor_send_create_seq_msg");
@@ -1901,8 +1891,9 @@
 
     axis2_msg_ctx_set_relates_to(create_seq_msg, env, NULL);
     create_sequence_msg_store_key = axutil_uuid_gen(env);
+    create_seq_msg_id = (axis2_char_t*)axis2_msg_ctx_get_wsa_message_id(create_seq_msg, env);
     create_seq_bean = sandesha2_create_seq_bean_create_with_data(env, rms_internal_sequence_id, 
-            (axis2_char_t*)axis2_msg_ctx_get_wsa_message_id(create_seq_msg, env), NULL);
+            create_seq_msg_id, NULL);
 
     sandesha2_create_seq_bean_set_ref_msg_store_key(create_seq_bean, env, create_sequence_msg_store_key);
     sandesha2_create_seq_mgr_insert(create_seq_mgr, env, create_seq_bean);
@@ -1948,6 +1939,10 @@
         axis2_engine_free(engine, env);
     }
 
+    updated_create_seq_bean = sandesha2_create_seq_mgr_retrieve(create_seq_mgr, env, create_seq_msg_id);
+    rms_internal_sequence_id = sandesha2_create_seq_bean_get_rms_internal_sequence_id(
+            updated_create_seq_bean, env);
+
     rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rms_internal_sequence_id, 
             SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
     create_seq_op = axis2_msg_ctx_get_op(create_seq_msg, env);
@@ -1973,6 +1968,10 @@
             break;
         }
 
+        updated_create_seq_bean = sandesha2_create_seq_mgr_retrieve(create_seq_mgr, env, create_seq_msg_id);
+        rms_internal_sequence_id = sandesha2_create_seq_bean_get_rms_internal_sequence_id(
+            updated_create_seq_bean, env);
+
         rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rms_internal_sequence_id, 
             SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
     }
@@ -1985,7 +1984,7 @@
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2]Exit:sandesha2_app_msg_processor_send_create_seq_msg");
-    return status;
+    return updated_create_seq_bean;
 }
 
 static axis2_bool_t AXIS2_CALL

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_msg_processor.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_msg_processor.c Tue Jun  3 09:28:54 2008
@@ -331,7 +331,7 @@
 
             create_seq_bean = sandesha2_create_seq_bean_create(env);
             sandesha2_create_seq_bean_set_rms_sequence_id(create_seq_bean, env, rms_sequence_id);
-            rms_internal_seq_id = sandesha2_utils_get_rms_internal_sequence_id(env, rmd_sequence_id);
+            rms_internal_seq_id = sandesha2_utils_get_rms_internal_sequence_id(env, AXIS2_TRUE, rmd_sequence_id);
             sandesha2_create_seq_bean_set_rms_internal_sequence_id(create_seq_bean, env, 
                     rms_internal_seq_id);
 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/create_seq_res_msg_processor.c Tue Jun  3 09:28:54 2008
@@ -156,6 +156,7 @@
     sandesha2_create_seq_mgr_t *create_seq_mgr = NULL;
     sandesha2_create_seq_bean_t *create_seq_bean = NULL;
     axis2_char_t *rms_internal_sequence_id = NULL;
+    axis2_char_t *prev_rms_internal_sequence_id = NULL;
     sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
     sandesha2_seq_property_bean_t *rms_sequence_bean = NULL;
     sandesha2_seq_property_bean_t *rms_internal_sequence_bean = NULL;
@@ -163,6 +164,7 @@
     axis2_op_ctx_t *op_ctx = NULL;
     axis2_bool_t polling_mode = AXIS2_FALSE;
     axis2_char_t *dbname = NULL;
+    axis2_bool_t is_svr_side = AXIS2_FALSE;
     
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Entry:sandesha2_create_seq_res_msg_processor_process_in_msg");
@@ -267,6 +269,38 @@
 
         return AXIS2_FAILURE;
     }
+    if(!is_svr_side)
+    {
+        axis2_char_t *new_rms_internal_sequence_id = NULL;
+        sandesha2_seq_property_bean_t *client_sequence_key_bean = NULL;
+        axis2_char_t *client_sequence_key = NULL;
+
+        client_sequence_key_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
+                rms_internal_sequence_id, SANDESHA2_CLIENT_SEQ_KEY);
+
+        client_sequence_key = axutil_strdup(env, sandesha2_seq_property_bean_get_value(
+                    client_sequence_key_bean, env));
+
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "client_sequence_key:%s", client_sequence_key);
+        sandesha2_seq_property_mgr_remove(seq_prop_mgr, env, rms_internal_sequence_id, 
+                SANDESHA2_CLIENT_SEQ_KEY);
+
+        sandesha2_seq_property_bean_free(client_sequence_key_bean, env);
+
+        new_rms_internal_sequence_id = sandesha2_utils_get_rms_internal_sequence_id(env, is_svr_side, 
+                rms_sequence_id);
+
+        client_sequence_key_bean = sandesha2_seq_property_bean_create_with_data(env, 
+                client_sequence_key, SANDESHA2_CLIENT_SEQ_KEY, new_rms_internal_sequence_id);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "client_sequence_key2:%s", client_sequence_key);
+
+        sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, client_sequence_key_bean);
+        AXIS2_FREE(env->allocator, client_sequence_key);
+
+        prev_rms_internal_sequence_id = rms_internal_sequence_id;
+        rms_internal_sequence_id = new_rms_internal_sequence_id;
+        sandesha2_create_seq_bean_set_rms_internal_sequence_id(create_seq_bean, env, rms_internal_sequence_id);
+    }
 
     sandesha2_create_seq_bean_set_rms_sequence_id(create_seq_bean, env, rms_sequence_id);
     sandesha2_create_seq_mgr_update(create_seq_mgr, env, create_seq_bean);
@@ -304,7 +338,7 @@
         axis2_char_t *acks_to = NULL;
         
         next_msg_mgr = sandesha2_permanent_next_msg_mgr_create(env, dbname);
-        offerd_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rms_internal_sequence_id, 
+        offerd_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, prev_rms_internal_sequence_id, 
                 SANDESHA2_SEQ_PROP_OFFERED_SEQ);
 
         if(!offerd_seq_bean)
@@ -384,11 +418,11 @@
         
         acks_to = (axis2_char_t *) axis2_endpoint_ref_get_address(acks_to_epr, env);
         create_seq_rm_msg = sandesha2_msg_creator_create_create_seq_msg(env, rm_msg_ctx, 
-                rms_internal_sequence_id, acks_to, seq_prop_mgr);
+                prev_rms_internal_sequence_id, acks_to, seq_prop_mgr);
 
         if(!create_seq_rm_msg)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]create_seq_rm_msg is NULL");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] create_seq_rm_msg is NULL");
 
             if(seq_prop_mgr)
             {
@@ -420,7 +454,7 @@
 
         sandesha2_msg_ctx_set_flow(create_seq_rm_msg, env, SANDESHA2_MSG_CTX_OUT_FLOW);
         create_seq_msg = sandesha2_msg_ctx_get_msg_ctx(create_seq_rm_msg, env);
-        to_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, rms_internal_sequence_id, 
+        to_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, prev_rms_internal_sequence_id, 
                 SANDESHA2_SEQ_PROP_TO_EPR);
 
         if(to_seq_bean)

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/terminate_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/terminate_seq_msg_processor.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/terminate_seq_msg_processor.c Tue Jun  3 09:28:54 2008
@@ -371,6 +371,7 @@
     axis2_char_t *rec_side_int_seq_id = NULL;
     axis2_bool_t add_rec_side_term = AXIS2_FALSE;
     axis2_char_t *out_seq_id = NULL;
+    axis2_bool_t is_svr_side = AXIS2_FALSE;
     
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]Entry:sandesha2_"\
         "terminate_seq_msg_processor_setup_highest_msg_nums");
@@ -381,7 +382,8 @@
     AXIS2_PARAM_CHECK(env->error, sender_mgr, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
-    
+   
+    is_svr_side = sandesha2_msg_ctx_get_server_side(rm_msg_ctx, env);
     highest_in_msg_num_str = sandesha2_utils_get_seq_property(env, seq_id,
         SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, seq_prop_mgr);
     highest_in_msg_id = sandesha2_utils_get_seq_property(env, seq_id,
@@ -402,7 +404,7 @@
         if(highest_in_msg_num_str)
             AXIS2_FREE(env->allocator, highest_in_msg_num_str);
     }
-    rec_side_int_seq_id = sandesha2_utils_get_rms_internal_sequence_id(env, seq_id);
+    rec_side_int_seq_id = sandesha2_utils_get_rms_internal_sequence_id(env, is_svr_side, seq_id);
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]rec_side_int_seq_id:%s", 
         rec_side_int_seq_id);
     if(0 == highest_in_msg_num)

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/Makefile.am?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/Makefile.am (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/Makefile.am Tue Jun  3 09:28:54 2008
@@ -1,2 +1 @@
 SUBDIRS = beans $(WRAPPER_DIR) common
-EXTRA_DIST=mysql

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/sqlite/permanent_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/sqlite/permanent_seq_property_mgr.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/sqlite/permanent_seq_property_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/storage/sqlite/permanent_seq_property_mgr.c Tue Jun  3 09:28:54 2008
@@ -241,9 +241,11 @@
 	axis2_char_t *name = NULL;
 	axis2_char_t *value = NULL;
 
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_insert");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] Entry:sandesha2_permanent_seq_property_mgr_insert");
+
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
+
 	id = sandesha2_permanent_seq_property_mgr_get_id_with_bean(env, bean);
 	seq_id = sandesha2_seq_property_bean_get_seq_id(bean, env);
 	name = sandesha2_seq_property_bean_get_name(bean, env);
@@ -257,8 +259,15 @@
         AXIS2_FREE(env->allocator, id);
     ret = sandesha2_permanent_bean_mgr_insert(seq_prop_mgr_impl->bean_mgr, env, 
         sql_insert);
+
+    /*if(bean)
+    {
+        sandesha2_seq_property_bean_free(bean, env);
+    }*/
+
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_insert");
+
     return ret;
 }
 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/fault_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/fault_mgr.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/fault_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/fault_mgr.c Tue Jun  3 09:28:54 2008
@@ -207,6 +207,7 @@
         if(list)
         {
             int size = axutil_array_list_size(list, env);
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_size:%d", size);
             int i = 0;
 			for(i = 0; i < size; i++)
             {

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/msg_creator.c Tue Jun  3 09:28:54 2008
@@ -194,7 +194,7 @@
     {
         axis2_endpoint_ref_t *reply_to_epr = NULL;
 
-        reply_to_epr = axis2_endpoint_ref_create(env, axis2_endpoint_ref_get_address(temp_to, env));
+        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);
     }
     create_seq_rm_msg = sandesha2_msg_ctx_create(env, create_seq_msg_ctx);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/sandesha2_utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/sandesha2_utils.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/sandesha2_utils.c Tue Jun  3 09:28:54 2008
@@ -401,11 +401,22 @@
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 sandesha2_utils_get_rms_internal_sequence_id(
     const axutil_env_t *env,
-    axis2_char_t *rmd_sequence_id)
+    axis2_bool_t svr_side,
+    axis2_char_t *sequence_id)
 {
-    AXIS2_PARAM_CHECK(env->error, rmd_sequence_id, NULL);
+    axis2_char_t *internal_sequence_id = NULL;
+    AXIS2_PARAM_CHECK(env->error, sequence_id, NULL);
     
-    return axutil_strcat(env, SANDESHA2_INTERNAL_SEQ_PREFIX, ":", rmd_sequence_id, NULL);
+    if(svr_side)
+    {
+        internal_sequence_id = axutil_strcat(env, SANDESHA2_INTERNAL_SERVER_SEQUENCE_PREFIX, ":", sequence_id, NULL);
+    }
+    else
+    {
+        internal_sequence_id = axutil_strcat(env, SANDESHA2_INTERNAL_CLIENT_SEQUENCE_PREFIX, ":", sequence_id, NULL);
+    }
+    
+    return internal_sequence_id;
 }
 
 AXIS2_EXTERN axis2_transport_out_desc_t* AXIS2_CALL
@@ -1272,8 +1283,8 @@
         AXIS2_FREE(env->allocator, msg_uuid);
         msg_uuid = NULL;
     }
-    reply_to = axis2_msg_info_headers_get_reply_to(old_msg_info_headers, env);
-    axis2_msg_info_headers_set_to(msg_info_headers, env, reply_to);
+    reply_to = axis2_msg_ctx_get_reply_to(in_msg_ctx, env);
+    axis2_msg_ctx_set_to(new_msg_ctx, env, reply_to);
 
     fault_to = axis2_msg_info_headers_get_fault_to(old_msg_info_headers, env);
     axis2_msg_info_headers_set_fault_to(msg_info_headers, env, fault_to);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c Tue Jun  3 09:28:54 2008
@@ -77,10 +77,13 @@
     axis2_char_t *address = NULL;
     axis2_char_t *reply_to_addr = NULL;
     axis2_char_t *rms_internal_sequence_id = NULL;
+    axis2_bool_t is_svr_side = AXIS2_FALSE;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]Entry:sandesha2_seq_mgr_setup_new_rmd_sequence");
 
+    is_svr_side = sandesha2_msg_ctx_get_server_side(create_seq_msg, env);
     rmd_sequence_id = axutil_uuid_gen(env);
+
     to = sandesha2_msg_ctx_get_to(create_seq_msg, env);
     if(!to)
     {
@@ -151,7 +154,7 @@
 
     next_msg_bean = sandesha2_next_msg_bean_create_with_data(env, rmd_sequence_id, 1); 
                                                     /* 1 will be the next */
-    rms_internal_sequence_id = sandesha2_utils_get_rms_internal_sequence_id(env, rmd_sequence_id);
+    rms_internal_sequence_id = sandesha2_utils_get_rms_internal_sequence_id(env, is_svr_side, rmd_sequence_id);
     sandesha2_next_msg_bean_set_internal_seq_id(next_msg_bean, env, rms_internal_sequence_id);
     sandesha2_next_msg_mgr_insert(next_msg_mgr, env, next_msg_bean);
 
@@ -506,12 +509,14 @@
     axis2_msg_ctx_t *first_app_msg,
     axis2_char_t *rms_internal_sequence_id,
     axis2_char_t *spec_version,
+    axis2_char_t *client_sequence_key,
     sandesha2_seq_property_mgr_t *seq_prop_mgr)
 {
     axis2_char_t *addr_ns_val = NULL;
     axutil_property_t *property = NULL;
     sandesha2_seq_property_bean_t *addr_ns_bean = NULL;
     sandesha2_seq_property_bean_t *spec_version_bean = NULL;
+    sandesha2_seq_property_bean_t *client_sequence_key_bean = NULL;
    
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Entry:sandesha2_seq_mgr_setup_temporary_rms_sequence");
 
@@ -559,6 +564,11 @@
 
     sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, spec_version_bean);
 
+    client_sequence_key_bean = sandesha2_seq_property_bean_create_with_data(env, rms_internal_sequence_id, 
+            SANDESHA2_CLIENT_SEQ_KEY, client_sequence_key);
+
+    sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, client_sequence_key_bean);
+
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Exit:sandesha2_seq_mgr_setup_temporary_rms_sequence");
 
     return AXIS2_SUCCESS;

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/terminate_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/terminate_mgr.c?rev=662832&r1=662831&r2=662832&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/terminate_mgr.c Tue Jun  3 09:28:54 2008
@@ -994,15 +994,12 @@
             {
                 long retrans_delay = -1;
 
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came1*************************");
                 retrans_delay = sandesha2_property_bean_get_retrans_interval(property_bean, env); 
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "retrans_delay:%ld*************************", retrans_delay);
                 AXIS2_SLEEP(retrans_delay);
 
                 status = sandesha2_terminate_mgr_resend(env, conf_ctx, msg_id, is_svr_side, 
                         storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
 
-                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came2*************************");
                 if(AXIS2_SUCCESS != status)
                 {
                     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 



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