ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r595220 - in /webservices/sandesha/trunk/c: include/ src/handlers/ src/msgprocessors/ src/storage/sqlite/ src/workers/
Date Thu, 15 Nov 2007 06:38:52 GMT
Author: damitha
Date: Wed Nov 14 22:38:51 2007
New Revision: 595220

URL: http://svn.apache.org/viewvc?rev=595220&view=rev
Log:
changed LOG_DEBUG to LOG_TRACE for function entry/exit. Also changed BEGIN TRANSACTION to
BEGIN DEFFERRED TRANSACTION

Modified:
    webservices/sandesha/trunk/c/include/sandesha2_constants.h
    webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c
    webservices/sandesha/trunk/c/src/workers/sender.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?rev=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Wed Nov 14 22:38:51 2007
@@ -512,6 +512,7 @@
 	#define SANDESHA2_SENDER_SLEEP  "SenderSleepTime"
 	#define SANDESHA2_INVOKER_SLEEP  "InvokerSleepTime"
 	#define SANDESHA2_POLLING_WAIT  "PollingWaitTime"
+	#define SANDESHA2_MODULE  "sandesha2"
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c?rev=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Wed Nov 14 22:38:51
2007
@@ -93,10 +93,10 @@
     sandesha2_msg_processor_t *msg_processor = NULL;
     int msg_type = -1;
 
-    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  "[sandesha2] Start: sandesha2_out_handler_invoke");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2] Start: sandesha2_out_handler_invoke");
     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
     if(!conf_ctx)
     {
@@ -113,7 +113,7 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SVC_NULL, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
-    module_qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
+    module_qname = axutil_qname_create(env, SANDESHA2_MODULE, NULL, NULL);
     if(!axis2_svc_is_module_engaged(svc, env, module_qname))
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
@@ -134,8 +134,10 @@
         int size = -1, i = 0;
 		axis2_bool_t found = AXIS2_FALSE;
 		axutil_array_list_t *mod_qnames = NULL;
-        axutil_qname_t *mod_qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
-		mod_qnames = (axutil_array_list_t *)axis2_svc_get_all_module_qnames(svc, env);
+        axutil_qname_t *mod_qname = axutil_qname_create(env, SANDESHA2_MODULE, 
+            NULL, NULL);
+		mod_qnames = (axutil_array_list_t *)axis2_svc_get_all_module_qnames(svc, 
+            env);
         size = axutil_array_list_size(mod_qnames, env);
         
         for (i = 0; i < size; i++)
@@ -167,17 +169,17 @@
         return AXIS2_SUCCESS; 
     }
     temp_prop = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
-    axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_APPLICATION_PROCESSING_DONE, 
-            temp_prop);
+    axis2_msg_ctx_set_property(msg_ctx, env, 
+        SANDESHA2_APPLICATION_PROCESSING_DONE, temp_prop);
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
     temp_prop = axis2_msg_ctx_get_property(msg_ctx, env, 
-            SANDESHA2_WITHIN_TRANSACTION);
+        SANDESHA2_WITHIN_TRANSACTION);
     if(temp_prop)
         within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-                        temp_prop, env);
+            temp_prop, env);
     if(within_transaction_str && 0 == axutil_strcmp(AXIS2_VALUE_TRUE, 
-                within_transaction_str))
+        within_transaction_str))
     {
         within_transaction = AXIS2_TRUE;
     }
@@ -276,8 +278,8 @@
     if(temp_prop)
         axutil_property_set_value(temp_prop, env, axutil_strdup(
             env,AXIS2_VALUE_FALSE));
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Exit: "
-            "sandesha2_out_handler_invoke");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Exit: "\
+        "sandesha2_out_handler_invoke");
     return AXIS2_SUCCESS;
 }
 

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=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Wed Nov 14 22:38:51
2007
@@ -223,9 +223,8 @@
     axis2_op_t *op = NULL;
     int mep = -1;
    
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Start:sandesha2_app_msg_processor_process_in_msg");
  
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
@@ -616,7 +615,7 @@
         sandesha2_app_msg_processor_send_ack_if_reqd(env, rm_msg_ctx, msgs_str, 
             storage_mgr);
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Exit: sandesha2_app_msg_processor_process_in_msg");
 
     return AXIS2_SUCCESS;
@@ -658,9 +657,8 @@
     axis2_msg_ctx_t *req_msg_ctx = NULL;
     axis2_relates_to_t *relates_to = NULL;
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Start:sandesha2_app_msg_processor_process_out_msg");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
   
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
@@ -909,7 +907,7 @@
     }
     if(!spec_ver)
         spec_ver = sandesha2_spec_specific_consts_get_default_spec_version(env);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Spec version:%s", spec_ver);
+    AXIS2_LOG_INFO(env->log, "Spec version:%s", spec_ver);
     if(1 == msg_number)
     {
         if(!out_seq_bean)
@@ -1041,7 +1039,7 @@
         sandesha2_app_msg_processor_process_response_msg(env, rm_msg_ctx, 
             internal_seq_id, out_seq_id, msg_number, storage_key, storage_mgr);
     axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);    
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Exit: sandesha2_app_msg_processor_process_out_msg");
     return AXIS2_SUCCESS;
 }
@@ -1081,9 +1079,8 @@
     axis2_msg_ctx_t *msg_ctx = NULL;
     axis2_bool_t sent = AXIS2_FALSE;
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] sandesha2_app_msg_processor_send_ack_if_reqd");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_str, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
@@ -1120,7 +1117,7 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SENDING_ACK, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] Exit:sandesha2_app_msg_processor_send_ack_if_reqd");
     return AXIS2_SUCCESS;
 }
@@ -1155,9 +1152,8 @@
     axis2_char_t *create_seq_msg_store_key = NULL;
     axis2_char_t *ref_msg_store_key = NULL;
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] sandesha2_app_msg_processor_add_create_seq_msg");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, acks_to, AXIS2_FAILURE);
@@ -1261,7 +1257,7 @@
             "[sandesha2]Engine Resume Send failed");
         return AXIS2_FAILURE;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] Exit:sandesha2_app_msg_processor_add_create_seq_msg");
     return AXIS2_SUCCESS;
 }
@@ -1303,9 +1299,8 @@
     axis2_bool_t last_msg = AXIS2_FALSE;
     axis2_op_ctx_t *temp_op_ctx = NULL;
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] sandesha2_app_msg_processor_process_response_msg");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_key, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
@@ -1526,7 +1521,7 @@
         axis2_msg_ctx_get_current_handler_index(app_msg_ctx, env) + 1);
     engine = axis2_engine_create(env, axis2_msg_ctx_get_conf_ctx(app_msg_ctx, 
         env));
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,   
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] Exit:sandesha2_app_msg_processor_process_response_msg");
     return axis2_engine_resume_send(engine, env, app_msg_ctx);
 }
@@ -1542,7 +1537,6 @@
     sandesha2_seq_property_bean_t *next_msg_no_bean = NULL;
     long next_msg_no = -1;
     
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
     
@@ -1574,9 +1568,8 @@
     axis2_bool_t update = AXIS2_TRUE;
     axis2_char_t str_long[32];
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Start:sandesha2_app_msg_processor_set_next_msg_no");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
     
@@ -1610,7 +1603,7 @@
     {
         sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, next_msg_no_bean);
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Exit:sandesha2_app_msg_processor_set_next_msg_no");
     return AXIS2_SUCCESS;
 }

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Wed Nov 14 22:38:51
2007
@@ -382,19 +382,6 @@
 
     axutil_thread_mutex_lock(storage_mgr_impl->mutex);
     axutil_allocator_switch_to_global_pool(env->allocator);
-    /*for (index = axutil_hash_first(storage_mgr_impl->transactions , env); index; 
-        index = axutil_hash_next(env, index))
-    {
-        void *v = NULL;
-        sandesha2_transaction_t *temp = NULL;
-        axutil_hash_this(index, NULL, NULL, &v);
-        temp = (sandesha2_transaction_t *) v;
-        while(sandesha2_permanent_transaction_is_active(temp, env))
-        {
-            AXIS2_SLEEP(1);
-        }
-
-    }*/
     thread_id_key = AXIS2_MALLOC(env->allocator, sizeof(char)*128);
     sprintf(thread_id_key, "%lu", thread_id); 
     transaction = (sandesha2_transaction_t *) axutil_hash_get(
@@ -1306,7 +1293,7 @@
     {
         axis2_module_desc_t *module_desc = NULL;
         axutil_qname_t *qname = NULL;
-        qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
+        qname = axutil_qname_create(env, SANDESHA2_MODULE, NULL, NULL);
         module_desc = axis2_conf_get_module(conf, env, qname);
         if(module_desc)
         {

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c?rev=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c Wed Nov 14 22:38:51
2007
@@ -125,7 +125,7 @@
     {
         axis2_module_desc_t *module_desc = NULL;
         axutil_qname_t *qname = NULL;
-        qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
+        qname = axutil_qname_create(env, SANDESHA2_MODULE, NULL, NULL);
         module_desc = axis2_conf_get_module(conf, env, qname);
         if(module_desc)
         {
@@ -162,11 +162,11 @@
         return NULL;
     }
     axutil_thread_mutex_lock(trans_impl->mutex);
-    rc = sqlite3_exec(trans_impl->dbconn, "BEGIN TRANSACTION;", 0, 0,
+    rc = sqlite3_exec(trans_impl->dbconn, "BEGIN DEFERRED TRANSACTION;", 0, 0,
         &error_msg);
     if(rc == SQLITE_BUSY)
         rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn, 
-            "BEGIN TRANSACTION", 0, 0, &error_msg, rc, trans_impl->mutex);
+            "BEGIN DEFERRED TRANSACTION;", 0, 0, &error_msg, rc, trans_impl->mutex);
     if(rc != SQLITE_OK )
     {
         axutil_thread_mutex_unlock(trans_impl->mutex);

Modified: webservices/sandesha/trunk/c/src/workers/sender.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender.c?rev=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender.c Wed Nov 14 22:38:51 2007
@@ -257,7 +257,7 @@
     env = axutil_init_thread_env(args->env);
     sender = args->impl;
     sender = (sandesha2_sender_t*)sender;
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Start:sandesha2_sender_worker_func");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Start:sandesha2_sender_worker_func");
     conf = axis2_conf_ctx_get_conf(sender->conf_ctx, env);
     storage_mgr = sandesha2_utils_get_storage_mgr(env, sender->conf_ctx, 
         conf);
@@ -289,9 +289,8 @@
         seq_id = axutil_array_list_get(sender->working_seqs, env, 
             sender->seq_index++);
 
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr,
-            env);
-        qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
+        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
+        qname = axutil_qname_create(env, SANDESHA2_MODULE, NULL, NULL);
         module_desc = axis2_conf_get_module(conf, env, qname);
         sleep_time_param = axis2_module_desc_get_param(module_desc, env, 
             SANDESHA2_SENDER_SLEEP);
@@ -335,7 +334,7 @@
             }
         }
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Exit:sandesha2_sender_worker_func");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:sandesha2_sender_worker_func");
     #ifdef AXIS2_SVR_MULTI_THREADED
         AXIS2_THREAD_POOL_EXIT_THREAD(env->thread_pool, thd);
     #endif

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=595220&r1=595219&r2=595220&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Wed Nov 14 22:38:51 2007
@@ -274,7 +274,8 @@
     msg_ctx = sender_worker->msg_ctx;
     transport_out = sender_worker->transport_out;
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Entry:sandesha2_sender_worker_worker_func\n");
       
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2] Entry:sandesha2_sender_worker_worker_func\n");        
     
     storage_mgr = sandesha2_utils_get_storage_mgr(env, 
         sender_worker->conf_ctx, 
@@ -284,7 +285,8 @@
     sender_worker_bean = sandesha2_sender_mgr_retrieve(sender_mgr, env, msg_id);
     if(!sender_worker_bean)
     {
-        AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, "[sandesha2] sender_worker_bean is NULL");
+        AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] sender_worker_bean is NULL");
         sandesha2_transaction_rollback(transaction, env);
         #ifdef AXIS2_SVR_MULTI_THREADED
             AXIS2_THREAD_POOL_EXIT_THREAD(env->thread_pool, thd);
@@ -535,7 +537,8 @@
     #ifdef AXIS2_SVR_MULTI_THREADED
         AXIS2_THREAD_POOL_EXIT_THREAD(env->thread_pool, thd);
     #endif
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Exit:sandesha2_sender_worker_worker_func\n");
       
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2] Exit:sandesha2_sender_worker_worker_func\n");        
     return NULL;
 }
 



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