Author: manjula
Date: Thu Sep 18 01:44:04 2008
New Revision: 696602

URL: http://svn.apache.org/viewvc?rev=696602&view=rev
Log:
Adding policy support

Modified:
    webservices/sandesha/trunk/c/config/module.xml
    webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h
    webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h
    webservices/sandesha/trunk/c/include/sandesha2_utils.h
    webservices/sandesha/trunk/c/samples/RMSampleService/services.xml
    webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c
    webservices/sandesha/trunk/c/samples/rm_ping_1_0/rm_ping_1_0.c
    webservices/sandesha/trunk/c/src/core/mod_sandesha2.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/msg_retrans_adjuster.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

Modified: webservices/sandesha/trunk/c/config/module.xml
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Thu Sep 18 01:44:04 2008
@@ -69,15 +69,5 @@
    <!-- Database name parameter -->
    <parameter name="sandesha2_db" locked="false">/tmp/sandesha2_db</parameter>
    <!-- General parameters -->
-    <parameter name="ExponentialBackoff" locked="false">AXIS2_FALSE</parameter>
-    <parameter name="RetransmissionInterval" 
locked="false">8</parameter><!--In seconds-->
-    <parameter name="InactivityTimeout" locked="false">64</parameter><!--In 
seconds-->
-    <parameter name="InvokeInOrder" locked="false">AXIS2_FALSE</parameter>
-    <parameter name="MessageTypesToDrop" locked="false">none</parameter>
-    <parameter name="MaxRetransCount" locked="false">10</parameter>
-    <parameter name="SenderSleepTime" locked="false">1</parameter><!--In 
seconds-->
-    <parameter name="InvokerSleepTime" locked="false">1</parameter>
-    <parameter name="PollingWaitTime" locked="false">4</parameter>
-    <parameter name="TerminateDelay" locked="false">4</parameter>
 
 </module>

Modified: webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h 
(original)
+++ webservices/sandesha/trunk/c/include/sandesha2_msg_retrans_adjuster.h Thu 
Sep 18 01:44:04 2008
@@ -30,6 +30,7 @@
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_sender_bean.h>
 #include <axis2_conf_ctx.h>
+#include <axis2_svc.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -53,7 +54,8 @@
     sandesha2_storage_mgr_t *storage_mgr,
     struct sandesha2_seq_property_mgr *seq_prop_mgr,
     struct sandesha2_create_seq_mgr *create_seq_mgr,
-    struct sandesha2_sender_mgr *sender_mgr);
+    struct sandesha2_sender_mgr *sender_mgr,
+    axis2_svc_t *svc);
 
 
 /** @} */

Modified: webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h Thu Sep 18 
01:44:04 2008
@@ -67,7 +67,8 @@
     const axutil_env_t *env,
     axis2_char_t *property_key,
     struct sandesha2_seq_property_mgr *seq_prop_mgr,
-    axis2_conf_ctx_t *conf_ctx);
+    axis2_svc_t *svc
+    /*axis2_conf_ctx_t *conf_ctx*/);
         
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 sandesha2_seq_mgr_setup_new_rms_sequence(

Modified: webservices/sandesha/trunk/c/include/sandesha2_utils.h
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_utils.h?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_utils.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_utils.h Thu Sep 18 01:44:04 
2008
@@ -83,7 +83,8 @@
 AXIS2_EXTERN sandesha2_property_bean_t* AXIS2_CALL
 sandesha2_utils_get_property_bean(
     const axutil_env_t *env,
-    axis2_conf_t *conf);
+    axis2_svc_t *svc
+    /*axis2_conf_t *conf*/);
 
 AXIS2_EXTERN sandesha2_property_bean_t* AXIS2_CALL
 sandesha2_utils_get_property_bean_from_op(

Modified: webservices/sandesha/trunk/c/samples/RMSampleService/services.xml
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/RMSampleService/services.xml?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/RMSampleService/services.xml (original)
+++ webservices/sandesha/trunk/c/samples/RMSampleService/services.xml Thu Sep 
18 01:44:04 2008
@@ -16,4 +16,25 @@
     <operation name="mtomSample">
             <parameter name="wsamapping" 
>http://ws.apache.org/axis2/c/samples/mtom</parameter>
     </operation>
+
+    <wsp:Policy wsu:Id="RmPolicy" 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"; 
xmlns:sanc="http://ws.apache.org/sandesha2/c/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <wsrm:RMAssertion>
+                    <wsrm:InactivityTimeout Milliseconds="600000"/>
+                    <wsrm:AcknowledgementInterval Milliseconds="200"/>
+                    <wsrm:BaseRetransmissionInterval Milliseconds="300"/>
+                    <wsrm:ExponentialBackoff/>
+                    <sanc:InactivityTimeout>64</sanc:InactivityTimeout>
+                    <sanc:StorageManager>persistent</sanc:StorageManager>
+                    <sanc:MessageTypesToDrop>none</sanc:MessageTypesToDrop>
+                    <sanc:MaxRetransCount>10</sanc:MaxRetransCount>
+                    <sanc:SenderSleepTime>1</sanc:SenderSleepTime><!--In 
seconds-->
+                    <sanc:InvokerSleepTime>1</sanc:InvokerSleepTime>
+                    <sanc:PollingWaitTime>4</sanc:PollingWaitTime>
+                    <sanc:TerminateDelay>4</sanc:TerminateDelay>
+                </wsrm:RMAssertion>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
 </service>

Modified: webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c Thu Sep 18 
01:44:04 2008
@@ -28,6 +28,8 @@
 #include <sandesha2_client.h>
 #include <platforms/axutil_platform_auto_sense.h>
 #include <ctype.h>
+#include <neethi_policy.h>
+#include <neethi_util.h>
 
 #define SANDESHA2_MAX_COUNT 2
 
@@ -70,6 +72,8 @@
     axis2_char_t *offered_seq_id = NULL;
     int c;
     int i = 0;
+    neethi_policy_t *policy = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
    
     /* Set up the environment */
     env = axutil_env_create_all("rm_echo_1_0.log", 
@@ -146,6 +150,22 @@
             AXIS2_ERROR_GET_MESSAGE(env->error));
         return -1;
     }
+
+     /*Create the policy, from file*/
+    policy = neethi_util_create_policy_from_file(env, "policy.xml");
+    if(!policy)
+    {
+        printf("\nPolicy creation failed from the file");
+        return 0;
+    }
+
+    status = axis2_svc_client_set_policy(svc_client, env, policy);
+
+    if(status == AXIS2_FAILURE)
+    {
+        printf("Policy setting failed\n");
+    }
+
     axis2_options_set_soap_version(options, env, AXIOM_SOAP11);
 
     /* Offer sequence */

Modified: webservices/sandesha/trunk/c/samples/rm_ping_1_0/rm_ping_1_0.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping_1_0/rm_ping_1_0.c?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping_1_0/rm_ping_1_0.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping_1_0/rm_ping_1_0.c Thu Sep 18 
01:44:04 2008
@@ -22,6 +22,8 @@
 #include <sandesha2_client_constants.h>
 #include <sandesha2_constants.h>
 #include <ctype.h>
+#include <neethi_util.h>
+#include <neethi_policy.h>
 
 #define SANDESHA2_SLEEP 2
 
@@ -48,7 +50,8 @@
     axutil_property_t *property = NULL;
     int c;
     axis2_char_t *seq_key = NULL;
-   
+    neethi_policy_t *policy = NULL;
+ 
     /* Set up the environment */
     env = axutil_env_create_all("rm_ping.log", AXIS2_LOG_LEVEL_TRACE);
 
@@ -108,10 +111,25 @@
     if (!svc_client)
     {
         printf("Error creating service client\n");
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error 
code: %d :: %s", 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error 
code: %d :: %s",
                 env->error->error_number, AXIS2_ERROR_GET_MESSAGE(env->error));
     }
 
+    /*Create the policy, from file*/
+    policy = neethi_util_create_policy_from_file(env, "policy.xml");
+    if(!policy)
+    {
+        printf("\nPolicy creation failed from the file");
+        return 0;
+    }
+
+    status = axis2_svc_client_set_policy(svc_client, env, policy);
+
+    if(status == AXIS2_FAILURE)
+    {
+        printf("Policy setting failed\n");
+    }
+
     /* Set service client options */
     axis2_svc_client_set_options(svc_client, env, options);    
     

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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/core/mod_sandesha2.c (original)
+++ webservices/sandesha/trunk/c/src/core/mod_sandesha2.c Thu Sep 18 01:44:04 
2008
@@ -65,8 +65,8 @@
     axis2_module_desc_t *module_desc)
 {
     /*sandesha2_property_bean_t *property_bean = NULL;
-    axutil_param_t *param = NULL;*/
-    axis2_conf_t *conf = NULL;
+    axutil_param_t *param = NULL;
+    axis2_conf_t *conf = NULL;*/
     axis2_ctx_t *ctx = NULL;
     
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] 
Entry:mod_sandesha2_init");
@@ -81,10 +81,10 @@
     }
         
     param = axutil_param_create(env, SANDESHA2_SANDESHA_PROPERTY_BEAN, 
property_bean);
-    axutil_param_set_value_free(param, env, 
sandesha2_property_bean_free_void_arg); */
+    axutil_param_set_value_free(param, env, 
sandesha2_property_bean_free_void_arg);
 
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
-    /*axis2_conf_add_param(conf, env, param);*/
+    axis2_conf_add_param(conf, env, param);*/
 
     ctx = axis2_conf_ctx_get_base(conf_ctx, env);
     axis2_ctx_set_property(ctx, env, SANDESHA2_INMEMORY_STORAGE_MGR, NULL);

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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Thu 
Sep 18 01:44:04 2008
@@ -310,6 +310,7 @@
         axis2_msg_ctx_t *msg_ctx = NULL;
         axis2_engine_t *engine = NULL;
         axis2_transport_out_desc_t *transport_out = NULL;
+        axis2_svc_t *svc = NULL;
         
         sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
         key = axutil_uuid_gen(env);
@@ -330,8 +331,26 @@
         /* 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));
+    
+        svc = axis2_msg_ctx_get_svc(ack_msg_ctx, env);
+        if(!svc)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "[sandesha2][ack_req_msg_processor.c] service is NULL");
+            return AXIS2_FAILURE;
+        }
+
+        prop_bean = sandesha2_utils_get_property_bean(env, svc);
+        if(!prop_bean)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "[sandesha2][ack_req_msg_processor.c] Property bean is NULL");
+            return AXIS2_FAILURE;
+        }
+
+        /*prop_bean = sandesha2_utils_get_property_bean(env, 
+            axis2_conf_ctx_get_conf(conf_ctx, env));*/
+        prop_bean = sandesha2_utils_get_property_bean(env, svc);    
         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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Thu Sep 
18 01:44:04 2008
@@ -305,7 +305,9 @@
     const axis2_char_t *wsa_action = NULL;
     const axis2_char_t *soap_action = NULL;
     axis2_char_t *dbname = NULL;
-   
+    axis2_svc_t *svc = NULL;
+    sandesha2_property_bean_t *property_bean = NULL;  
+ 
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
@@ -321,6 +323,22 @@
         return AXIS2_FAILURE;
     }
 
+    svc = axis2_msg_ctx_get_svc(app_msg_ctx, env);
+    if(!svc)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][app_msg_propcessor.c] service is NULL");
+        return AXIS2_FAILURE;
+    }
+
+    property_bean = sandesha2_utils_get_property_bean(env, svc);
+    if(!property_bean)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][app_msg_propcessor.c] Property bean is NULL");
+        return AXIS2_FAILURE;
+    }
+
     property = sandesha2_msg_ctx_get_property(rm_msg_ctx, env, 
         SANDESHA2_APPLICATION_PROCESSING_DONE);
     
@@ -716,8 +734,11 @@
 
     sandesha2_next_msg_bean_free(next_msg_bean, env);
 
-    in_order_invoke = 
sandesha2_property_bean_is_in_order(sandesha2_utils_get_property_bean(env, 
-            axis2_conf_ctx_get_conf(conf_ctx, env)), env);
+    /*in_order_invoke = 
sandesha2_property_bean_is_in_order(sandesha2_utils_get_property_bean(env, 
+            axis2_conf_ctx_get_conf(conf_ctx, env)), env);*/
+
+    in_order_invoke =  sandesha2_property_bean_is_in_order(property_bean, env);
+
     /* test code */
     if(axis2_msg_ctx_get_server_side(app_msg_ctx, env))
     {
@@ -2186,6 +2207,7 @@
     axis2_bool_t is_svr_side = AXIS2_FALSE;
     axis2_op_ctx_t *temp_op_ctx = NULL;
     axis2_listener_manager_t *listener_manager = NULL;
+    axis2_svc_t *svc = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2]Entry:sandesha2_app_msg_processor_send_create_seq_msg");
@@ -2207,6 +2229,22 @@
         return AXIS2_FAILURE;
     }
 
+    svc = axis2_msg_ctx_get_svc(msg_ctx, env);
+    if(!svc)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][app_msg_propcessor.c] service is NULL");
+        return AXIS2_FAILURE;
+    }
+
+    property_bean = sandesha2_utils_get_property_bean(env, svc);
+    if(!property_bean)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][app_msg_propcessor.c] Property bean is NULL");
+        return AXIS2_FAILURE;
+    }
+
     /* If this is a one way message and if use_separate_listener property is 
set to true we need to 
      * start a listener manager so that create sequence response could be 
listened at
      */
@@ -2376,7 +2414,7 @@
     }
 
 
-    property_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));
+    /*property_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));*/
     retrans_interval = 
sandesha2_property_bean_get_retrans_interval(property_bean, env); 
 
     create_seq_op = axis2_msg_ctx_get_op(create_seq_msg_ctx, env);
@@ -2442,7 +2480,7 @@
         while(!rms_sequence_bean)
         {
             continue_sending = 
sandesha2_msg_retrans_adjuster_adjust_retrans(env, create_sequence_sender_bean, 
-                    conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr);
+                    conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr, svc);
 
             sandesha2_sender_mgr_update(sender_mgr, env, 
create_sequence_sender_bean);
 
@@ -2605,6 +2643,7 @@
     axis2_msg_ctx_t *create_seq_msg_ctx = NULL;
     sandesha2_sender_bean_t *find_sender_bean = NULL;
     sandesha2_sender_bean_t *sender_bean = NULL;
+    axis2_svc_t *svc = NULL;
 
     args = (sandesha2_app_msg_processor_args_t*) data;
     env = args->env;
@@ -2645,6 +2684,14 @@
     transport_out = axis2_msg_ctx_get_transport_out_desc(create_seq_msg_ctx, 
env);
     transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
 
+    svc = axis2_msg_ctx_get_svc(create_seq_msg_ctx, env);
+    if(!svc)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][app_msg_processor.c] service is NULL");
+        return AXIS2_FAILURE;
+    }
+
 
     while(sender_bean)
     {
@@ -2658,7 +2705,7 @@
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "rms_sequence_bean is NULL");
 
         continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, 
create_sequence_sender_bean, 
-                conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr);
+                conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr, svc);
 
         sandesha2_sender_mgr_update(sender_mgr, env, 
create_sequence_sender_bean);
 
@@ -2883,6 +2930,7 @@
     const axis2_char_t *mep = NULL;
     axis2_relates_to_t *relates_to = NULL;
     sandesha2_seq_property_bean_t *relates_to_bean = NULL;
+    axis2_svc_t *svc = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,   
         "[Sandesha2] Entry:sandesha2_app_msg_processor_send_app_msg");
@@ -2896,6 +2944,8 @@
     app_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
     conf_ctx = axis2_msg_ctx_get_conf_ctx(app_msg_ctx, env);
 
+    svc = axis2_msg_ctx_get_svc(app_msg_ctx, env);
+
     relates_to = axis2_msg_ctx_get_relates_to(app_msg_ctx, env);
     if(relates_to)
     {
@@ -3240,7 +3290,7 @@
     }
 
     continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, 
app_msg_sender_bean, 
-            conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+            conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr, 
svc);
 
     if(app_msg_sender_bean)
     {
@@ -3374,7 +3424,7 @@
             while(AXIS2_TRUE && transport_sender)
             {
                 continue_sending = 
sandesha2_msg_retrans_adjuster_adjust_retrans(env, sender_bean, 
-                        conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr);
+                        conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr, svc);
 
                 sandesha2_sender_mgr_update(sender_mgr, env, sender_bean);
                 
@@ -3717,6 +3767,7 @@
     axis2_bool_t successfully_sent = AXIS2_FALSE;
     axis2_status_t status = AXIS2_SUCCESS;
     axis2_bool_t resend = AXIS2_FALSE;
+    axis2_svc_t *svc = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] 
Entry:sandesha2_app_msg_processor_resend");
 
@@ -3727,8 +3778,10 @@
         return AXIS2_FAILURE;
     }
 
+    svc = axis2_msg_ctx_get_svc(app_msg_ctx, env);
+
     continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, 
sender_worker_bean, 
-            conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+            conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr, 
svc);
     sandesha2_sender_mgr_update(sender_mgr, env, sender_worker_bean);
     if(!continue_sending)
     {

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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c 
(original)
+++ 
webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c 
Thu Sep 18 01:44:04 2008
@@ -252,6 +252,7 @@
     axis2_char_t *dbname = NULL;
     /*const axis2_char_t *wsa_action = NULL;
     axutil_string_t *soap_action = NULL;*/
+    axis2_svc_t *svc = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         
"[sandesha2]Entry:sandesha2_make_connection_msg_processor_process_in_msg");
@@ -331,6 +332,8 @@
         return AXIS2_SUCCESS;
     }
 
+    svc = axis2_msg_ctx_get_svc(msg_ctx, env);
+
     transport_out = axis2_msg_ctx_get_transport_out_desc(msg_ctx, env);
     if(!transport_out)
     {
@@ -418,7 +421,7 @@
     msg_id = sandesha2_sender_bean_get_msg_id(sender_bean, env);
     
     continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env, 
sender_bean, conf_ctx, 
-            storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr);
+            storage_mgr, seq_prop_mgr, create_seq_mgr, sender_mgr, svc);
 
     if(!continue_sending)
     {
@@ -483,7 +486,7 @@
         return AXIS2_SUCCESS;
     }
     
-    prop_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));
+    prop_bean = sandesha2_utils_get_property_bean(env, 
svc/*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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/polling/polling_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/polling/polling_mgr.c Thu Sep 18 01:44:04 
2008
@@ -261,7 +261,7 @@
     next_msg_mgr = sandesha2_permanent_next_msg_mgr_create(env, dbname);
  
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
-    property_bean = sandesha2_utils_get_property_bean(env, conf);
+    /*property_bean = sandesha2_utils_get_property_bean(env, conf);*/
     wait_time = sandesha2_property_bean_get_polling_delay(property_bean, env);
 
     find_sender_bean = sandesha2_sender_bean_create(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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Thu Sep 18 
01:44:04 2008
@@ -56,7 +56,8 @@
     sandesha2_storage_mgr_t *storage_mgr,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
     sandesha2_create_seq_mgr_t *create_seq_mgr,
-    sandesha2_sender_mgr_t *sender_mgr)
+    sandesha2_sender_mgr_t *sender_mgr,
+    axis2_svc_t *svc)
 {
     axis2_char_t *stored_key = NULL;
     axis2_char_t *internal_sequence_id = NULL;
@@ -86,7 +87,10 @@
 
     internal_sequence_id = 
sandesha2_sender_bean_get_internal_seq_id(sender_bean, env);
    
-    property_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));
+    /*property_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));*/
+
+    property_bean = sandesha2_utils_get_property_bean(env, svc);
+
     sent_count = sandesha2_sender_bean_get_sent_count(sender_bean, env) + 1;
     sandesha2_sender_bean_set_sent_count(sender_bean, env, sent_count);
     sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(env, sender_bean, 
property_bean);
@@ -102,7 +106,7 @@
     }
 
     seq_timed_out = sandesha2_seq_mgr_has_seq_timedout(env, 
internal_sequence_id, seq_prop_mgr, 
-            conf_ctx);
+            /*conf_ctx*/svc);
     
     if(seq_timed_out)
     {

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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Thu Sep 18 01:44:04 
2008
@@ -215,14 +215,16 @@
 AXIS2_EXTERN sandesha2_property_bean_t* AXIS2_CALL
 sandesha2_utils_get_property_bean(
     const axutil_env_t *env,
-    axis2_conf_t *conf)
+    axis2_svc_t *svc
+    /*axis2_conf_t *conf*/)
     
 {
     axutil_param_t *param = NULL;
     
-    AXIS2_PARAM_CHECK(env->error, conf, NULL);
+    AXIS2_PARAM_CHECK(env->error, svc/*conf*/, NULL);
     
-    param = axis2_conf_get_param(conf, env, SANDESHA2_SANDESHA_PROPERTY_BEAN);
+    /*param = axis2_conf_get_param(conf, env, 
SANDESHA2_SANDESHA_PROPERTY_BEAN);*/
+    param = axis2_svc_get_param(svc, env, SANDESHA2_SANDESHA_PROPERTY_BEAN);
     if(!param)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]Configuration not 
set");
@@ -1245,8 +1247,8 @@
     axis2_msg_info_headers_set_from(msg_info_headers, env, to);
 
     msg_id = axis2_msg_info_headers_get_message_id(old_msg_info_headers, env);
-    relates_to = axis2_relates_to_create(env, msg_id,
-            AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE);
+    relates_to = axis2_relates_to_create(env, msg_id, NULL
+            /*AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE*/);
     axis2_msg_info_headers_set_relates_to(msg_info_headers, env, relates_to);
 
     action = axis2_msg_info_headers_get_action(old_msg_info_headers, 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?rev=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Thu Sep 18 01:44:04 2008
@@ -294,7 +294,8 @@
     const axutil_env_t *env,
     axis2_char_t *property_key,
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
-    axis2_conf_ctx_t *conf_ctx)
+    axis2_svc_t *svc
+    /*axis2_conf_ctx_t *conf_ctx*/)
 {
     sandesha2_property_bean_t *property_bean = NULL;
     axis2_bool_t seq_timedout = AXIS2_FALSE;
@@ -307,7 +308,7 @@
     AXIS2_PARAM_CHECK(env->error, property_key, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, seq_prop_mgr, AXIS2_FALSE);
     
-    property_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));
+    property_bean = sandesha2_utils_get_property_bean(env, 
svc/*axis2_conf_ctx_get_conf(conf_ctx, env)*/);
     timeout_interval = 
sandesha2_property_bean_get_inactive_timeout_interval(property_bean, env);
     if(timeout_interval <= 0)
     {

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=696602&r1=696601&r2=696602&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Thu Sep 18 01:44:04 
2008
@@ -850,6 +850,8 @@
     axis2_endpoint_ref_t *reply_to_epr = NULL;
     axis2_bool_t is_svr_side = AXIS2_FALSE;
     axis2_char_t *msg_id = NULL;
+    axis2_svc_t *svc = NULL;
+
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2] Entry:sandesha2_terminate_mgr_send_terminate_seq_msg");
@@ -864,6 +866,22 @@
     
     ack_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(ack_rm_msg_ctx, env);
     conf_ctx = axis2_msg_ctx_get_conf_ctx(ack_msg_ctx, env);
+
+    svc = axis2_msg_ctx_get_svc(ack_msg_ctx, env);
+    if(!svc)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][terminate_mgr.c] service is NULL");
+        return AXIS2_FAILURE;
+    }
+
+    property_bean = sandesha2_utils_get_property_bean(env, svc);
+    if(!property_bean)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "[sandesha2][terminate_mgr.c] Property bean is NULL");
+        return AXIS2_FAILURE;
+    }
     
     terminate_rm_msg_ctx = sandesha2_msg_creator_create_terminate_seq_msg(env, 
ack_rm_msg_ctx, 
             rms_sequence_id, internal_sequence_id, seq_prop_mgr);
@@ -1033,7 +1051,7 @@
     terminate_sender_bean = sandesha2_sender_bean_create(env);
     sandesha2_sender_bean_set_msg_ctx_ref_key(terminate_sender_bean, env, key);
     /*sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, key, 
terminate_msg_ctx, AXIS2_TRUE);*/
-    property_bean = sandesha2_utils_get_property_bean(env, 
axis2_conf_ctx_get_conf(conf_ctx, env));
+    property_bean = sandesha2_utils_get_property_bean(env, 
svc/*axis2_conf_ctx_get_conf(conf_ctx, env)*/);
     terminate_delay = 
sandesha2_property_bean_get_terminate_delay(property_bean, env); 
     send_time = sandesha2_utils_get_current_time_in_millis(env) + 
terminate_delay;
     sandesha2_sender_bean_set_time_to_send(terminate_sender_bean, env, 
send_time);
@@ -1130,7 +1148,7 @@
                     "[sandesha2] Terminate Sequence response message not 
found. So continuing");
 
                 continue_sending = 
sandesha2_msg_retrans_adjuster_adjust_retrans(env, terminate_sender_bean, 
-                        conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr);
+                        conf_ctx, storage_mgr, seq_prop_mgr, create_seq_mgr, 
sender_mgr, svc);
 
                 sandesha2_sender_mgr_update(sender_mgr, env, 
terminate_sender_bean);
 



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

Reply via email to