ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r602009 - in /webservices/sandesha/trunk/c/src: storage/sqlite/permanent_bean_mgr.c util/msg_retrans_adjuster.c workers/sender_worker.c
Date Fri, 07 Dec 2007 07:03:41 GMT
Author: damitha
Date: Thu Dec  6 23:03:34 2007
New Revision: 602009

URL: http://svn.apache.org/viewvc?rev=602009&view=rev
Log:
updating busy handler sleep time

Modified:
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

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=602009&r1=602008&r2=602009&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 Thu Dec  6 23:03:34
2007
@@ -368,6 +368,8 @@
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Entry:sandesha2_permanent_bean_mgr_update");
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
     if(!bean_mgr_impl->dbconn)
         bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
@@ -392,6 +394,8 @@
         return AXIS2_FALSE;
     }
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Exit:sandesha2_permanent_bean_mgr_update");
     return AXIS2_TRUE;
 }
 
@@ -966,20 +970,27 @@
     axutil_thread_mutex_t *mutex)
 {
     int counter = 0;
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Entry:sandesha2_permanent_bean_mgr_busy_handler");
     while(rc == SQLITE_BUSY && counter < 10)
     {
         if(*error_msg)
              sqlite3_free(*error_msg);
         counter++;
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]In busy hander");
         /* 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_USLEEP(1000000000);
+        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, 
+        "[sandesha2]Exit:sandesha2_permanent_bean_mgr_busy_handler");
     return rc;
 }
 

Modified: webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c?rev=602009&r1=602008&r2=602009&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Thu Dec  6 23:03:34 2007
@@ -66,7 +66,8 @@
     axis2_bool_t seq_timed_out = AXIS2_FALSE;
     axis2_bool_t continue_sending = AXIS2_TRUE;
     
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Entry:sandesha2_msg_retrans_adjuster_adjust_retrans");
     AXIS2_PARAM_CHECK(env->error, retrans_bean, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FALSE);
@@ -109,6 +110,8 @@
             seq_id, msg_ctx, storage_mgr);
         continue_sending = AXIS2_FALSE;
     }
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Exit:sandesha2_msg_retrans_adjuster_adjust_retrans");
     return continue_sending;
 }
 
@@ -123,8 +126,9 @@
     long new_interval = -1;
     long new_time_to_send = 0;
     long time_now = -1;
-    
-    AXIS2_ENV_CHECK(env, NULL);
+   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Entry:sandesha2_msg_retrans_adjuster_adjust_next_retrans_time");
     AXIS2_PARAM_CHECK(env->error, retrans_bean, NULL);
     AXIS2_PARAM_CHECK(env->error, property_bean, NULL);
     
@@ -141,6 +145,8 @@
     
     new_time_to_send = time_now + new_interval;
     sandesha2_sender_bean_set_time_to_send(retrans_bean, env, new_time_to_send);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Exit:sandesha2_msg_retrans_adjuster_adjust_next_retrans_time");
     return retrans_bean;
 }
 
@@ -172,7 +178,6 @@
     axutil_property_t *new_property = NULL;
     
     
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, int_seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);

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=602009&r1=602008&r2=602009&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Thu Dec  6 23:03:34 2007
@@ -251,6 +251,7 @@
             "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)
@@ -262,9 +263,12 @@
         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