ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r687973 - in /webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008: config/ include/ samples/RMSampleService/ samples/rm_echo_1_0/ src/msgprocessors/ src/polling/ src/storage/sqlite/ src/util/ src/workers/
Date Fri, 22 Aug 2008 06:44:49 GMT
Author: damitha
Date: Thu Aug 21 23:44:47 2008
New Revision: 687973

URL: http://svn.apache.org/viewvc?rev=687973&view=rev
Log:
Making interoperable with .net

Modified:
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/config/axis2.xml
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_ack_mgr.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_constants.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_seq_property_mgr.h
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/RMSampleService/services.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/ack_msg_processor.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/terminate_seq_msg_processor.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/polling/polling_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_create_seq_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_seq_property_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/fault_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/terminate_mgr.c
    webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/workers/sender_worker.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=687973&r1=687972&r2=687973&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
Thu Aug 21 23:44:47 2008
@@ -39,7 +39,7 @@
     <transportSender name="http" class="axis2_http_sender">
         <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
         <!--parameter name="Transfer-Encoding">chunked</parameter-->
-        <!--parameter name="PROXY" proxy_host="127.0.0.1" proxy_port="8080" locked="true"/-->
+        <parameter name="PROXY" proxy_host="127.0.0.1" proxy_port="8080" locked="true"/>
     </transportSender>
     
     <!--

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_ack_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_ack_mgr.h?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_ack_mgr.h
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_ack_mgr.h
Thu Aug 21 23:44:47 2008
@@ -74,6 +74,7 @@
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 sandesha2_ack_mgr_piggyback_acks_if_present(
     const axutil_env_t *env,
+    axis2_char_t *seq_id,
     sandesha2_msg_ctx_t *rm_msg_ctx,
     sandesha2_storage_mgr_t *storage_mgr,
     struct sandesha2_seq_property_mgr *seq_prop_mgr,

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_constants.h?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_constants.h
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_constants.h
Thu Aug 21 23:44:47 2008
@@ -292,6 +292,8 @@
     #define SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID "HighestInMsgId"
     
     #define SANDESHA2_SEQ_PROP_1_0_REPLAY "Replay1_0"
+    
+    #define SANDESHA2_SEQ_PROP_RELATED_MSG_ID "related_msg_id"
 	
 	/**
 	 * SOAP Versions

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_seq_property_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_seq_property_mgr.h?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_seq_property_mgr.h
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/include/sandesha2_seq_property_mgr.h
Thu Aug 21 23:44:47 2008
@@ -96,7 +96,6 @@
             retrieve_all)(
                 sandesha2_seq_property_mgr_t *seq_property,
                 const axutil_env_t *env);
-
 };
 
 AXIS2_DECLARE_DATA struct sandesha2_seq_property_mgr

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/RMSampleService/services.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/RMSampleService/services.xml?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/RMSampleService/services.xml
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/samples/RMSampleService/services.xml
Thu Aug 21 23:44:47 2008
@@ -1,5 +1,6 @@
 <service name="RMSampleService">
     <module ref="sandesha2"/>
+    <module ref="addressing"/>
     <parameter name="ServiceClass" locked="xsd:false">RMSampleService</parameter>
 
    <description>

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=687973&r1=687972&r2=687973&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
Thu Aug 21 23:44:47 2008
@@ -180,6 +180,7 @@
         axis2_options_set_property(options, env, SANDESHA2_CLIENT_SEQ_KEY, 
             property);
     }
+
     for(i = 1; i < 3; i++)
     {
         axis2_char_t echo_str[7];
@@ -192,6 +193,7 @@
         wait_on_callback(env, callback1);
         AXIS2_SLEEP(1);
     }
+
     axis2_svc_client_remove_all_headers(svc_client, env);
     property = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
     axis2_options_set_property(options, env, "Sandesha2LastMessage", property);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/ack_msg_processor.c
Thu Aug 21 23:44:47 2008
@@ -229,13 +229,16 @@
     internal_sequence_id = sandesha2_utils_get_seq_property(env, rms_sequence_id, 
             SANDESHA2_SEQUENCE_PROPERTY_RMS_INTERNAL_SEQ_ID, seq_prop_mgr);
 
-    fault_msg_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env, rm_msg_ctx, rms_sequence_id,

-            seq_prop_mgr, create_seq_mgr, next_msg_mgr);
+    /*fault_msg_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env, rm_msg_ctx, rms_sequence_id,

+            seq_prop_mgr, create_seq_mgr, next_msg_mgr);*/
 
     if(fault_msg_ctx)
     {
         axis2_engine_t *engine = NULL;
 
+		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] sandesha2_ack_msg_processor_process_in_msg send Fault");
+
         engine = axis2_engine_create(env, conf_ctx);
         axis2_engine_send_fault(engine, env, sandesha2_msg_ctx_get_msg_ctx(fault_msg_ctx,
env));
         axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);
@@ -251,6 +254,8 @@
     {
         axis2_engine_t *engine = NULL;
 
+		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] sandesha2_ack_msg_processor_process_in_msg send Fault");
         engine = axis2_engine_create(env, conf_ctx);
         axis2_engine_send_fault(engine, env, sandesha2_msg_ctx_get_msg_ctx(fault_msg_ctx,
env));
         axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);

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=687973&r1=687972&r2=687973&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
Thu Aug 21 23:44:47 2008
@@ -1869,6 +1869,12 @@
      */
     if(!one_way)
     {
+        axis2_relates_to_t *relates_to = NULL;
+        const axis2_char_t *related_msg_id = NULL;
+        axis2_char_t *outgoing_seq_id = NULL;
+        sandesha2_seq_property_bean_t *relates_to_bean = NULL;
+        sandesha2_seq_property_bean_t *outgoing_seq_id_bean = NULL;
+
         rms_internal_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,

                 rmd_sequence_id, SANDESHA2_SEQUENCE_PROPERTY_RMS_INTERNAL_SEQ_ID);
       
@@ -1879,6 +1885,43 @@
 
         key = axutil_uuid_gen(env);
         ack_bean = sandesha2_sender_bean_create(env);
+
+        relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
+        if(relates_to)
+        {
+
+            related_msg_id = axis2_relates_to_get_value(relates_to, env);
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "related_msg_id:%s", related_msg_id);
+            relates_to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
+                    related_msg_id, SANDESHA2_SEQ_PROP_RELATED_MSG_ID);
+            if(relates_to_bean)
+            {
+
+                outgoing_seq_id = sandesha2_seq_property_bean_get_value(relates_to_bean,
env);
+
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "outgoing_seq_id:%s", outgoing_seq_id);
+                sandesha2_sender_bean_set_seq_id(ack_bean, env, outgoing_seq_id);
+                sandesha2_seq_property_mgr_remove(seq_prop_mgr, env, (axis2_char_t *) related_msg_id,

+                        SANDESHA2_SEQ_PROP_RELATED_MSG_ID);
+            }
+        }
+
+        if(!outgoing_seq_id)
+        {
+            axis2_char_t *outgoing_internal_seq_id = NULL;
+            axis2_char_t *outgoing_seq_id = NULL;
+
+            outgoing_internal_seq_id = sandesha2_utils_get_internal_sequence_id(env, rmd_sequence_id);
+            outgoing_seq_id_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
+                    outgoing_internal_seq_id, SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
+            if(outgoing_seq_id_bean)
+            {
+                outgoing_seq_id = sandesha2_seq_property_bean_get_value(outgoing_seq_id_bean,
env);
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "outgoing_seq_id:%s", outgoing_seq_id);
+                sandesha2_sender_bean_set_seq_id(ack_bean, env, outgoing_seq_id);
+            }
+        }
+
         sandesha2_sender_bean_set_msg_ctx_ref_key(ack_bean, env, key);
         /* We don't store the acknowledgment in memory. To indicate that it should be stored
only in the
          * database we pass AXIS2_FALSE as last argument. This measure is taken to avoid
memory corruption.
@@ -1889,11 +1932,21 @@
         sandesha2_sender_bean_set_msg_id(ack_bean, env, sandesha2_msg_ctx_get_msg_id(ack_rm_msg_ctx,
env));
         sandesha2_sender_bean_set_send(ack_bean, env, AXIS2_TRUE);
         sandesha2_sender_bean_set_internal_seq_id(ack_bean, env, internal_sequence_id);
-        sandesha2_sender_bean_set_seq_id(ack_bean, env, rmd_sequence_id);
+        /*sandesha2_sender_bean_set_seq_id(ack_bean, env, rmd_sequence_id);*/
         sandesha2_sender_bean_set_msg_type(ack_bean, env, SANDESHA2_MSG_TYPE_ACK);
         sandesha2_sender_bean_set_resend(ack_bean, env, AXIS2_FALSE);
         sandesha2_sender_mgr_insert(sender_mgr, env, ack_bean);
 
+        if(relates_to_bean)
+        {
+            sandesha2_seq_property_bean_free(relates_to_bean, env);
+        }
+        
+        if(outgoing_seq_id_bean)
+        {
+            sandesha2_seq_property_bean_free(outgoing_seq_id_bean, env);
+        }
+
         if(rms_internal_sequence_bean)
         {
             sandesha2_seq_property_bean_free(rms_internal_sequence_bean, env);
@@ -2369,6 +2422,8 @@
     create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
     sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
 
+    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);
 
@@ -2376,9 +2431,8 @@
     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)
+    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);
@@ -2980,8 +3034,8 @@
 
     if(!sandesha2_util_is_ack_already_piggybacked(env, rm_msg_ctx))
     {
-        sandesha2_ack_mgr_piggyback_acks_if_present(env, rm_msg_ctx, storage_mgr, seq_prop_mgr,

-                sender_mgr);
+        sandesha2_ack_mgr_piggyback_acks_if_present(env, rms_sequence_id, rm_msg_ctx, storage_mgr,

+                seq_prop_mgr, sender_mgr);
     }
 
     if(!is_svr_side && (!reply_to_addr || sandesha2_utils_is_rm_1_0_anonymous_acks_to(env,
rm_version, reply_to_addr)))
@@ -3143,6 +3197,16 @@
     }
     else
     {
+        sandesha2_seq_property_bean_t *relates_to_bean = NULL;
+
+        relates_to_bean = sandesha2_seq_property_bean_create_with_data(env, msg_id, 
+                SANDESHA2_SEQ_PROP_RELATED_MSG_ID, rms_sequence_id);
+        if(relates_to_bean)
+        {
+            sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, relates_to_bean);
+            sandesha2_seq_property_bean_free(relates_to_bean, env);
+        }
+
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came3");
         axis2_msg_ctx_increment_ref(app_msg_ctx, env);
         engine = axis2_engine_create(env, conf_ctx);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/terminate_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/terminate_seq_msg_processor.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/terminate_seq_msg_processor.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/msgprocessors/terminate_seq_msg_processor.c
Thu Aug 21 23:44:47 2008
@@ -885,8 +885,8 @@
 
     if(!sandesha2_util_is_ack_already_piggybacked(env, rm_msg_ctx))
     {
-        sandesha2_ack_mgr_piggyback_acks_if_present(env, rm_msg_ctx, storage_mgr, seq_prop_mgr,

-                sender_mgr);
+        sandesha2_ack_mgr_piggyback_acks_if_present(env, out_seq_id, rm_msg_ctx, storage_mgr,

+                seq_prop_mgr, sender_mgr);
     }
 
     /*key = axutil_uuid_gen(env);

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/polling/polling_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/polling/polling_mgr.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/polling/polling_mgr.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/polling/polling_mgr.c
Thu Aug 21 23:44:47 2008
@@ -222,7 +222,6 @@
         /*status = sandesha2_utils_execute_and_store(env, make_conn_rm_msg_ctx, 
             make_conn_msg_store_key);*/
 
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came10");
         status = axis2_engine_send(engine, env, make_conn_msg_ctx);
 
         if(AXIS2_SUCCESS != status)

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_create_seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_create_seq_mgr.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_create_seq_mgr.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_create_seq_mgr.c
Thu Aug 21 23:44:47 2008
@@ -194,7 +194,7 @@
     sandesha2_permanent_create_seq_mgr_retrieve,
     sandesha2_permanent_create_seq_mgr_update,
     sandesha2_permanent_create_seq_mgr_find,
-    sandesha2_permanent_create_seq_mgr_find_unique,
+    sandesha2_permanent_create_seq_mgr_find_unique
 };
 
 AXIS2_EXTERN sandesha2_create_seq_mgr_t * AXIS2_CALL

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=687973&r1=687972&r2=687973&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
Thu Aug 21 23:44:47 2008
@@ -226,7 +226,7 @@
     sandesha2_permanent_sender_mgr_find_by_sender_bean,
     sandesha2_permanent_sender_mgr_find_unique,
     sandesha2_permanent_sender_mgr_get_application_msg_to_send,
-    sandesha2_permanent_sender_mgr_get_next_msg_to_send,
+    sandesha2_permanent_sender_mgr_get_next_msg_to_send
 };
 
 AXIS2_EXTERN sandesha2_sender_mgr_t * AXIS2_CALL
@@ -447,6 +447,7 @@
     axis2_char_t *msg_id = NULL;
 	axis2_char_t *msg_ctx_ref_key = NULL;
 	axis2_char_t *internal_seq_id = NULL;
+	axis2_char_t *seq_id = NULL;
 	long msg_no = 0;
 	axis2_bool_t send = AXIS2_FALSE;
 	long time_to_send = 0;
@@ -463,6 +464,7 @@
             env);
         msg_ctx_ref_key = sandesha2_sender_bean_get_msg_ctx_ref_key(bean, env);
         internal_seq_id = sandesha2_sender_bean_get_internal_seq_id(bean, env);
+        seq_id = sandesha2_sender_bean_get_seq_id(bean, env);
         msg_no = sandesha2_sender_bean_get_msg_no(bean, env);
         send = sandesha2_sender_bean_is_send(bean, env);
         time_to_send = sandesha2_sender_bean_get_time_to_send(bean, env);
@@ -501,6 +503,7 @@
             sprintf(sql_find + axutil_strlen(sql_find),
                 " and msg_id = '%s'", msg_id);
     }
+
     if(internal_seq_id)
     {
         if(!add_where)
@@ -516,6 +519,19 @@
         }
     }
     
+    if(seq_id)
+    {
+        if(!add_where)
+        {
+            add_where = AXIS2_TRUE;
+            sprintf(sql_find + axutil_strlen(sql_find), " where seq_id = '%s'", seq_id);
+        }
+        else
+        {
+            sprintf(sql_find + axutil_strlen(sql_find), " and seq_id = '%s'", seq_id);
+        }
+    }
+
     if(msg_no > 0)
     {
         if(!add_where)

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_seq_property_mgr.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_seq_property_mgr.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/storage/sqlite/permanent_seq_property_mgr.c
Thu Aug 21 23:44:47 2008
@@ -183,7 +183,7 @@
     sandesha2_permanent_seq_property_mgr_update,
     sandesha2_permanent_seq_property_mgr_find,
     sandesha2_permanent_seq_property_mgr_find_unique,
-    sandesha2_permanent_seq_property_mgr_retrieve_all,
+    sandesha2_permanent_seq_property_mgr_retrieve_all
 };
 
 AXIS2_EXTERN sandesha2_seq_property_mgr_t * AXIS2_CALL

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
Thu Aug 21 23:44:47 2008
@@ -266,6 +266,7 @@
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 sandesha2_ack_mgr_piggyback_acks_if_present(
     const axutil_env_t *env,
+    axis2_char_t *seq_id,
     sandesha2_msg_ctx_t *target_rm_msg_ctx,
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
@@ -283,9 +284,11 @@
     
     target_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(target_rm_msg_ctx, env);
     conf_ctx = axis2_msg_ctx_get_conf_ctx(target_msg_ctx, env);
-    
+
     find_bean = sandesha2_sender_bean_create(env);
     sandesha2_sender_bean_set_msg_type(find_bean, env, SANDESHA2_MSG_TYPE_ACK);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_seq_id:%s", seq_id);
+    sandesha2_sender_bean_set_seq_id(find_bean, env, seq_id);
     sandesha2_sender_bean_set_send(find_bean, env, AXIS2_TRUE);
     sandesha2_sender_bean_set_resend(find_bean, env, AXIS2_FALSE);
 

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/fault_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/fault_mgr.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/fault_mgr.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/fault_mgr.c
Thu Aug 21 23:44:47 2008
@@ -166,43 +166,56 @@
 {
     int type = -1;
     axis2_bool_t valid_seq = AXIS2_TRUE;
-    
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] sandesha2_fault_mgr_check_for_unknown_seq");
+
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, NULL);
     AXIS2_PARAM_CHECK(env->error, seq_prop_mgr, NULL);
     AXIS2_PARAM_CHECK(env->error, create_seq_mgr, NULL);
     AXIS2_PARAM_CHECK(env->error, seq_id, NULL);
     
     type = sandesha2_msg_ctx_get_msg_type(rm_msg_ctx, env);
-    if(SANDESHA2_MSG_TYPE_ACK == type || 
-        SANDESHA2_MSG_TYPE_CREATE_SEQ_RESPONSE == type ||
-        SANDESHA2_MSG_TYPE_TERMINATE_SEQ_RESPONSE == type ||
+    if(SANDESHA2_MSG_TYPE_ACK == type || SANDESHA2_MSG_TYPE_CREATE_SEQ_RESPONSE == type ||
+        SANDESHA2_MSG_TYPE_TERMINATE_SEQ_RESPONSE == type || 
         SANDESHA2_MSG_TYPE_CLOSE_SEQ_RESPONSE == type)
     {
         sandesha2_create_seq_bean_t *find_bean = NULL;
         axutil_array_list_t *list = NULL;
+
         find_bean = sandesha2_create_seq_bean_create(env);
         sandesha2_create_seq_bean_set_rms_sequence_id(find_bean, env, seq_id);
-        list = sandesha2_create_seq_mgr_find(create_seq_mgr, env, 
-                        find_bean);
+        list = sandesha2_create_seq_mgr_find(create_seq_mgr, env, find_bean);
         if(find_bean)
+        {
             sandesha2_create_seq_bean_free(find_bean, env);
+        }
+
         if(list)
         {
             int i = 0, size = 0;
             size = axutil_array_list_size(list, env);
             if(0 == size)
+            {
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Not a valid sequence
message");
                 valid_seq = AXIS2_FALSE;
+            }
+
             for(i = 0; i < size; i++)
             {
-                sandesha2_create_seq_bean_t *create_seq_bean = 
-                    axutil_array_list_get(list, env, i);
+                sandesha2_create_seq_bean_t *create_seq_bean = axutil_array_list_get(list,
env, i);
                 if(create_seq_bean)
+                {
                     sandesha2_create_seq_bean_free(create_seq_bean, env);
+                }
             }
+
             axutil_array_list_free(list, env);
         }
         else
+        {
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Not a valid sequence
message");
             valid_seq = AXIS2_FALSE;        
+        }
     }
     else
     {
@@ -220,33 +233,50 @@
                 axis2_char_t *tmp_id = NULL;
                 
                 next_bean = axutil_array_list_get(list, env, i);
-                tmp_id = sandesha2_next_msg_bean_get_seq_id(
-                    next_bean, env);
+                tmp_id = sandesha2_next_msg_bean_get_seq_id(next_bean, env);
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] tmp_sequence_id:%s",
tmp_id);
+                AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] sequence_id:%s",
seq_id);
                 if(contains)
                 {
                     if(next_bean)
+                    {
                         sandesha2_next_msg_bean_free(next_bean, env);
+                    }
+
                     continue;
                 }
-                if(0 == axutil_strcmp(seq_id, tmp_id))
+                if(!axutil_strcmp(seq_id, tmp_id))
                 {
                     if(next_bean)
+                    {
                         sandesha2_next_msg_bean_free(next_bean, env);
+                    }
+
                     contains = AXIS2_TRUE;
                 }
                 else
                 {
                     if(next_bean)
+                    {
                         sandesha2_next_msg_bean_free(next_bean, env);
+                    }
                 }
             }
+
             axutil_array_list_free(list, env);
         }
+
         if(contains)
+        {
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Not a valid sequence
message");
             valid_seq = AXIS2_TRUE;
+        }
         else
+        {
             valid_seq = AXIS2_FALSE;
+        }
     }
+
     if(!valid_seq)
     {
         sandesha2_fault_data_t *fault_data = NULL;
@@ -259,25 +289,33 @@
         rm_ns_val = sandesha2_msg_ctx_get_rm_ns_val(rm_msg_ctx, env);
         if(SANDESHA2_SOAP_VERSION_1_1 == sandesha2_utils_get_soap_version(env, 
                         sandesha2_msg_ctx_get_soap_envelope(rm_msg_ctx, env)))
-            sandesha2_fault_data_set_code(fault_data, env, 
-                        AXIOM_SOAP11_FAULT_CODE_SENDER);
+        {
+            sandesha2_fault_data_set_code(fault_data, env, AXIOM_SOAP11_FAULT_CODE_SENDER);
+        }
         else
-            sandesha2_fault_data_set_code(fault_data, env, 
-                        AXIOM_SOAP12_FAULT_CODE_SENDER);
-        sandesha2_fault_data_set_sub_code(fault_data, env, 
-                        SANDESHA2_SOAP_FAULT_SUBCODE_UNKNOWN_SEQ);
+        {
+            sandesha2_fault_data_set_code(fault_data, env, AXIOM_SOAP12_FAULT_CODE_SENDER);
+        }
+
+        sandesha2_fault_data_set_sub_code(fault_data, env, SANDESHA2_SOAP_FAULT_SUBCODE_UNKNOWN_SEQ);
         qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_IDENTIFIER,
                         rm_ns_val, SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
-        detail_ele = axiom_element_create_with_qname(env, NULL, qname, 
-                        &detail_node);
+        detail_ele = axiom_element_create_with_qname(env, NULL, qname, &detail_node);
         if(qname)
+        {
             axutil_qname_free(qname, env);
+        }
+
         sandesha2_fault_data_set_detail(fault_data, env, detail_node);
-        sandesha2_fault_data_set_reason(fault_data, env, "A sequence with the" \
-                        " given sequenceID has NOT been established");
+        sandesha2_fault_data_set_reason(fault_data, env, 
+                "A sequence with the given sequenceID has NOT been established");
+
         return sandesha2_fault_mgr_get_fault(env, rm_msg_ctx, fault_data,
             sandesha2_msg_ctx_get_addr_ns_val(rm_msg_ctx, env), seq_prop_mgr);
     }
+    
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] sandesha2_fault_mgr_check_for_unknown_seq");
+
     return NULL;
 }
 

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=687973&r1=687972&r2=687973&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
Thu Aug 21 23:44:47 2008
@@ -991,8 +991,8 @@
         }
 
         /* Clean sending side data */
-        sandesha2_terminate_mgr_terminate_sending_side(env, conf_ctx, internal_sequence_id,

-                is_svr_side, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+        /*sandesha2_terminate_mgr_terminate_sending_side(env, conf_ctx, internal_sequence_id,

+                is_svr_side, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);*/
         terminate_added = sandesha2_seq_property_bean_create(env);
 
         if(terminate_added)
@@ -1078,8 +1078,8 @@
 
     if(!sandesha2_util_is_ack_already_piggybacked(env, terminate_rm_msg_ctx))
     {
-        sandesha2_ack_mgr_piggyback_acks_if_present(env, terminate_rm_msg_ctx, storage_mgr,

-                seq_prop_mgr, sender_mgr);
+        sandesha2_ack_mgr_piggyback_acks_if_present(env, rms_sequence_id, terminate_rm_msg_ctx,

+                storage_mgr, seq_prop_mgr, sender_mgr);
     }
 
     is_svr_side = sandesha2_msg_ctx_get_server_side(ack_rm_msg_ctx, env); /* Do we need this?:damitha
*/
@@ -1196,8 +1196,8 @@
         sandesha2_sender_bean_free(terminate_sender_bean, env);
     }
 
-    sandesha2_terminate_mgr_terminate_sending_side(env, conf_ctx, internal_sequence_id, is_svr_side,

-            storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+    /*sandesha2_terminate_mgr_terminate_sending_side(env, conf_ctx, internal_sequence_id,
is_svr_side, 
+            storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);*/
 
     terminate_added = sandesha2_seq_property_bean_create(env);
     if(terminate_added)

Modified: webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/workers/sender_worker.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/workers/sender_worker.c?rev=687973&r1=687972&r2=687973&view=diff
==============================================================================
--- webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/workers/sender_worker.c
(original)
+++ webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/workers/sender_worker.c
Thu Aug 21 23:44:47 2008
@@ -322,7 +322,7 @@
         sandesha2_sender_worker_is_ack_already_piggybacked(sender_worker, env,
         rm_msg_ctx))
     {
-        sandesha2_ack_mgr_piggyback_acks_if_present(env, rm_msg_ctx,
+        sandesha2_ack_mgr_piggyback_acks_if_present(env, NULL, rm_msg_ctx,
             storage_mgr, seq_prop_mgr, sender_mgr);
     }
     



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


Mime
View raw message