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 2008/10/02 18:28:19 UTC
svn commit: r701177 - in /webservices/sandesha/trunk/c:
samples/policy/rm10-policy.xml samples/policy/rm11-policy.xml
src/msgprocessors/app_msg_processor.c src/util/msg_retrans_adjuster.c
Author: damitha
Date: Thu Oct 2 09:28:18 2008
New Revision: 701177
URL: http://svn.apache.org/viewvc?rev=701177&view=rev
Log:
Fixed indefinite loop in sending create sequence message when server is not started. Now it stop sending after
a certain number of resends specified in policy
Modified:
webservices/sandesha/trunk/c/samples/policy/rm10-policy.xml
webservices/sandesha/trunk/c/samples/policy/rm11-policy.xml
webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
Modified: webservices/sandesha/trunk/c/samples/policy/rm10-policy.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/policy/rm10-policy.xml?rev=701177&r1=701176&r2=701177&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/policy/rm10-policy.xml (original)
+++ webservices/sandesha/trunk/c/samples/policy/rm10-policy.xml Thu Oct 2 09:28:18 2008
@@ -9,7 +9,7 @@
<sanc:InactivityTimeout>64</sanc:InactivityTimeout>
<sanc:StorageManager>persistent</sanc:StorageManager>
<sanc:MessageTypesToDrop>none</sanc:MessageTypesToDrop>
- <sanc:MaxRetransCount>10</sanc:MaxRetransCount>
+ <sanc:MaxRetransCount>4</sanc:MaxRetransCount>
<sanc:SenderSleepTime>1</sanc:SenderSleepTime><!--In seconds-->
<sanc:InvokerSleepTime>1</sanc:InvokerSleepTime>
<sanc:PollingWaitTime>4</sanc:PollingWaitTime>
Modified: webservices/sandesha/trunk/c/samples/policy/rm11-policy.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/policy/rm11-policy.xml?rev=701177&r1=701176&r2=701177&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/policy/rm11-policy.xml (original)
+++ webservices/sandesha/trunk/c/samples/policy/rm11-policy.xml Thu Oct 2 09:28:18 2008
@@ -15,7 +15,7 @@
<sanc:BaseRetransmissionInterval>8</sanc:BaseRetransmissionInterval>
<sanc:StorageManager>persistent</sanc:StorageManager>
<sanc:MessageTypesToDrop>none</sanc:MessageTypesToDrop>
- <sanc:MaxRetransCount>10</sanc:MaxRetransCount>
+ <sanc:MaxRetransCount>4</sanc:MaxRetransCount>
<sanc:SenderSleepTime>1</sanc:SenderSleepTime><!--In seconds-->
<sanc:InvokerSleepTime>1</sanc:InvokerSleepTime>
<sanc:PollingWaitTime>4</sanc:PollingWaitTime>
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=701177&r1=701176&r2=701177&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Thu Oct 2 09:28:18 2008
@@ -100,12 +100,12 @@
long msg_num,
sandesha2_seq_property_mgr_t *seq_prop_mgr);
-static void * AXIS2_THREAD_FUNC
+/*static void * AXIS2_THREAD_FUNC
sandesha2_app_msg_processor_create_seq_msg_worker_function(
axutil_thread_t *thd,
- void *data);
+ void *data);*/
-static axis2_status_t
+/*static axis2_status_t
sandesha2_app_msg_processor_start_create_seq_msg_resender(
const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx,
@@ -114,7 +114,7 @@
const axis2_bool_t is_server_side,
int retrans_interval,
sandesha2_sender_bean_t *create_sequence_sender_bean,
- axis2_msg_ctx_t *create_seq_msg_ctx);
+ axis2_msg_ctx_t *create_seq_msg_ctx);*/
static void * AXIS2_THREAD_FUNC
sandesha2_app_msg_processor_application_msg_worker_function(
@@ -2370,8 +2370,8 @@
* 3. reply_to_addr is anonymous
* go into the following loop.
*/
- if(!is_svr_side && (listener_manager || !reply_to_addr || sandesha2_utils_is_anon_uri(env,
- reply_to_addr)))
+ /*if(!is_svr_side && (listener_manager || !reply_to_addr || sandesha2_utils_is_anon_uri(env,
+ reply_to_addr)))*/
{
if(axis2_engine_send(engine, env, create_seq_msg_ctx))
{
@@ -2454,7 +2454,7 @@
axis2_msg_ctx_free(create_seq_msg_ctx, env);
}
}
- else
+ /*else
{
if(axis2_engine_send(engine, env, create_seq_msg_ctx))
{
@@ -2476,10 +2476,10 @@
rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id,
SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);
- /* Dual channel */
+ // Dual channel
sandesha2_app_msg_processor_start_create_seq_msg_resender(env, conf_ctx, internal_sequence_id,
msg_id, is_svr_side, retrans_interval, create_sequence_sender_bean, create_seq_msg_ctx);
- }
+ }*/
if(rm_version)
{
@@ -2492,7 +2492,7 @@
return status;
}
-static axis2_status_t
+/*static axis2_status_t
sandesha2_app_msg_processor_start_create_seq_msg_resender(
const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx,
@@ -2533,9 +2533,9 @@
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"[sandesha2] Exit:sandesha2_app_msg_processor_start_create_seq_msg_resender");
return AXIS2_SUCCESS;
-}
+}*/
-static void * AXIS2_THREAD_FUNC
+/*static void * AXIS2_THREAD_FUNC
sandesha2_app_msg_processor_create_seq_msg_worker_function(
axutil_thread_t *thd,
void *data)
@@ -2553,7 +2553,7 @@
axis2_bool_t is_server_side = AXIS2_FALSE;
sandesha2_sender_bean_t *create_sequence_sender_bean = NULL;
axis2_char_t *msg_id = NULL;
- /*sandesha2_seq_property_bean_t *rms_sequence_bean = NULL;*/
+ // sandesha2_seq_property_bean_t *rms_sequence_bean = NULL;
axis2_bool_t continue_sending = AXIS2_TRUE;
axis2_transport_out_desc_t *transport_out = NULL;
axis2_transport_sender_t *transport_sender = NULL;
@@ -2595,9 +2595,6 @@
sender_bean = sandesha2_sender_mgr_find_unique(sender_mgr, env, find_sender_bean);
- /*rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id,
- SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);*/
-
create_seq_op = axis2_msg_ctx_get_op(create_seq_msg_ctx, env);
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);
@@ -2638,7 +2635,7 @@
if(transport_sender)
{
- /* This is neccessary to avoid a double free */
+ // This is neccessary to avoid a double free
axis2_msg_ctx_set_property(create_seq_msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
if(!AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, create_seq_msg_ctx))
{
@@ -2646,27 +2643,9 @@
}
}
- /*if(!axis2_msg_ctx_get_server_side(create_seq_msg_ctx, env))
- {
- status = sandesha2_app_msg_processor_process_create_seq_response(env, create_seq_msg_ctx,
- storage_mgr);
-
- if(AXIS2_SUCCESS != status)
- {
- break;
- }
- }*/
-
sender_bean = sandesha2_sender_mgr_find_unique(sender_mgr, env, find_sender_bean);
- /*rms_sequence_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, internal_sequence_id,
- SANDESHA2_SEQUENCE_PROPERTY_RMS_SEQ_ID);*/
}
- /*if(rms_sequence_bean)
- {
- sandesha2_seq_property_bean_free(rms_sequence_bean, env);
- }*/
-
if(find_sender_bean)
{
sandesha2_sender_bean_free(find_sender_bean, env);
@@ -2703,7 +2682,7 @@
axutil_allocator_switch_to_local_pool(env->allocator);
return NULL;
-}
+}*/
static axis2_status_t AXIS2_CALL
sandesha2_app_msg_processor_process_create_seq_response(
@@ -3402,7 +3381,7 @@
return status;
}
- else /* Not client side */
+ else /* Not client side or twoway client side*/
{
axis2_msg_ctx_increment_ref(app_msg_ctx, env);
engine = axis2_engine_create(env, conf_ctx);
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=701177&r1=701176&r2=701177&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Thu Oct 2 09:28:18 2008
@@ -94,6 +94,8 @@
sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(env, sender_bean, property_bean);
max_attempts = sandesha2_property_bean_get_max_retrans_count(property_bean, env);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "max_attempts:%d", max_attempts);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "sent_count:%d", sent_count);
if(max_attempts > 0 && sent_count > max_attempts)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org