ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r602299 - in /webservices/sandesha/trunk/c/src: msgprocessors/ storage/sqlite/ util/ workers/
Date Sat, 08 Dec 2007 02:14:09 GMT
Author: damitha
Date: Fri Dec  7 18:14:08 2007
New Revision: 602299

URL: http://svn.apache.org/viewvc?rev=602299&view=rev
Log:

Now two way messages are working for RM1.0 with sqlite, when used a single database for both
server and client side.

Modified:
    webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
    webservices/sandesha/trunk/c/src/util/ack_mgr.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Fri Dec  7 18:14:08
2007
@@ -334,6 +334,7 @@
     {
         long highest_out_msg_no = 0;
         highest_out_msg_no = atol(last_out_msg_no_str);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "highest_out_msg_no:%ld", highest_out_msg_no);
         if(highest_out_msg_no > 0)
         {
             axis2_bool_t completed = AXIS2_FALSE;

Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Fri Dec  7 18:14:08
2007
@@ -1340,7 +1340,6 @@
         internal_seq_id, SANDESHA2_SEQ_PROP_REPLY_TO_EPR);
     out_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
         internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_internal_seq_id:%s", internal_seq_id);
 
     if (to_bean)
     {

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c Fri Dec  7 18:14:08
2007
@@ -983,14 +983,10 @@
         counter++;
         /* When this method is invoked, the mutex must have been locked,
            so unlock before going to sleep */
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came30");
         axutil_thread_mutex_unlock(mutex);
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came31");
         AXIS2_USLEEP(10000000);
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came32");
         /* Sleeping is over, lock again */
         axutil_thread_mutex_lock(mutex);
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came33");
         rc = sqlite3_exec(dbconn, sql_stmt, callback_func, args, error_msg);
     }
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c Fri Dec  7 18:14:08
2007
@@ -330,16 +330,19 @@
     axis2_char_t *msg_id)
 {
     axis2_char_t sql_remove[256];
+    axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Entry:sandesha2_permanent_sender_mgr_remove");
     AXIS2_PARAM_CHECK(env->error, msg_id, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
     sprintf(sql_remove, "delete from sender where msg_id='%s'", msg_id);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "sql_remove:%s", sql_remove);
+    ret = sandesha2_permanent_bean_mgr_remove(sender_mgr_impl->bean_mgr, env,
+        sql_remove);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Exit:sandesha2_permanent_sender_mgr_remove");
-    return sandesha2_permanent_bean_mgr_remove(sender_mgr_impl->bean_mgr, env,
-        sql_remove);
+    return ret;
 }
 
 sandesha2_sender_bean_t *AXIS2_CALL

Modified: webservices/sandesha/trunk/c/src/util/ack_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/ack_mgr.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Fri Dec  7 18:14:08 2007
@@ -430,13 +430,17 @@
             sandesha2_msg_ctx_t *ack_rm_msg = NULL;
             sandesha2_iom_rm_part_t *seq_ack = NULL;
             axis2_char_t *msg_ctx_ref_key = NULL;
+            axis2_endpoint_ref_t *to_ref = NULL;
             
             msg_ctx_ref_key = sandesha2_sender_bean_get_msg_ctx_ref_key(
                 sender_bean, env);
             msg_ctx1 = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env,
                 msg_ctx_ref_key, conf_ctx, AXIS2_FALSE);
-            to = (axis2_char_t*)axis2_endpoint_ref_get_address(
-                axis2_msg_ctx_get_to(msg_ctx1, env), env);
+            to_ref = axis2_msg_ctx_get_to(msg_ctx1, env);
+            if(to_ref)
+                to = (axis2_char_t*)axis2_endpoint_ref_get_address(to_ref, env);
+            else
+                continue;
             if(0 == axutil_strcmp(to, to_str))
                 continue; 
             sandesha2_sender_mgr_remove(retrans_mgr, env, 

Modified: webservices/sandesha/trunk/c/src/util/terminate_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/terminate_mgr.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Fri Dec  7 18:14:08 2007
@@ -525,6 +525,8 @@
     }
     internal_seq_id = sandesha2_utils_get_seq_property(env, seq_id, 
         SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID, storage_mgr);
+    if(!internal_seq_id)
+        internal_seq_id = seq_id;
     found_list = sandesha2_sender_mgr_find_by_internal_seq_id(retrans_mgr, env,
         internal_seq_id);
     if(found_list)
@@ -785,7 +787,7 @@
                             
     sandesha2_sender_bean_set_resend(terminate_bean, env, AXIS2_FALSE);
     retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
-    
+   
     sandesha2_sender_mgr_insert(retrans_mgr, env, terminate_bean);
     
     terminate_added = sandesha2_seq_property_bean_create(env);

Modified: webservices/sandesha/trunk/c/src/workers/sender_worker.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?rev=602299&r1=602298&r2=602299&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Fri Dec  7 18:14:08 2007
@@ -251,7 +251,6 @@
             "not present in the store");
         return AXIS2_FAILURE;
     }
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "came20");
     property = axis2_msg_ctx_get_property(msg_ctx, env, 
         SANDESHA2_WITHIN_TRANSACTION);
     if(property)
@@ -263,12 +262,9 @@
         axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_WITHIN_TRANSACTION,
             property);
     }
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "came21");
     continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env,
         sender_worker_bean, conf_ctx, storage_mgr);
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "came23");
     sandesha2_sender_mgr_update(sender_mgr, env, sender_worker_bean);
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "came24");
     if(!continue_sending)
     {
         status = AXIS2_FAILURE;



---------------------------------------------------------------------
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