Author: damitha
Date: Wed Dec 12 07:59:27 2007
New Revision: 603651

URL: http://svn.apache.org/viewvc?rev=603651&view=rev
Log:
reduced sqlite busy handler wait time to 100000 micro seconds

Modified:
    webservices/sandesha/trunk/c/config/module.xml
    webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/util/ack_mgr.c

Modified: webservices/sandesha/trunk/c/config/module.xml
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?rev=603651&r1=603650&r2=603651&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Wed Dec 12 07:59:27 2007
@@ -77,7 +77,6 @@
    <!-- General parameters -->
     <parameter name="ExponentialBackoff" locked="false">AXIS2_FALSE</parameter>
     <parameter name="RetransmissionInterval" 
locked="false">4</parameter><!--In seconds-->
-    <parameter name="AcknowledgementInterval" 
locked="false">4</parameter><!--In seconds-->
     <parameter name="InactivityTimeout" locked="false">16</parameter><!--In 
seconds-->
     <parameter name="StorageManager" locked="false">persistent</parameter>
     <parameter name="InvokeInOrder" locked="false">AXIS2_FALSE</parameter>

Modified: webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c?rev=603651&r1=603650&r2=603651&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c Wed Dec 12 
07:59:27 2007
@@ -201,13 +201,13 @@
 
     wait_on_callback(env, callback);
 
-    payload = build_om_payload_for_echo_svc(env, "echo2", seq_key);
+    /*payload = build_om_payload_for_echo_svc(env, "echo2", seq_key);
     callback2 = axis2_callback_create(env);
     axis2_callback_set_on_complete(callback2, rm_echo_callback_on_complete);
     axis2_callback_set_on_error(callback2, rm_echo_callback_on_error);
     sandesha2_client_send_non_blocking(env, svc_client, options, NULL, 
         callback2, payload, listener_manager);
-    wait_on_callback(env, callback2);
+    wait_on_callback(env, callback2);*/
 
     AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
     callback3 = axis2_callback_create(env);
@@ -219,7 +219,7 @@
     AXIS2_FREE(env->allocator, seq_key);
     if (svc_client)
     {
-        /*axis2_svc_client_free(svc_client, env);*/
+        axis2_svc_client_free(svc_client, env);
         svc_client = NULL;
     }
     

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=603651&r1=603650&r2=603651&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 Wed 
Dec 12 07:59:27 2007
@@ -982,7 +982,7 @@
         /* When this method is invoked, the mutex must have been locked,
            so unlock before going to sleep */
         axutil_thread_mutex_unlock(mutex);
-        AXIS2_USLEEP(10000000);
+        AXIS2_USLEEP(100000);
         /* Sleeping is over, lock again */
         axutil_thread_mutex_lock(mutex);
         rc = sqlite3_exec(dbconn, sql_stmt, callback_func, args, error_msg);

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=603651&r1=603650&r2=603651&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Wed Dec 12 07:59:27 2007
@@ -55,8 +55,8 @@
     axutil_property_t *property = NULL;
     sandesha2_msg_ctx_t *ack_rm_msg = NULL;
     axiom_soap_envelope_t *soap_env = NULL;
+    axis2_op_ctx_t *op_ctx = NULL;
     
-    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, seq_id, NULL);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, NULL);
     
@@ -136,121 +136,22 @@
             axis2_msg_ctx_set_property(ack_msg_ctx, env, AXIS2_WSA_VERSION, 
property);
         }
     }
-    if(sandesha2_utils_is_anon_uri(env, acks_to_str))
+    op_ctx = axis2_msg_ctx_get_op_ctx(ref_msg, env);
+    if(!op_ctx)
     {
-        axis2_op_ctx_t *op_ctx = NULL;
-
-        op_ctx = axis2_msg_ctx_get_op_ctx(ref_msg, env);
-        if(!op_ctx)
-        {
-            axis2_op_t *op = axis2_op_create(env);
-            axis2_op_set_msg_exchange_pattern(op, env, AXIS2_MEP_URI_IN_OUT);
-            op_ctx = axis2_op_ctx_create(env, op, NULL);
-            axis2_msg_ctx_set_op(ref_msg, env, op);
-            axis2_msg_ctx_set_op_ctx(ref_msg, env, op_ctx);            
-        }
-        axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
-        
-        property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-            AXIS2_FALSE, 0, AXIS2_VALUE_TRUE);
-        axis2_msg_ctx_set_property(ref_msg, env, SANDESHA2_ACK_WRITTEN, 
property);
-        axis2_msg_ctx_set_server_side(ack_msg_ctx, env, AXIS2_TRUE);
-        return ack_rm_msg;
-    }
-    else
-    {
-        sandesha2_sender_mgr_t *retrans_mgr = NULL;
-        sandesha2_sender_bean_t *ack_bean = NULL;
-        sandesha2_sender_bean_t *find_bean = NULL;
-        axis2_char_t *key = NULL;
-        sandesha2_property_bean_t *ack_int_bean = NULL;
-        long ack_interval = -1;
-        long time_to_send = -1;
-        axutil_array_list_t *bean_list = NULL;
-        int i = 0;
-        axis2_transport_out_desc_t *orig_trans_out = NULL;
-        axis2_transport_out_desc_t *trans_out = NULL;
-        sandesha2_msg_ctx_t *ret_rm_msg = NULL;
-        
-        retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
-        key = axutil_uuid_gen(env);
-        ack_bean = sandesha2_sender_bean_create(env);
-        sandesha2_sender_bean_set_msg_ctx_ref_key(ack_bean, env, key);
-        sandesha2_sender_bean_set_msg_id(ack_bean, env, 
-            (axis2_char_t*)axis2_msg_ctx_get_wsa_message_id(
-                ack_msg_ctx, env));
-        sandesha2_sender_bean_set_resend(ack_bean, env, AXIS2_FALSE);
-        sandesha2_sender_bean_set_seq_id(ack_bean, env, seq_id);
-        sandesha2_sender_bean_set_internal_seq_id(ack_bean, env, seq_id);
-        sandesha2_sender_bean_set_send(ack_bean, env, AXIS2_TRUE);
-        property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-            AXIS2_FALSE, 0, AXIS2_VALUE_FALSE);
-        axis2_msg_ctx_set_property(ack_msg_ctx, env, 
-            SANDESHA2_QUALIFIED_FOR_SENDING, property);
-        sandesha2_sender_bean_set_msg_type(ack_bean, env, 
-            SANDESHA2_MSG_TYPE_ACK);
-
-        /* Avoid retrieving property bean from operation until it is availbale 
*/
-        /*ack_int_bean = sandesha2_utils_get_property_bean_from_op(env,
-            axis2_msg_ctx_get_op(ref_msg, env));*/
-        ack_int_bean = sandesha2_utils_get_property_bean(env,
-            axis2_conf_ctx_get_conf(conf_ctx, env));
-        ack_interval = sandesha2_property_bean_get_ack_interval(ack_int_bean, 
-            env);
-        time_to_send = sandesha2_utils_get_current_time_in_millis(env) + 
-            ack_interval;
-        find_bean = sandesha2_sender_bean_create(env);
-        sandesha2_sender_bean_set_msg_type(find_bean, env, 
-            SANDESHA2_MSG_TYPE_ACK);
-        sandesha2_sender_bean_set_send(find_bean, env, AXIS2_TRUE);
-        sandesha2_sender_bean_set_resend(find_bean, env, AXIS2_FALSE);
-        bean_list = sandesha2_sender_mgr_find_by_sender_bean(retrans_mgr, env, 
-            find_bean);
-        
-        for(i = 0; i < axutil_array_list_size(bean_list, env); i++)
-        {
-            sandesha2_sender_bean_t *old_ack_bean = NULL;
-            old_ack_bean = axutil_array_list_get(bean_list, env, i);
-            time_to_send = sandesha2_sender_bean_get_time_to_send(old_ack_bean,
-                env);
-            sandesha2_sender_mgr_remove(retrans_mgr, env, 
-                sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
-                    old_ack_bean, env));
-            sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, 
-                sandesha2_sender_bean_get_msg_ctx_ref_key(
-                    old_ack_bean, env));
-        }
-        sandesha2_sender_bean_set_time_to_send(ack_bean, env, time_to_send);
-        sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, key, 
ack_msg_ctx);
-        sandesha2_sender_mgr_insert(retrans_mgr, env, ack_bean);
-        
-        orig_trans_out = axis2_msg_ctx_get_transport_out_desc(ack_msg_ctx, 
-            env);
-        property = axutil_property_create_with_args(env, 
AXIS2_SCOPE_APPLICATION, 
-            AXIS2_FALSE, axis2_transport_out_desc_free_void_arg, 
orig_trans_out);
-        axis2_msg_ctx_set_property(ack_msg_ctx, env,
-            SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC, property);
-        
-        property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-            AXIS2_FALSE, 0, AXIS2_VALUE_TRUE);
-        axis2_msg_ctx_set_property(ack_msg_ctx, env, 
-            SANDESHA2_SET_SEND_TO_TRUE, property);
-                        
-        property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-            AXIS2_FALSE, 0, key);
-        axis2_msg_ctx_set_property(ack_msg_ctx, env, 
-            SANDESHA2_MESSAGE_STORE_KEY, property);
-        
-        trans_out = sandesha2_utils_get_transport_out(env);
-        axis2_msg_ctx_set_transport_out_desc(ack_msg_ctx, env, trans_out);
-        
-        ret_rm_msg = sandesha2_msg_init_init_msg(env, ack_msg_ctx);
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-            "[sandesha2] Calling function 
sandesha2_utils_start_sender_for_seq()");
-        sandesha2_utils_start_sender_for_seq(env, conf_ctx, seq_id, 
AXIS2_FALSE);
-        return ret_rm_msg;
+        axis2_op_t *op = axis2_op_create(env);
+        axis2_op_set_msg_exchange_pattern(op, env, AXIS2_MEP_URI_IN_OUT);
+        op_ctx = axis2_op_ctx_create(env, op, NULL);
+        axis2_msg_ctx_set_op(ref_msg, env, op);
+        axis2_msg_ctx_set_op_ctx(ref_msg, env, op_ctx);            
     }
-    return NULL;
+    axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
+    
+    property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
+        AXIS2_FALSE, 0, AXIS2_VALUE_TRUE);
+    axis2_msg_ctx_set_property(ref_msg, env, SANDESHA2_ACK_WRITTEN, property);
+    axis2_msg_ctx_set_server_side(ack_msg_ctx, env, AXIS2_TRUE);
+    return ack_rm_msg;
 }
 
 /**
@@ -395,7 +296,6 @@
     axutil_array_list_t *found_list = NULL;
     int i = 0;
     
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
     



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to