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/03/05 12:27:36 UTC
svn commit: r514650 - in /webservices/sandesha/trunk/c:
include/sandesha2_constants.h src/handlers/sandesha2_global_in_handler.c
src/util/terminate_mgr.c
Author: damitha
Date: Mon Mar 5 03:27:30 2007
New Revision: 514650
URL: http://svn.apache.org/viewvc?view=rev&rev=514650
Log:
cleaning the receiving side properties
Modified:
webservices/sandesha/trunk/c/include/sandesha2_constants.h
webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
webservices/sandesha/trunk/c/src/util/terminate_mgr.c
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=514650&r1=514649&r2=514650
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Mon Mar 5 03:27:30 2007
@@ -504,6 +504,7 @@
#define SANDESHA2_BUSY_WAIT_TIME 8
#define SANDESHA2_IS_SVR_SIDE "is_svr_side"
#define SANDESHA2_DB "sandesha2_db"
+ #define SANDESHA2_HANDLER_ALREADY_VISITED "sandesha2_visited"
/** @} */
#ifdef __cplusplus
}
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=514650&r1=514649&r2=514650
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Mon Mar 5 03:27:30 2007
@@ -123,6 +123,16 @@
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Not a global RM Message");
return AXIS2_SUCCESS;
}
+ property = axis2_msg_ctx_get_property(msg_ctx, env,
+ SANDESHA2_HANDLER_ALREADY_VISITED, AXIS2_FALSE);
+ if(property)
+ {
+ axis2_char_t *value = axis2_property_get_value(property, env);
+ if(0 == axis2_strcmp(SANDESHA2_VALUE_TRUE, value))
+ {
+ return AXIS2_SUCCESS;
+ }
+ }
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
if(!conf_ctx)
{
@@ -261,6 +271,9 @@
AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop,
AXIS2_FALSE);
}
+ property = axis2_property_create_with_args(env, 0, 0, 0, SANDESHA2_VALUE_TRUE);
+ axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_HANDLER_ALREADY_VISITED,
+ property, AXIS2_FALSE);
AXIS2_LOG_INFO(env->log,
"[sandesha2]Exit sandesha2 global in handler ......");
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=514650&r1=514649&r2=514650
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Mon Mar 5 03:27:30 2007
@@ -188,7 +188,7 @@
SANDESHA2_CLEANED_ON_TERMINATE_MSG))
{
sandesha2_terminate_mgr_complete_termination_of_recv_side(env, conf_ctx, seq_id,
- storage_mgr);
+ storage_mgr);
}
else
{
@@ -274,6 +274,8 @@
{
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
sandesha2_seq_property_bean_t *all_seq_bean = NULL;
+ axis2_array_list_t *found_list = NULL;
+ sandesha2_seq_property_bean_t *find_seq_prop_bean = NULL;
AXIS2_LOG_INFO(env->log,
"[sandesha2]Entry:sandesha2_terminate_mgr_remove_recv_side_properties");
@@ -308,6 +310,41 @@
SANDESHA2_ARRAY_LIST_STRING);
sandesha2_seq_property_bean_set_value(all_seq_bean, env, all_seq_str);
sandesha2_seq_property_mgr_update(seq_prop_mgr, env, all_seq_bean);
+ }
+ }
+ find_seq_prop_bean = sandesha2_seq_property_bean_create(env);
+ sandesha2_seq_property_bean_set_seq_id(find_seq_prop_bean, env, seq_id);
+ found_list = sandesha2_seq_property_mgr_find(seq_prop_mgr, env,
+ find_seq_prop_bean);
+ if(found_list)
+ {
+ int i = 0, size = 0;
+ size = AXIS2_ARRAY_LIST_SIZE(found_list, env);
+ for(i = 0; i < size; i++)
+ {
+ sandesha2_seq_property_bean_t *seq_prop_bean = NULL;
+
+ seq_prop_bean = AXIS2_ARRAY_LIST_GET(found_list, env, i);
+ /*sandesha2_terminate_mgr_do_updates_if_needed(env, out_seq_id,
+ seq_prop_bean, seq_prop_mgr);*/
+ /* test comment */
+ if(sandesha2_terminate_mgr_is_property_deletable(env,
+ sandesha2_seq_property_bean_get_name(seq_prop_bean, env)))
+ {
+ axis2_char_t *highest_in_msg_key_str = NULL;
+ axis2_char_t *seq_id = sandesha2_seq_property_bean_get_seq_id(
+ seq_prop_bean, env);
+ axis2_char_t *name = sandesha2_seq_property_bean_get_name(
+ seq_prop_bean, env);
+ if(axis2_strcmp(name, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER))
+ {
+ highest_in_msg_key_str =
+ sandesha2_seq_property_bean_get_value(seq_prop_bean, env);
+ sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env,
+ highest_in_msg_key_str);
+ }
+ sandesha2_seq_property_mgr_remove(seq_prop_mgr, env, seq_id, name);
+ }
}
}
AXIS2_LOG_INFO(env->log,
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org