You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2007/02/05 11:02:47 UTC

svn commit: r503613 - in /webservices/sandesha/trunk/c: config/ include/ samples/rm_echo_single/ src/core/ src/handlers/ src/msgprocessors/ src/polling/ src/util/ src/workers/

Author: damitha
Date: Mon Feb  5 02:02:45 2007
New Revision: 503613

URL: http://svn.apache.org/viewvc?view=rev&rev=503613
Log:
Fixed sandesha2c-12, sandesha2c-11, 

Modified:
    webservices/sandesha/trunk/c/config/module.xml
    webservices/sandesha/trunk/c/include/sandesha2_constants.h
    webservices/sandesha/trunk/c/include/sandesha2_property_bean.h
    webservices/sandesha/trunk/c/samples/rm_echo_single/rm_echo_single.c
    webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
    webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
    webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c
    webservices/sandesha/trunk/c/src/polling/polling_mgr.c
    webservices/sandesha/trunk/c/src/util/ack_mgr.c
    webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
    webservices/sandesha/trunk/c/src/util/property_bean.c
    webservices/sandesha/trunk/c/src/util/property_mgr.c
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
    webservices/sandesha/trunk/c/src/util/seq_mgr.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c
    webservices/sandesha/trunk/c/src/workers/sender.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/config/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Mon Feb  5 02:02:45 2007
@@ -73,9 +73,10 @@
     <parameter name="ExponentialBackoff" locked="false">AXIS2_TRUE</parameter>
     <parameter name="RetransmissionInterval" locked="false">20000</parameter>
     <parameter name="AcknowledgementInterval" locked="false">4000</parameter>
-    <parameter name="InactivityTimeout" locked="false">-1</parameter>
+    <parameter name="InactivityTimeout" locked="false">60000</parameter>
     <parameter name="StorageManager" locked="false">persistent</parameter>
     <parameter name="InvokeInOrder" locked="false">AXIS2_FALSE</parameter>
     <parameter name="MessageTypesToDrop" locked="false">none</parameter>
+    <parameter name="MaxRetransCount" locked="false">10</parameter>
 
 </module>

Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Mon Feb  5 02:02:45 2007
@@ -368,6 +368,8 @@
 	#define SANDESHA2_PROPERTIES_MSG_TYPES_TO_DROP  "MessageTypesToDrop"
 		
 	#define SANDESHA2_PROPERTIES_RETR_COUNT  "RetransmissionCount"
+    
+    #define SANDESHA2_PROPERTIES_MAX_RETRANS_COUNT "MaxRetransCount"
 	
 	/**
 	 * Default Values
@@ -409,13 +411,13 @@
 
 	#define SANDESHA2_INVOKER_SLEEP_TIME  6  /*6 2 */
 
-	#define SANDESHA2_SENDER_SLEEP_TIME  6  /*6 4 */
+	#define SANDESHA2_SENDER_SLEEP_TIME  1  /*6 4 */
 
-    #define SANDESHA2_POLLING_MANAGER_WAIT_TIME 12 /* 12 4 */
+    #define SANDESHA2_POLLING_MANAGER_WAIT_TIME 3 /* 12 4 */
 
-	#define SANDESHA2_CLIENT_SLEEP_TIME  32 /* 32 16 */
+	#define SANDESHA2_CLIENT_SLEEP_TIME  4 /* 32 16 */
 
-	#define SANDESHA2_TERMINATE_DELAY  32 /* 100 32 */
+	#define SANDESHA2_TERMINATE_DELAY  4 /* 100 32 */
 
 	#define SANDESHA2_TEMP_SEQ_ID  "uuid:tempID"
 
@@ -495,7 +497,7 @@
     #define SANDESHA2_PERSISTANT_PROPERTY_SEPERATOR ",,,"
     #define SANDESHA2_BUSY_WAIT_TIME 8
     #define SANDESHA2_IS_SVR_SIDE "is_svr_side" 
-    #define SANDESHA2_DB "sandesha2_db" 
+    #define SANDESHA2_DB "sandesha2_db"
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/sandesha/trunk/c/include/sandesha2_property_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_property_bean.h?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_property_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_property_bean.h Mon Feb  5 02:02:45 2007
@@ -114,7 +114,25 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, 
     axis2_char_t *manager);
+
+/**
+ * return the storage manager to use. This could be either
+ * persistent or inmemory.
+ * @param property bean
+ * @env environment
+ * @return storage manager(persistent/inmemory)
+ */
+axis2_char_t* AXIS2_CALL
+sandesha2_property_bean_get_storage_mgr(
+    sandesha2_property_bean_t *bean,
+    const axis2_env_t *env);
             
+axis2_status_t AXIS2_CALL
+sandesha2_property_bean_set_storage_mgr(
+    sandesha2_property_bean_t *bean,
+    const axis2_env_t *env, 
+    axis2_char_t *manager);
+           
 axis2_bool_t AXIS2_CALL
 sandesha2_property_bean_is_in_order(
     sandesha2_property_bean_t *bean,

Modified: webservices/sandesha/trunk/c/samples/rm_echo_single/rm_echo_single.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single/rm_echo_single.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single/rm_echo_single.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single/rm_echo_single.c Mon Feb  5 02:02:45 2007
@@ -29,7 +29,7 @@
 #include <sandesha2_client.h>
 #include <axis2_addr.h>
 
-#define SANDESHA2_MAX_COUNT 40
+#define SANDESHA2_MAX_COUNT 10
 
 /* on_complete callback function */
 axis2_status_t AXIS2_CALL
@@ -206,7 +206,7 @@
         "sequence1");
     /*sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback4, 
         listener_manager);*/
-    AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
+    AXIS2_SLEEP(2 * SANDESHA2_MAX_COUNT);
     if (svc_client)
     {
         /*AXIS2_SVC_CLIENT_FREE(svc_client, env);*/

Modified: webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/mod_sandesha2.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/core/mod_sandesha2.c (original)
+++ webservices/sandesha/trunk/c/src/core/mod_sandesha2.c Mon Feb  5 02:02:45 2007
@@ -80,17 +80,16 @@
     AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
     
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] module initializing ..");
-    const_property_bean = sandesha2_property_mgr_load_properties_from_def_values
-                        (env);
     property_bean = sandesha2_property_mgr_load_properties_from_module_desc(env,
-                        module_desc);
-    /*if(NULL == property_bean) */
-        property_bean = const_property_bean;
+        module_desc);
+    if(!property_bean)
+        property_bean = sandesha2_property_mgr_load_properties_from_def_values
+            (env);
         
     param = axis2_param_create(env, SANDESHA2_SANDESHA_PROPERTY_BEAN, 
         property_bean);
     
-    conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
+    conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     AXIS2_CONF_ADD_PARAM(conf, env, param);
     db_param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, SANDESHA2_DB);
     if(db_param)
@@ -99,11 +98,11 @@
         sandesha2_property_bean_set_db_path(property_bean, env, db_path);
     }
 
-    ctx = AXIS2_CONF_CTX_GET_BASE(conf_ctx, env);
-    AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_INMEMORY_STORAGE_MGR, NULL, 
-                        AXIS2_FALSE);
-    AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_PERMANENT_STORAGE_MGR, NULL, 
-                        AXIS2_FALSE);
+    ctx = axis2_conf_ctx_get_base(conf_ctx, env);
+    axis2_ctx_set_property(ctx, env, SANDESHA2_INMEMORY_STORAGE_MGR, NULL, 
+        AXIS2_FALSE);
+    axis2_ctx_set_property(ctx, env, SANDESHA2_PERMANENT_STORAGE_MGR, NULL, 
+        AXIS2_FALSE);
     
     storage_mgr = sandesha2_utils_get_inmemory_storage_mgr(env, conf_ctx);
     sandesha2_storage_mgr_init_storage(storage_mgr, env, module_desc);

Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Mon Feb  5 02:02:45 2007
@@ -156,9 +156,7 @@
         return AXIS2_SUCCESS; /* Reinjected Messages are not processed by 
                                  sandesha2 inflow handlers */
     }
-    /*axis2_allocator_switch_to_global_pool(env->allocator);*/
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
-    /*axis2_allocator_switch_to_local_pool(env->allocator);*/
     if(!storage_mgr)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot get the "
@@ -179,9 +177,7 @@
     {
         axis2_property_t *prop = NULL;
         
-        /*axis2_allocator_switch_to_global_pool(env->allocator);*/
         transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-        /*axis2_allocator_switch_to_local_pool(env->allocator);*/
         prop = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
             AXIS2_FALSE, 0, SANDESHA2_VALUE_TRUE);
         AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop, 

Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Mon Feb  5 02:02:45 2007
@@ -316,8 +316,11 @@
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, 
             SANDESHA2_QUALIFIED_FOR_SENDING, property, AXIS2_FALSE);
         
-        prop_bean = sandesha2_utils_get_property_bean_from_op(env, 
-            AXIS2_MSG_CTX_GET_OP(msg_ctx, env));
+        /* Avoid retrieving property bean from operation until it is availbale */
+        /*prop_bean = sandesha2_utils_get_property_bean_from_op(env, 
+            AXIS2_MSG_CTX_GET_OP(msg_ctx, env));*/
+        prop_bean = sandesha2_utils_get_property_bean(env, 
+            axis2_conf_ctx_get_conf(conf_ctx, env));
         ack_interval = sandesha2_property_bean_get_ack_interval(prop_bean, env);
         time_to_send = sandesha2_utils_get_current_time_in_millis(env) +
             ack_interval;

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?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Mon Feb  5 02:02:45 2007
@@ -241,10 +241,8 @@
         }
     }
     conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
-    /*axis2_allocator_switch_to_global_pool(env->allocator);*/
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, 
         AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
-    /*axis2_allocator_switch_to_local_pool(env->allocator);*/
     fault_ctx = sandesha2_fault_mgr_check_for_last_msg_num_exceeded(
         env, rm_msg_ctx, storage_mgr);
     if(fault_ctx)

Modified: webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c Mon Feb  5 02:02:45 2007
@@ -332,8 +332,11 @@
         return AXIS2_SUCCESS;
     }
     
+    /* Avoid retrieving property bean from operation until it is availbale */
+    /*prop_bean = sandesha2_utils_get_property_bean_from_op(env, 
+        axis2_msg_ctx_get_op(return_msg_ctx, env));*/
     prop_bean = sandesha2_utils_get_property_bean_from_op(env, 
-        axis2_msg_ctx_get_op(return_msg_ctx, env));
+        axis2_conf_ctx_get_conf(conf_ctx, env));
     if(prop_bean)
         msgs_not_to_send = sandesha2_property_bean_get_msg_types_to_drop(
             prop_bean, env);

Modified: webservices/sandesha/trunk/c/src/polling/polling_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/polling/polling_mgr.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/polling/polling_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/polling/polling_mgr.c Mon Feb  5 02:02:45 2007
@@ -243,9 +243,7 @@
         sandesha2_transaction_t *transaction = NULL;
 
         AXIS2_SLEEP(SANDESHA2_POLLING_MANAGER_WAIT_TIME);
-        /*axis2_allocator_switch_to_global_pool(env->allocator);*/
         transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-        /*axis2_allocator_switch_to_local_pool(env->allocator);*/
         next_msg_mgr = sandesha2_storage_mgr_get_next_msg_mgr(
                         storage_mgr, env);
          /* Getting the sequences to be polled. if schedule contains any requests, 

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?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Mon Feb  5 02:02:45 2007
@@ -211,8 +211,11 @@
         sandesha2_sender_bean_set_msg_type(ack_bean, env, 
             SANDESHA2_MSG_TYPE_ACK);
 
-        ack_int_bean = sandesha2_utils_get_property_bean_from_op(env,
-            AXIS2_MSG_CTX_GET_OP(ref_msg, env));
+        /* 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) + 

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?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Mon Feb  5 02:02:45 2007
@@ -25,31 +25,34 @@
 
 /******************************************************************************/
 sandesha2_sender_bean_t * AXIS2_CALL
-sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(const axis2_env_t *env, 
-                        sandesha2_sender_bean_t *retrans_bean, 
-                        sandesha2_property_bean_t *property_bean);
+sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(
+    const axis2_env_t *env, 
+    sandesha2_sender_bean_t *retrans_bean, 
+    sandesha2_property_bean_t *property_bean);
 
 long AXIS2_CALL
-sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(const axis2_env_t *env,
-                        int count,
-                        long initial_interval);
+sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(
+    const axis2_env_t *env,
+    int count,
+    long initial_interval);
                         
 axis2_status_t AXIS2_CALL
-sandesha2_msg_retrans_adjuster_finalize_timedout_seq(const axis2_env_t *env,
-                        axis2_char_t *int_seq_id,
-                        axis2_char_t *seq_id,
-                        axis2_msg_ctx_t *msg_ctx,
-                        sandesha2_storage_mgr_t *storage_mgr);
+sandesha2_msg_retrans_adjuster_finalize_timedout_seq(
+    const axis2_env_t *env,
+    axis2_char_t *int_seq_id,
+    axis2_char_t *seq_id,
+    axis2_msg_ctx_t *msg_ctx,
+    sandesha2_storage_mgr_t *storage_mgr);
 
 /******************************************************************************/
 
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 sandesha2_msg_retrans_adjuster_adjust_retrans(
-        const axis2_env_t *env,
-        sandesha2_sender_bean_t *retrans_bean,
-        axis2_conf_ctx_t *conf_ctx, 
-        sandesha2_storage_mgr_t *storage_mgr)
+    const axis2_env_t *env,
+    sandesha2_sender_bean_t *retrans_bean,
+    axis2_conf_ctx_t *conf_ctx, 
+    sandesha2_storage_mgr_t *storage_mgr)
 {
     axis2_char_t *stored_key = NULL;
     axis2_msg_ctx_t *msg_ctx = NULL;
@@ -71,32 +74,35 @@
     if(!stored_key)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Stored Key not"
-                        " present in the retransmittable message");
+            " present in the retransmittable message");
         return AXIS2_FALSE;
     }
     msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env, 
-                        stored_key, conf_ctx);
+        stored_key, conf_ctx);
     if(msg_ctx)
         rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
     int_seq_id = sandesha2_sender_bean_get_internal_seq_id(retrans_bean, env);
     seq_id = sandesha2_sender_bean_get_seq_id(retrans_bean, env);
-    
-    property_bean = sandesha2_utils_get_property_bean_from_op(env, 
-                        AXIS2_MSG_CTX_GET_OP(msg_ctx, env));
+   
+    /* Avoid retrieving property bean from operation until it is availbale */
+    /*property_bean = sandesha2_utils_get_property_bean_from_op(env, 
+        AXIS2_MSG_CTX_GET_OP(msg_ctx, env));*/
+    property_bean = sandesha2_utils_get_property_bean(env, 
+        axis2_conf_ctx_get_conf(conf_ctx, env));
     sandesha2_sender_bean_set_sent_count(retrans_bean, env, 
-                        sandesha2_sender_bean_get_sent_count(retrans_bean, 
-                        env) + 1);
+        sandesha2_sender_bean_get_sent_count(retrans_bean, 
+            env) + 1);
     sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(env, retrans_bean,
-                        property_bean);
+        property_bean);
     max_attempts = sandesha2_property_bean_get_max_retrans_count(property_bean, 
-                        env);
+        env);
     
     if(max_attempts > 0 && sandesha2_sender_bean_get_sent_count(retrans_bean, 
-                        env) > max_attempts)
+        env) > max_attempts)
         timeout_seq = AXIS2_TRUE;
     if(rm_msg_ctx)
         seq_timed_out = sandesha2_seq_mgr_has_seq_timedout(env, int_seq_id, 
-                        rm_msg_ctx, storage_mgr);
+            rm_msg_ctx, storage_mgr);
     
     if(AXIS2_TRUE == seq_timed_out)
         timeout_seq = AXIS2_TRUE;
@@ -105,16 +111,17 @@
     {
         sandesha2_sender_bean_set_send(retrans_bean, env, AXIS2_FALSE);
         sandesha2_msg_retrans_adjuster_finalize_timedout_seq(env, int_seq_id,
-                        seq_id, msg_ctx, storage_mgr);
+            seq_id, msg_ctx, storage_mgr);
         continue_sending = AXIS2_FALSE;
     }
     return continue_sending;
 }
 
 sandesha2_sender_bean_t * AXIS2_CALL
-sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(const axis2_env_t *env, 
-                        sandesha2_sender_bean_t *retrans_bean, 
-                        sandesha2_property_bean_t *property_bean)
+sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(
+    const axis2_env_t *env, 
+    sandesha2_sender_bean_t *retrans_bean, 
+    sandesha2_property_bean_t *property_bean)
 {
     int count = -1;
     long base_interval = -1;
@@ -128,12 +135,12 @@
     
     count = sandesha2_sender_bean_get_sent_count(retrans_bean, env);
     base_interval = sandesha2_property_bean_get_retrans_interval(property_bean,
-                        env);
+        env);
     new_interval = base_interval;
     if(AXIS2_TRUE == sandesha2_property_bean_is_exp_backoff(property_bean, env))
     {
         new_interval = sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(env,
-                        count, base_interval);
+            count, base_interval);
     }
     time_now = sandesha2_utils_get_current_time_in_millis(env);
     
@@ -145,23 +152,24 @@
 
 
 long AXIS2_CALL
-sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(const axis2_env_t *env,
-                        int count,
-                        long initial_interval)
+sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(
+    const axis2_env_t *env,
+    int count,
+    long initial_interval)
 {
     long interval = initial_interval;
-    AXIS2_ENV_CHECK(env, -1);
     
     interval = initial_interval * (2^count);
     return interval;
 }
 
 axis2_status_t AXIS2_CALL
-sandesha2_msg_retrans_adjuster_finalize_timedout_seq(const axis2_env_t *env,
-                        axis2_char_t *int_seq_id,
-                        axis2_char_t *seq_id,
-                        axis2_msg_ctx_t *msg_ctx,
-                        sandesha2_storage_mgr_t *storage_mgr)
+sandesha2_msg_retrans_adjuster_finalize_timedout_seq(
+    const axis2_env_t *env,
+    axis2_char_t *int_seq_id,
+    axis2_char_t *seq_id,
+    axis2_msg_ctx_t *msg_ctx,
+    sandesha2_storage_mgr_t *storage_mgr)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_ctx_t *ctx = NULL;
@@ -175,19 +183,20 @@
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
     
-    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
-    ctx = AXIS2_CONF_CTX_GET_BASE(conf_ctx, env);
+    conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+    ctx = axis2_conf_ctx_get_base(conf_ctx, env);
     
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-                        SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE);
+    property = axis2_msg_ctx_get_property(msg_ctx, env, 
+        SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE);
     if(property)
-        new_property = AXIS2_PROPERTY_CLONE(property, env);
+        new_property = axis2_property_clone(property, env);
     if(new_property)
-        AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
+        axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
             new_property, AXIS2_FALSE);
     /* we have to callback listener here */
     sandesha2_terminate_mgr_time_out_sending_side_seq(env, conf_ctx, int_seq_id,
-                        AXIS2_FALSE, storage_mgr);
+        AXIS2_FALSE, storage_mgr);
  
     return AXIS2_SUCCESS;
 }
+

Modified: webservices/sandesha/trunk/c/src/util/property_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/property_bean.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/property_bean.c (original)
+++ webservices/sandesha/trunk/c/src/util/property_bean.c Mon Feb  5 02:02:45 2007
@@ -31,6 +31,7 @@
     axis2_bool_t is_exp_backoff;
     axis2_char_t *in_mem_storage_mgr;
     axis2_char_t *permanent_storage_mgr;
+    axis2_char_t *storage_mgr;
     axis2_bool_t is_in_order;
     axis2_array_list_t *msg_types_to_drop;
     int max_retrans_count;
@@ -42,7 +43,6 @@
     const axis2_env_t *env)
 {
     sandesha2_property_bean_t *bean = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     
     bean =  (sandesha2_property_bean_t *)AXIS2_MALLOC 
         (env->allocator, sizeof(sandesha2_property_bean_t));
@@ -58,6 +58,7 @@
     bean->is_exp_backoff = 0;
     bean->in_mem_storage_mgr = NULL;
     bean->permanent_storage_mgr= NULL;
+    bean->storage_mgr= NULL;
     bean->is_in_order = AXIS2_FALSE;
     bean->msg_types_to_drop = NULL;
     bean->max_retrans_count = 0;
@@ -72,17 +73,15 @@
     sandesha2_property_bean_t *bean, 
     const axis2_env_t *env)
 {
-	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    
     if(bean->msg_types_to_drop)
     {
         int count = AXIS2_ARRAY_LIST_SIZE(bean->msg_types_to_drop,
-                        env);
+            env);
         int i = 0;
         for(i = 0; i < count; i++)
         {
             int *msg_type = AXIS2_ARRAY_LIST_GET(
-                        bean->msg_types_to_drop, env, i);
+                bean->msg_types_to_drop, env, i);
             if(NULL != msg_type)
                 AXIS2_FREE(env->allocator, msg_type);
         }
@@ -112,7 +111,6 @@
     sandesha2_property_bean_t *bean, 
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, -1);
     return bean->inactive_timeout_interval;
 }
             
@@ -121,7 +119,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, long interval)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     bean->inactive_timeout_interval = interval;
     return AXIS2_SUCCESS;
 }
@@ -134,7 +131,6 @@
 {
     long multiplier = -1;
     
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, units, AXIS2_FAILURE);
     
     if(0 == AXIS2_STRCMP(units, "seconds"))
@@ -149,7 +145,7 @@
         return AXIS2_FAILURE;
         
     return sandesha2_property_bean_set_inactive_timeout_interval(bean, env, 
-                        multiplier*interval);
+        multiplier*interval);
 }
             
 long AXIS2_CALL
@@ -157,7 +153,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, -1);
     return bean->ack_interval;
 }
             
@@ -166,7 +161,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, long interval)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     bean->ack_interval = interval;
     return AXIS2_SUCCESS;
 }
@@ -176,7 +170,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, -1);
     return bean->retrans_interval;
 }
             
@@ -185,7 +178,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, long interval)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     bean->retrans_interval = interval;
     return AXIS2_SUCCESS;
 }
@@ -196,7 +188,6 @@
     const axis2_env_t *env)
 
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     return bean->is_exp_backoff;
 }
             
@@ -205,7 +196,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, axis2_bool_t exp_backoff)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     bean->is_exp_backoff = exp_backoff;
     return AXIS2_SUCCESS;
 }
@@ -215,7 +205,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
     return bean->in_mem_storage_mgr;
 }
             
@@ -224,10 +213,8 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, axis2_char_t *manager)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, manager, AXIS2_FAILURE);
-    bean->in_mem_storage_mgr = AXIS2_STRDUP(manager,
-                        env);
+    bean->in_mem_storage_mgr = axis2_strdup(manager, env);
     return AXIS2_SUCCESS;
 }
             
@@ -236,7 +223,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
     return bean->permanent_storage_mgr;
 }
             
@@ -245,10 +231,27 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, axis2_char_t *manager)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, manager, AXIS2_FAILURE);
-    bean->permanent_storage_mgr = AXIS2_STRDUP(
-                        manager, env);
+    bean->permanent_storage_mgr = axis2_strdup(manager, env);
+    return AXIS2_SUCCESS;
+}
+ 
+axis2_char_t* AXIS2_CALL
+sandesha2_property_bean_get_storage_mgr(
+    sandesha2_property_bean_t *bean,
+    const axis2_env_t *env)
+{
+    return bean->storage_mgr;
+}
+            
+axis2_status_t AXIS2_CALL
+sandesha2_property_bean_set_storage_mgr(
+    sandesha2_property_bean_t *bean,
+    const axis2_env_t *env, 
+    axis2_char_t *manager)
+{
+    AXIS2_PARAM_CHECK(env->error, manager, AXIS2_FAILURE);
+    bean->storage_mgr = axis2_strdup(manager, env);
     return AXIS2_SUCCESS;
 }
             
@@ -257,7 +260,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     return bean->is_in_order;
 }
             
@@ -266,7 +268,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, axis2_bool_t in_order)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     bean->is_in_order = in_order;
     return AXIS2_SUCCESS;
 }
@@ -276,32 +277,28 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
     return bean->msg_types_to_drop;
 }
             
 axis2_status_t AXIS2_CALL
 sandesha2_property_bean_set_msg_types_to_drop(
     sandesha2_property_bean_t *bean,
-    const axis2_env_t *env, axis2_array_list_t *msg_types)
+    const axis2_env_t *env, 
+    axis2_array_list_t *msg_types)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_types, AXIS2_FAILURE);
-    
     bean->msg_types_to_drop = msg_types;
     return AXIS2_SUCCESS;
 }
             
 axis2_status_t AXIS2_CALL
 sandesha2_property_bean_add_msg_type_to_drop(
-                        sandesha2_property_bean_t *bean,
-                        const axis2_env_t *env, int msg_type)
+    sandesha2_property_bean_t *bean,
+    const axis2_env_t *env, 
+    int msg_type)
 {
     int *_msg_type = NULL;
-    
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    
-    if(NULL == bean->msg_types_to_drop)
+    if(!bean->msg_types_to_drop)
         return AXIS2_FAILURE;
     _msg_type = AXIS2_MALLOC(env->allocator, sizeof(int));
     AXIS2_ARRAY_LIST_ADD(bean->msg_types_to_drop, env, _msg_type);
@@ -313,7 +310,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, -1);
     return bean->max_retrans_count;
 }
             
@@ -322,7 +318,6 @@
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, int count)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     bean->max_retrans_count = count;
     return AXIS2_SUCCESS;
 }
@@ -340,7 +335,7 @@
     const axis2_env_t *env,
     axis2_char_t *db_path)
 {
-    bean->db_path = AXIS2_STRDUP(db_path, env);
+    bean->db_path = axis2_strdup(db_path, env);
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/sandesha/trunk/c/src/util/property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/property_mgr.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/property_mgr.c Mon Feb  5 02:02:45 2007
@@ -87,27 +87,25 @@
     const axis2_env_t *env)
 {
     sandesha2_property_bean_t *property_bean = NULL;
-    
-    AXIS2_ENV_CHECK(env, NULL);
-    
     property_bean = sandesha2_property_bean_create(env);
-    sandesha2_property_bean_set_ack_interval(property_bean, env, 
-        SANDESHA2_DEF_VAL_ACK_INTERVAL);
+
     sandesha2_property_bean_set_exp_backoff(property_bean, env,
         SANDESHA2_DEF_VAL_EXP_BACKOFF);
+    sandesha2_property_bean_set_retrans_interval(property_bean, env,
+        SANDESHA2_DEF_VAL_RETR_COUNT);
+    sandesha2_property_bean_set_ack_interval(property_bean, env, 
+        SANDESHA2_DEF_VAL_ACK_INTERVAL);
     sandesha2_property_bean_set_inactive_timeout_interval_with_units(
         property_bean, env, SANDESHA2_DEF_VAL_INACTIVETIMEOUT,
         SANDESHA2_DEF_VAL_INACTIVETIMEOUT_MEASURE);
-    sandesha2_property_bean_set_in_order(property_bean, env,
-        SANDESHA2_DEF_VAL_INORDER_INVOCATION);
-    sandesha2_property_bean_set_msg_types_to_drop(property_bean, env, NULL);
-    sandesha2_property_bean_set_retrans_interval(property_bean, env,
-        SANDESHA2_DEF_VAL_RETR_COUNT);
-    /* will be useful when we are loading libraries */
     sandesha2_property_bean_set_in_mem_storage_mgr(property_bean, env,
         SANDESHA2_DEF_VAL_IN_MEMORY_STORAGE_MGR);
     sandesha2_property_bean_set_permanent_storage_mgr(property_bean, env,
         SANDESHA2_DEF_VAL_PERM_STORAGE_MGR);
+    sandesha2_property_bean_set_in_order(property_bean, env,
+        SANDESHA2_DEF_VAL_INORDER_INVOCATION);
+    sandesha2_property_bean_set_msg_types_to_drop(property_bean, env, NULL);
+    /* will be useful when we are loading libraries */
     sandesha2_property_bean_set_max_retrans_count(property_bean, env,
         SANDESHA2_DEF_VAL_MAX_RETR_COUNT);
     sandesha2_property_mgr_load_msg_types_to_drop(env, 
@@ -140,75 +138,106 @@
         SANDESHA2_PROPERTIES_EXP_BACKOFF);
     if(param)
     {
-        exp_backoff_str = AXIS2_PARAM_GET_VALUE(param, env);
+        exp_backoff_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_exp_backoff(env, exp_backoff_str, 
             property_bean);
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
         SANDESHA2_PROPERTIES_RETRANSMISSION_INTERVAL);
     if(param)
     {
-        retrans_int_str = AXIS2_PARAM_GET_VALUE(param, env);
+        retrans_int_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_retrans_int(env, retrans_int_str, 
             property_bean);
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
        SANDESHA2_PROPERTIES_ACK_INTERVAL);
     if(param)
     {
-        ack_int_str = AXIS2_PARAM_GET_VALUE(param, env);
+        ack_int_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_ack_int(env, ack_int_str, 
             property_bean);
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
         SANDESHA2_PROPERTIES_INACTIVETIMEOUT);
     if(param)
     {
         axis2_char_t *inactive_to_measure_str = NULL;
         
-        inactive_timeout_str = AXIS2_PARAM_GET_VALUE(param, env);
+        inactive_timeout_str = axis2_param_get_value(param, env);
         param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
             SANDESHA2_PROPERTIES_INACTIVETIMEOUT_MEASURE);
         if(param)
-            inactive_to_measure_str = AXIS2_PARAM_GET_VALUE(param, env);
+            inactive_to_measure_str = axis2_param_get_value(param, env);
         if(NULL == inactive_to_measure_str)
             inactive_to_measure_str = SANDESHA2_DEF_VAL_INACTIVETIMEOUT_MEASURE;
         
         sandesha2_property_mgr_load_inactive_timeout(env, inactive_timeout_str, 
             inactive_to_measure_str, property_bean);
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
        SANDESHA2_PROPERTIES_IN_MEMORY_STORAGE_MGR);
     if(param)
     {
-        in_mem_mgr_str = AXIS2_PARAM_GET_VALUE(param, env);
+        in_mem_mgr_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_in_mem_storage_mgr(env, in_mem_mgr_str, 
             property_bean);        
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
         SANDESHA2_PROPERTIES_PERM_STORAGE_MGR);
     if(param)
     {
-        perm_mgr_str = AXIS2_PARAM_GET_VALUE(param, env);
+        perm_mgr_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_perm_storage_mgr(env, perm_mgr_str, 
             property_bean);        
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
         SANDESHA2_PROPERTIES_INORDER_INVOCATION);
     if(param)
     {
-        in_order_invoker_str = AXIS2_PARAM_GET_VALUE(param, env);
+        in_order_invoker_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_in_order_invocation(env, 
             in_order_invoker_str, property_bean);        
     }
+
     param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
         SANDESHA2_PROPERTIES_MSG_TYPES_TO_DROP);
     if(param)
     {
-        msg_types_str = AXIS2_PARAM_GET_VALUE(param, env);
+        msg_types_str = axis2_param_get_value(param, env);
         sandesha2_property_mgr_load_msg_types_to_drop(env, msg_types_str, 
             property_bean);        
     }
+    
+    param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
+        SANDESHA2_PROPERTIES_STORAGE_MGR);
+    if(param)
+    {
+        axis2_char_t *storage_mgr = NULL;
+        storage_mgr = axis2_param_get_value(param, env);
+        sandesha2_property_bean_set_storage_mgr(property_bean, env, storage_mgr);        
+    }
+    
+    param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, 
+        SANDESHA2_PROPERTIES_MAX_RETRANS_COUNT);
+    if(param)
+    {
+        int max_retrans_count = -1;
+        axis2_char_t *max_retrans_count_str = axis2_param_get_value(param, env);
+        axis2_char_t *str = sandesha2_utils_trim_string(env, max_retrans_count_str);
+        if(str)
+            max_retrans_count = atoi(str);
+        if(0 < max_retrans_count)
+            sandesha2_property_bean_set_max_retrans_count(property_bean, env, 
+                max_retrans_count);
+    }
+
     return property_bean;
 }
 
@@ -225,7 +254,7 @@
     AXIS2_PARAM_CHECK(env->error, property_bean, AXIS2_FAILURE);
     
     str = sandesha2_utils_trim_string(env, value);
-    if(0 == AXIS2_STRCMP(str, SANDESHA2_VALUE_TRUE))
+    if(0 == axis2_strcmp(str, SANDESHA2_VALUE_TRUE))
         sandesha2_property_bean_set_exp_backoff(property_bean, env, AXIS2_TRUE);
     else
         sandesha2_property_bean_set_exp_backoff(property_bean, env, 
@@ -256,9 +285,10 @@
 }
                         
 AXIS2_EXTERN  axis2_status_t AXIS2_CALL                        
-sandesha2_property_mgr_load_ack_int(const axis2_env_t *env, 
-                        axis2_char_t *value, 
-                        sandesha2_property_bean_t *property_bean)
+sandesha2_property_mgr_load_ack_int(
+    const axis2_env_t *env, 
+    axis2_char_t *value, 
+    sandesha2_property_bean_t *property_bean)
 {
     axis2_char_t *str = NULL;
     int ack_int = -1;
@@ -276,10 +306,11 @@
 }
 
 AXIS2_EXTERN  axis2_status_t AXIS2_CALL
-sandesha2_property_mgr_load_inactive_timeout(const axis2_env_t *env, 
-                        axis2_char_t *value,
-                        axis2_char_t *measure,                        
-                        sandesha2_property_bean_t *property_bean)
+sandesha2_property_mgr_load_inactive_timeout(
+    const axis2_env_t *env, 
+    axis2_char_t *value,
+    axis2_char_t *measure,                        
+    sandesha2_property_bean_t *property_bean)
 {
     axis2_char_t *str = NULL;
     axis2_char_t *str2 = NULL;
@@ -308,9 +339,10 @@
 }
 
 AXIS2_EXTERN  axis2_status_t AXIS2_CALL
-sandesha2_property_mgr_load_in_mem_storage_mgr(const axis2_env_t *env, 
-                        axis2_char_t *value, 
-                        sandesha2_property_bean_t *property_bean)
+sandesha2_property_mgr_load_in_mem_storage_mgr(
+    const axis2_env_t *env, 
+    axis2_char_t *value, 
+    sandesha2_property_bean_t *property_bean)
 {
  
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -346,12 +378,11 @@
 {
     axis2_char_t *str = NULL;
     
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, property_bean, AXIS2_FAILURE);
     
     str = sandesha2_utils_trim_string(env, value);
-    if(0 == AXIS2_STRCMP(str, SANDESHA2_VALUE_TRUE))
+    if(0 == axis2_strcmp(str, SANDESHA2_VALUE_TRUE))
         sandesha2_property_bean_set_in_order(property_bean, env, AXIS2_TRUE);
     else
         sandesha2_property_bean_set_in_order(property_bean, env, AXIS2_FALSE);
@@ -372,7 +403,7 @@
     AXIS2_PARAM_CHECK(env->error, property_bean, AXIS2_FAILURE);
     
     str = sandesha2_utils_trim_string(env, value);
-    if(str && 0 != AXIS2_STRCMP(str, SANDESHA2_VALUE_NONE))
+    if(str && 0 != axis2_strcmp(str, SANDESHA2_VALUE_NONE))
     {
         axis2_char_t *str2 = NULL;
         axis2_array_list_t *list = NULL;

Modified: webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/sandesha2_utils.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Mon Feb  5 02:02:45 2007
@@ -149,18 +149,16 @@
     axis2_param_t *parameter = NULL;
     axis2_char_t *value = NULL;
     sandesha2_storage_mgr_t *storage_mgr = NULL;
+    sandesha2_property_bean_t *prop_bean = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, conf_ctx, NULL);
     AXIS2_PARAM_CHECK(env->error, conf, NULL);
     
     axis2_allocator_switch_to_global_pool(env->allocator);
-    parameter = AXIS2_CONF_GET_PARAM(conf, env, 
-        SANDESHA2_STORAGE_MGR_PARAMETER);
-    if(!parameter)
-        parameter = axis2_param_create(env, SANDESHA2_STORAGE_MGR_PARAMETER,
-            SANDESHA2_DEFAULT_STORAGE_MGR);
-    value = AXIS2_PARAM_GET_VALUE(parameter, env);
+    prop_bean = (sandesha2_property_bean_t *)sandesha2_utils_get_property_bean(
+        env, conf);
+    value = sandesha2_property_bean_get_storage_mgr(prop_bean, env);
     if(0 == AXIS2_STRCMP(value, SANDESHA2_INMEMORY_STORAGE_MGR))
         storage_mgr = sandesha2_utils_get_inmemory_storage_mgr(env, conf_ctx);
     else if (0 == AXIS2_STRCMP(value, SANDESHA2_PERMANENT_STORAGE_MGR))
@@ -214,7 +212,7 @@
     if(!param)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONFIGURATION_NOT_SET,
-                        AXIS2_FAILURE);
+            AXIS2_FAILURE);
         return NULL;
     }
     return (sandesha2_property_bean_t*)AXIS2_PARAM_GET_VALUE(param, env);
@@ -552,8 +550,9 @@
 
 
 AXIS2_EXTERN sandesha2_property_bean_t* AXIS2_CALL
-sandesha2_utils_get_property_bean_from_op(const axis2_env_t *env,
-                        axis2_op_t *op)
+sandesha2_utils_get_property_bean_from_op(
+    const axis2_env_t *env,
+    axis2_op_t *op)
 {
         axis2_param_t *param = NULL;
     
@@ -564,7 +563,7 @@
     if(!param)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONFIGURATION_NOT_SET,
-                        AXIS2_FAILURE);
+            AXIS2_FAILURE);
         return NULL;
     }
     return (sandesha2_property_bean_t*)AXIS2_PARAM_GET_VALUE(param, env);

Modified: webservices/sandesha/trunk/c/src/util/seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/seq_mgr.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Mon Feb  5 02:02:45 2007
@@ -243,34 +243,41 @@
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-sandesha2_seq_mgr_has_seq_timedout(const axis2_env_t *env,
-        axis2_char_t *property_key,
-        sandesha2_msg_ctx_t *rm_msg_ctx,
-        sandesha2_storage_mgr_t *storage_mgr)
+sandesha2_seq_mgr_has_seq_timedout(
+    const axis2_env_t *env,
+    axis2_char_t *property_key,
+    sandesha2_msg_ctx_t *rm_msg_ctx,
+    sandesha2_storage_mgr_t *storage_mgr)
 {
     sandesha2_property_bean_t *property_bean = NULL;
     axis2_bool_t seq_timedout = AXIS2_FALSE;
     long last_activated_time = -1;
     long current_time = -1;
+    long timeout_interval = -1;
+    axis2_conf_ctx_t *conf_ctx = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, property_key, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FALSE);
     
-    property_bean = sandesha2_utils_get_property_bean_from_op(env, 
-                        AXIS2_MSG_CTX_GET_OP(sandesha2_msg_ctx_get_msg_ctx(
-                        rm_msg_ctx, env), env));
-    if(sandesha2_property_bean_get_inactive_timeout_interval(property_bean, env)
-                        <= 0)
+    /* Avoid retrieving property bean from operation until it is availbale */
+    /*property_bean = sandesha2_utils_get_property_bean_from_op(env, 
+        AXIS2_MSG_CTX_GET_OP(sandesha2_msg_ctx_get_msg_ctx(
+        rm_msg_ctx, env), env));*/
+    conf_ctx = sandesha2_storage_mgr_get_ctx(storage_mgr, env);
+    property_bean = sandesha2_utils_get_property_bean(env, 
+        axis2_conf_ctx_get_conf(conf_ctx, env));
+    timeout_interval = sandesha2_property_bean_get_inactive_timeout_interval(
+        property_bean, env);
+    if(timeout_interval <= 0)
         return AXIS2_FALSE;
     last_activated_time = sandesha2_seq_mgr_get_last_activated_time(env, 
-                        property_key, storage_mgr);
+        property_key, storage_mgr);
     current_time = sandesha2_utils_get_current_time_in_millis(env);
-    if(last_activated_time > 0 && (last_activated_time + 
-                        sandesha2_property_bean_get_inactive_timeout_interval(
-                        property_bean, env) < current_time))
-        seq_timedout = AXIS2_TRUE;
+    if(last_activated_time > 0 && ((last_activated_time + timeout_interval) < 
+        current_time))
+            seq_timedout = AXIS2_TRUE;
     return seq_timedout;
 }
 
@@ -291,7 +298,7 @@
     
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env);
     seq_prop_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
-                        property_key, SANDESHA2_SEQ_PROP_LAST_ACTIVATED_TIME);
+        property_key, SANDESHA2_SEQ_PROP_LAST_ACTIVATED_TIME);
     if(seq_prop_bean)
     {
         axis2_char_t *value = NULL;
@@ -305,11 +312,11 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 sandesha2_seq_mgr_setup_new_client_seq(
-        const axis2_env_t *env,
-        axis2_msg_ctx_t *first_app_msg,
-        axis2_char_t *int_seq_id,
-        axis2_char_t *spec_version,
-        sandesha2_storage_mgr_t *storage_mgr)
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *first_app_msg,
+    axis2_char_t *int_seq_id,
+    axis2_char_t *spec_version,
+    sandesha2_storage_mgr_t *storage_mgr)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
     sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;

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?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Mon Feb  5 02:02:45 2007
@@ -433,11 +433,11 @@
     
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env);
     seq_term_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
-                        SANDESHA2_SEQ_PROP_SEQ_TIMED_OUT, SANDESHA2_VALUE_TRUE);
+        SANDESHA2_SEQ_PROP_SEQ_TIMED_OUT, SANDESHA2_VALUE_TRUE);
     
     sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, seq_term_bean);
     sandesha2_terminate_mgr_clean_sending_side_data(env, conf_ctx, seq_id,
-                        svr_side, storage_mgr);
+        svr_side, storage_mgr);
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/sandesha/trunk/c/src/workers/sender.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender.c?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender.c Mon Feb  5 02:02:45 2007
@@ -262,12 +262,10 @@
         sandesha2_sender_bean_t *sender_bean = NULL;
         sandesha2_sender_worker_t *sender_worker = NULL;
         axis2_char_t *msg_id = NULL;
-        printf("in sender\n");   
+        printf("in sender\n");
         AXIS2_SLEEP(SANDESHA2_SENDER_SLEEP_TIME); 
-        /*axis2_allocator_switch_to_global_pool(env->allocator);*/
         transaction = sandesha2_storage_mgr_get_transaction(storage_mgr,
             env);
-        /*axis2_allocator_switch_to_local_pool(env->allocator);*/
         mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
         seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
             storage_mgr, 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?view=diff&rev=503613&r1=503612&r2=503613
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Mon Feb  5 02:02:45 2007
@@ -268,9 +268,7 @@
     storage_mgr = sandesha2_utils_get_storage_mgr(env, 
         sender_worker->conf_ctx, 
         AXIS2_CONF_CTX_GET_CONF(sender_worker->conf_ctx, env));
-    /*axis2_allocator_switch_to_global_pool(env->allocator);*/
     transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-    /*axis2_allocator_switch_to_local_pool(env->allocator);*/
     sender_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
     sender_worker_bean = sandesha2_sender_mgr_retrieve(sender_mgr, env, msg_id);
     if(!sender_worker_bean)
@@ -333,8 +331,11 @@
     }
     rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
     
-    prop_bean = sandesha2_utils_get_property_bean_from_op(env, 
-                    AXIS2_MSG_CTX_GET_OP(msg_ctx, env));
+    /* Avoid retrieving property bean from operation until it is availbale */
+    /*prop_bean = sandesha2_utils_get_property_bean_from_op(env, 
+        AXIS2_MSG_CTX_GET_OP(msg_ctx, env));*/
+    prop_bean = sandesha2_utils_get_property_bean(env, 
+        axis2_conf_ctx_get_conf(sender_worker->conf_ctx, env));
     if(prop_bean)
         msgs_not_to_send = sandesha2_property_bean_get_msg_types_to_drop(
             prop_bean, env);
@@ -365,7 +366,7 @@
         }
     }
     /* 
-     *   This method is not implemented yet
+     *  This method is not implemented yet
      *  update_msg(sender_worker, env, msg_xtx);
      */
     msg_type = sandesha2_msg_ctx_get_msg_type(rm_msg_ctx, env);
@@ -416,9 +417,7 @@
         sleep(300000);*/
                     
     }
-    /*axis2_allocator_switch_to_global_pool(env->allocator);*/
     transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-    /*axis2_allocator_switch_to_local_pool(env->allocator);*/
     property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
         SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE); 
     if(property)



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