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 2006/07/18 09:21:00 UTC
svn commit: r422998 - in /webservices/sandesha/trunk/c/src/util: Makefile.am
seq_mgr.c
Author: damitha
Date: Tue Jul 18 00:21:00 2006
New Revision: 422998
URL: http://svn.apache.org/viewvc?rev=422998&view=rev
Log:
More work on seq_mgr
Modified:
webservices/sandesha/trunk/c/src/util/Makefile.am
webservices/sandesha/trunk/c/src/util/seq_mgr.c
Modified: webservices/sandesha/trunk/c/src/util/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/Makefile.am?rev=422998&r1=422997&r2=422998&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/util/Makefile.am Tue Jul 18 00:21:00 2006
@@ -6,7 +6,8 @@
spec_specific_consts.c\
fault_data.c\
fault_mgr.c\
- ack_mgr.c
+ ack_mgr.c \
+ seq_mgr.c
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/include/sandesha2 \
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=422998&r1=422997&r2=422998&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Tue Jul 18 00:21:00 2006
@@ -24,6 +24,8 @@
#include <sandesha2_constants.h>
#include <sandesha2_msg_ctx.h>
#include <sandesha2_create_seq.h>
+#include <sandesha2_acks_to.h>
+#include <sandesha2_address.h>
#include <axis2_conf_ctx.h>
#include <axis2_ctx.h>
@@ -36,12 +38,14 @@
sandesha2_seq_mgr_set_up_new_seq(
const axis2_env_t *env,
sandesha2_msg_ctx_t *create_seq_msg,
- sandehsa2_storage_mgr_t *storage_mgr)
+ sandesha2_storage_mgr_t *storage_mgr)
{
axis2_char_t *seq_id = NULL;
axis2_endpoint_ref_t *to = NULL;
axis2_endpoint_ref_t *reply_to = NULL;
axis2_endpoint_ref_t *acks_to = NULL;
+ sandesha2_acks_to_t *temp_acks_to = NULL;
+ sandesha2_address_t *temp_address = NULL;
sandesha2_create_seq_t *create_seq = NULL;
axis2_msg_ctx_t *msg_ctx = NULL;
axis2_conf_ctx_t *conf_ctx = NULL;
@@ -79,7 +83,9 @@
AXIS2_FAILURE);
return NULL;
}
- acks_to = SANDESHA2_CREATE_SEQ_GET_ACKS_TO(create_seq, env);
+ temp_acks_to = SANDESHA2_CREATE_SEQ_GET_ACKS_TO(create_seq, env);
+ temp_address = SANDESHA2_ACKS_TO_GET_ADDRESS(temp_acks_to, env);
+ acks_to = SANDESHA2_ADDRESS_GET_EPR(temp_address, env);
if(!acks_to)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Acks To is NULL");
@@ -89,12 +95,12 @@
}
msg_ctx = SANDESHA2_MSG_CTX_GET_MSG_CTX(create_seq_msg, env);
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
- seq_prop_mgr = SANDEHSA2_STORAGE_MGR_GET_SEQ_PROPERTY_MGR(storage_mgr, env);
- received_msg_bean = sandesha2_seq_property_bean_create(env, seq_id,
+ seq_prop_mgr = SANDESHA2_STORAGE_MGR_GET_SEQ_PROPERTY_MGR(storage_mgr, env);
+ received_msg_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES, "");
/* Setting the addressing version */
addressing_ns_value = SANDESHA2_MSG_CTX_GET_ADDR_NS_VAL(create_seq_msg, env);
- addressing_ns_bean = sandesha2_seq_property_bean_create(env, seq_id,
+ addressing_ns_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, addressing_ns_value);
SANDESHA2_SEQ_PROPERTY_MGR_INSERT(seq_prop_mgr, env, addressing_ns_bean);
anonymous_uri = sandesha2_spec_specific_consts_get_anon_uri(env,
@@ -103,19 +109,19 @@
if(reply_to)
{
address = AXIS2_ENDPOINT_REF_GET_ADDRESS(reply_to, env);
- to_bean = sandesha2_seq_property_bean_create(env, seq_id,
+ to_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_TO_EPR, address);
}
else
{
- to_bean = sandesha2_seq_property_bean_create(env, seq_id,
+ to_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_TO_EPR, anonymous_uri);
}
address = AXIS2_ENDPOINT_REF_GET_ADDRESS(to, env);
- reply_to_bean = sandesha2_seq_property_bean_create(env, seq_id,
+ reply_to_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_REPLY_TO_EPR, address);
address = AXIS2_ENDPOINT_REF_GET_ADDRESS(acks_to, env);
- acks_to_bean = sandesha2_seq_property_bean_create(env, seq_id,
+ acks_to_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_ACKS_TO_EPR, address);
SANDESHA2_SEQ_PROPERTY_MGR_INSERT(seq_prop_mgr, env, received_msg_bean);
SANDESHA2_SEQ_PROPERTY_MGR_INSERT(seq_prop_mgr, env, reply_to_bean);
@@ -125,7 +131,7 @@
SANDESHA2_SEQ_PROPERTY_MGR_INSERT(seq_prop_mgr, env, to_bean);
}
next_msg_mgr = SANDESHA2_STORAGE_MGR_GET_NEXT_MSG_MGR(storage_mgr, env);
- next_msg_bean = sandesha2_next_msg_bean_create(env, seq_id, 1)
+ next_msg_bean = sandesha2_next_msg_bean_create_with_data(env, seq_id, 1);
/* 1 will be the next */
SANDESHA2_NEXT_MSG_MGR_INSERT(next_msg_mgr, env, next_msg_bean);
@@ -177,12 +183,13 @@
sandesha2_seq_mgr_update_last_activated_time(
const axis2_env_t *env,
axis2_char_t *property_key,
- axis2_storage_mgr_t *storage_mgr)
+ sandesha2_storage_mgr_t *storage_mgr)
{
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
sandesha2_seq_property_bean_t *last_activated_bean = NULL;
- axis2_bool_t *added = AXIS2_FALSE;
+ axis2_bool_t added = AXIS2_FALSE;
long current_time = -1;
+ axis2_char_t *current_time_str = NULL;
seq_prop_mgr = SANDESHA2_STORAGE_MGR_GET_SEQ_PROPERTY_MGR(storage_mgr, env);
last_activated_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr, env,
@@ -199,7 +206,7 @@
current_time = sandesha2_utils_get_current_time_in_millis(env);
sprintf(current_time_str, "%l", current_time);
SANDESHA2_LAST_ACTIVATED_BEAN_SET_VALUE(last_activated_bean, env, current_time_str);
- if(AXIS2_TURE == added)
+ if(AXIS2_TRUE == added)
{
SANDESHA2_SEQ_PROPERTY_MGR_INSERT(seq_prop_mgr, env, last_activated_bean);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org