You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by da...@apache.org on 2007/02/14 05:23:26 UTC
svn commit: r507382 - in /webservices/sandesha/trunk/c: include/
samples/rm_echo_single_1_0/ src/msgprocessors/ src/storage/permanent/
src/util/ src/workers/
Author: damitha
Date: Tue Feb 13 20:23:25 2007
New Revision: 507382
URL: http://svn.apache.org/viewvc?view=rev&rev=507382
Log:
Fixed Sandesha2c-21 and Sandesh2c-22
Modified:
webservices/sandesha/trunk/c/include/sandesha2_constants.h
webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_sender_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
webservices/sandesha/trunk/c/src/util/ack_mgr.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/workers/sender.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=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Tue Feb 13 20:23:25 2007
@@ -274,12 +274,18 @@
#define SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY "HighestInMsgKey"
#define SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER "HighestOutMsgNumber"
+
+ #define SANDESHA2_SEQ_PROP_HIGHEST_OUT_RELATES_TO "HighestOutRelatesTo"
#define SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_KEY "HighestOutMsgKey"
#define SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO "LastOutMessage"
#define SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_NO "LastInMessage"
+
+ #define SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_ID "LastInMessageId"
+
+ #define SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID "HighestInMsgId"
/**
* SOAP Versions
Modified: webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c Tue Feb 13 20:23:25 2007
@@ -29,7 +29,7 @@
#include <sandesha2_client.h>
#include <axis2_addr.h>
-#define SANDESHA2_MAX_COUNT 2
+#define SANDESHA2_MAX_COUNT 4
/* on_complete callback function */
axis2_status_t AXIS2_CALL
@@ -178,7 +178,7 @@
property);
}
- payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
+ /*payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
status = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
if(status)
printf("\necho client single channel invoke SUCCESSFUL!\n");
@@ -191,7 +191,7 @@
printf("\necho client single channel invoke SUCCESSFUL!\n");
payload = NULL;
AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
-
+ */
property = axis2_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage", property);
payload = build_om_payload_for_echo_svc(env, "echo3", "sequence1");
Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Tue Feb 13 20:23:25 2007
@@ -158,7 +158,7 @@
sandesha2_sender_bean_t *input_bean = NULL;
axis2_array_list_t *retrans_list = NULL;
axis2_array_list_t *acked_list = NULL;
- int i = 0;
+ int i = 0, size = 0;
long no_of_msgs_acked = 0;
sandesha2_seq_property_bean_t *no_of_msgs_acked_bean = NULL;
axis2_char_t str_long[32];
@@ -172,23 +172,22 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_LOG_INFO(env->log,
- "[sandesha2] Entry:sandesha2_ack_msg_processor_process_in_msg");
-
+ "[sandesha2] Entry:sandesha2_ack_msg_processor_process_in_msg");
seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(rm_msg_ctx,
env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
if(!seq_ack)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence"
- " acknowledgement part is null");
+ " acknowledgement part is null");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_REQD_MSG_PART_MISSING,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx,
- AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
+ AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
sandesha2_seq_ack_set_must_understand(seq_ack, env, AXIS2_FALSE);
sandesha2_msg_ctx_add_soap_envelope(rm_msg_ctx, env);
@@ -198,35 +197,34 @@
ack_range_list = sandesha2_seq_ack_get_ack_range_list(seq_ack, env);
nack_list = sandesha2_seq_ack_get_nack_list(seq_ack, env);
out_seq_id = sandesha2_identifier_get_identifier(
- sandesha2_seq_ack_get_identifier(seq_ack, env), env);
+ sandesha2_seq_ack_get_identifier(seq_ack, env), env);
if(!out_seq_id || 0 == AXIS2_STRLEN(out_seq_id))
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] OutSequenceId is"
- " null");
+ " null");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_SEQ, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
int_seq_id = sandesha2_utils_get_seq_property(env, out_seq_id,
- SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID, storage_mgr);
-
+ SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID, storage_mgr);
fault_msg_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env,
- rm_msg_ctx, out_seq_id, storage_mgr);
+ rm_msg_ctx, out_seq_id, storage_mgr);
if(fault_msg_ctx)
{
axis2_engine_t *engine = NULL;
engine = axis2_engine_create(env, conf_ctx);
AXIS2_ENGINE_SEND_FAULT(engine, env, sandesha2_msg_ctx_get_msg_ctx(
- fault_msg_ctx, env));
+ fault_msg_ctx, env));
AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
}
fault_msg_ctx = sandesha2_fault_mgr_check_for_invalid_ack(env, rm_msg_ctx,
- storage_mgr);
+ storage_mgr);
if(fault_msg_ctx)
{
axis2_engine_t *engine = NULL;
engine = axis2_engine_create(env, conf_ctx);
AXIS2_ENGINE_SEND_FAULT(engine, env, sandesha2_msg_ctx_get_msg_ctx(
- fault_msg_ctx, env));
+ fault_msg_ctx, env));
AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
}
if(int_seq_id)
@@ -234,7 +232,7 @@
storage_mgr);
property = axis2_property_create_with_args(env, 0, 0, 0, SANDESHA2_VALUE_TRUE);
AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, SANDESHA2_ACK_PROCSSED, property,
- AXIS2_FALSE);
+ AXIS2_FALSE);
input_bean = sandesha2_sender_bean_create(env);
sandesha2_sender_bean_set_send(input_bean, env, AXIS2_TRUE);
@@ -248,7 +246,9 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(ack_range_list, env); i++)
+ if(ack_range_list)
+ size = axis2_array_list_size(ack_range_list, env);
+ for(i = 0; i < size; i++)
{
sandesha2_ack_range_t *ack_range = NULL;
long lower = -1;
@@ -286,31 +286,30 @@
/* TODO processing nacks */
}
no_of_msgs_acked = sandesha2_ack_msg_processor_get_no_of_msgs_acked(
- env, ack_range_list);
+ env, ack_range_list);
no_of_msgs_acked_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
- env, out_seq_id,
- SANDESHA2_SEQ_PROP_NO_OF_OUTGOING_MSGS_ACKED);
+ env, out_seq_id, SANDESHA2_SEQ_PROP_NO_OF_OUTGOING_MSGS_ACKED);
sprintf(str_long, "%ld", no_of_msgs_acked);
if(!no_of_msgs_acked_bean)
{
added = AXIS2_TRUE;
no_of_msgs_acked_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_name(no_of_msgs_acked_bean, env,
- SANDESHA2_SEQ_PROP_NO_OF_OUTGOING_MSGS_ACKED);
+ SANDESHA2_SEQ_PROP_NO_OF_OUTGOING_MSGS_ACKED);
sandesha2_seq_property_bean_set_seq_id(no_of_msgs_acked_bean, env,
- out_seq_id);
+ out_seq_id);
}
sandesha2_seq_property_bean_set_value(no_of_msgs_acked_bean, env,
str_long);
if(added)
{
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- no_of_msgs_acked_bean);
+ no_of_msgs_acked_bean);
}
else
{
sandesha2_seq_property_mgr_update(seq_prop_mgr, env,
- no_of_msgs_acked_bean);
+ no_of_msgs_acked_bean);
}
completed_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
env, out_seq_id,
@@ -320,11 +319,11 @@
completed_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_seq_id(completed_bean, env, int_seq_id);
sandesha2_seq_property_bean_set_name(completed_bean, env,
- SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES);
+ SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, completed_bean);
}
str_list = sandesha2_utils_array_list_to_string(env, acked_list,
- SANDESHA2_ARRAY_LIST_LONG);
+ SANDESHA2_ARRAY_LIST_LONG);
if(completed_bean)
{
sandesha2_seq_property_bean_set_value(completed_bean, env, str_list);
@@ -332,7 +331,7 @@
}
last_out_msg_no_str = sandesha2_utils_get_seq_property(env, int_seq_id,
- SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO, storage_mgr);
+ SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO, storage_mgr);
if(last_out_msg_no_str)
{
long highest_out_msg_no = 0;
@@ -341,32 +340,11 @@
{
axis2_bool_t completed = AXIS2_FALSE;
completed = sandesha2_ack_mgr_verify_seq_completion(env,
- ack_range_list, highest_out_msg_no);
+ ack_range_list, highest_out_msg_no);
if(completed)
{
- axis2_char_t *rm_version = NULL;
- const axis2_char_t *to_addr = NULL;
- axis2_endpoint_ref_t *to_epr = NULL;
- /*sandesha2_seq_t *seq = NULL;
- axis2_char_t *incoming_seq_id = NULL;
- seq = (sandesha2_seq_t*)sandesha2_msg_ctx_get_msg_part(
- rm_msg_ctx, env, SANDESHA2_MSG_PART_SEQ);
- if(seq)
- incoming_seq_id = sandesha2_identifier_get_identifier(
- sandesha2_seq_get_identifier(seq, env), env);
- rm_version = sandesha2_utils_get_rm_version(env, int_seq_id,
- storage_mgr);
- to_epr = axis2_msg_ctx_get_to(msg_ctx, env);
- if(to_epr)
- to_addr = axis2_endpoint_ref_get_address(to_epr, env);*/
sandesha2_terminate_mgr_add_terminate_seq_msg(env, rm_msg_ctx,
out_seq_id, int_seq_id, storage_mgr);
- /*if(sandesha2_utils_is_single_channel(env, rm_version, to_addr))
- {
-
- sandesha2_terminate_mgr_clean_recv_side_after_terminate_msg(
- env, conf_ctx, incoming_seq_id, storage_mgr);
- }*/
}
}
}
@@ -378,7 +356,7 @@
sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
}
AXIS2_LOG_INFO(env->log,
- "[sandesha2] Exit: sandesha2_ack_msg_processor_process_in_msg");
+ "[sandesha2] Exit: sandesha2_ack_msg_processor_process_in_msg");
return AXIS2_SUCCESS;
}
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=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Tue Feb 13 20:23:25 2007
@@ -41,6 +41,7 @@
#include <axis2_string.h>
#include <axis2_engine.h>
#include <axis2_uuid_gen.h>
+#include <axis2_relates_to.h>
#include <axiom_soap_const.h>
#include <sandesha2_client_constants.h>
#include <stdio.h>
@@ -206,8 +207,8 @@
axis2_bool_t msg_no_present_in_list = AXIS2_FALSE;
axis2_endpoint_ref_t *reply_to_epr = NULL;
axis2_endpoint_ref_t *to_epr = NULL;
- axis2_char_t *reply_to_addr = NULL;
- axis2_char_t *to_addr = NULL;
+ const axis2_char_t *reply_to_addr = NULL;
+ const axis2_char_t *to_addr = NULL;
axis2_char_t *rm_version = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -334,14 +335,20 @@
{
sandesha2_seq_property_bean_t *highest_msg_no_bean = NULL;
sandesha2_seq_property_bean_t *highest_msg_key_bean = NULL;
+ sandesha2_seq_property_bean_t *highest_msg_id_bean = NULL;
+ const axis2_char_t *msg_id = NULL;
highest_in_msg_no = msg_no;
+ msg_id = axis2_msg_ctx_get_msg_id(msg_ctx, env);
highest_msg_no_bean = sandesha2_seq_property_bean_create_with_data(env,
str_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER,
msg_num_str);
highest_msg_key_bean = sandesha2_seq_property_bean_create_with_data(env,
str_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY,
highest_in_msg_key_str);
+ highest_msg_id_bean = sandesha2_seq_property_bean_create_with_data(env,
+ str_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID,
+ (axis2_char_t *)msg_id);
sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env,
highest_in_msg_key_str);
sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env,
@@ -352,6 +359,8 @@
highest_msg_no_bean);
sandesha2_seq_property_mgr_update(seq_prop_mgr, env,
highest_msg_key_bean);
+ sandesha2_seq_property_mgr_update(seq_prop_mgr, env,
+ highest_msg_id_bean);
}
else
{
@@ -359,6 +368,8 @@
highest_msg_no_bean);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
highest_msg_key_bean);
+ sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
+ highest_msg_id_bean);
}
}
@@ -425,13 +436,13 @@
*/
incoming_seq_list_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_seq_id(incoming_seq_list_bean, env,
- SANDESHA2_SEQ_PROP_ALL_SEQS);
+ SANDESHA2_SEQ_PROP_ALL_SEQS);
sandesha2_seq_property_bean_set_name(incoming_seq_list_bean, env,
- SANDESHA2_SEQ_PROP_INCOMING_SEQ_LIST);
+ SANDESHA2_SEQ_PROP_INCOMING_SEQ_LIST);
sandesha2_seq_property_bean_set_value(incoming_seq_list_bean,
- env, "[]");
+ env, "[]");
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- incoming_seq_list_bean);
+ incoming_seq_list_bean);
}
str_value = sandesha2_seq_property_bean_get_value(
incoming_seq_list_bean, env);
@@ -485,79 +496,15 @@
reply_to_addr = axis2_endpoint_ref_get_address(reply_to_epr, env);
if(to_epr)
to_addr = axis2_endpoint_ref_get_address(to_epr, env);
- printf("came16\n");
if(sandesha2_utils_is_single_channel(env, rm_version, reply_to_addr))
{
- printf("came17\n");
/* Do nothing */
- }
- else if(sandesha2_utils_is_single_channel(env, rm_version, to_addr))
+ }
+ else
+ if(sandesha2_utils_is_single_channel(env, rm_version, to_addr))
{
- axis2_char_t *int_seq_id = NULL;
- axis2_char_t *last_out_msg_no_str = NULL;
- sandesha2_seq_ack_t *seq_ack = NULL;
- axis2_char_t *out_seq_id = NULL;
- seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(
- rm_msg_ctx, env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
- if(!seq_ack)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence"
- " acknowledgement part is null");
- AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_REQD_MSG_PART_MISSING,
- AXIS2_FAILURE);
- return AXIS2_FAILURE;
- }
- out_seq_id = sandesha2_identifier_get_identifier(
- sandesha2_seq_ack_get_identifier(seq_ack, env), env);
- if(!out_seq_id || 0 == AXIS2_STRLEN(out_seq_id))
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] OutSequenceId is"
- " null");
- AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_SEQ, AXIS2_FAILURE);
- return AXIS2_FAILURE;
- }
- int_seq_id = sandesha2_utils_get_seq_property(env, out_seq_id,
- SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID, storage_mgr);
- last_out_msg_no_str = sandesha2_utils_get_seq_property(env, int_seq_id,
- SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO, storage_mgr);
- if(last_out_msg_no_str)
- {
- long highest_out_msg_no = 0;
- highest_out_msg_no = atol(last_out_msg_no_str);
- if(highest_out_msg_no > 0)
- {
- sandesha2_next_msg_mgr_t *next_mgr = NULL;
- sandesha2_next_msg_bean_t *find_bean = NULL;
- axis2_array_list_t *found_list = NULL;
- int i = 0, size = 0;
- next_mgr = sandesha2_storage_mgr_get_next_msg_mgr(storage_mgr, env);
- find_bean = sandesha2_next_msg_bean_create(env);
- sandesha2_next_msg_bean_set_seq_id(find_bean, env, str_seq_id);
-
- found_list = sandesha2_next_msg_mgr_find(next_mgr, env, find_bean);
- if(found_list)
- size = AXIS2_ARRAY_LIST_SIZE(found_list, env);
- for(i = 0; i < size; i++)
- {
- sandesha2_next_msg_bean_t *bean = AXIS2_ARRAY_LIST_GET(found_list,
- env, i);
- if(bean)
- {
- axis2_char_t *key = NULL;
- axis2_char_t *seq_id = NULL;
- key = sandesha2_next_msg_bean_get_ref_msg_key(bean, env);
- if(key)
- {
- sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, key);
- }
- seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *)
- bean, env);
- if(seq_id)
- sandesha2_next_msg_mgr_remove(next_mgr, env, seq_id);
- }
- }
- }
- }
+ sandesha2_app_msg_processor_send_ack_if_reqd(env, rm_msg_ctx, msgs_str,
+ storage_mgr);
}
else
{
@@ -602,6 +549,7 @@
axis2_char_t *to_addr = NULL;
axis2_op_ctx_t *op_ctx = NULL;
axis2_msg_ctx_t *req_msg_ctx = NULL;
+ axis2_relates_to_t *relates_to = NULL;
AXIS2_LOG_INFO(env->log,
"[sandesha2] Start:sandesha2_app_msg_processor_process_out_msg");
@@ -641,14 +589,16 @@
if(!AXIS2_MSG_CTX_GET_MSG_ID(msg_ctx, env))
AXIS2_MSG_CTX_SET_MESSAGE_ID(msg_ctx, env, axis2_uuid_gen(env));
storage_key = axis2_uuid_gen(env);
-
+
if(is_svr_side)
{
sandesha2_seq_t *req_seq = NULL;
long request_msg_no = -1;
- axis2_char_t *req_last_msg_num_str = NULL;
axis2_char_t *incoming_seq_id = NULL;
sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;
+ const axis2_relates_to_t *relates_to = NULL;
+ axis2_char_t *relates_to_value = NULL;
+ axis2_char_t *last_req_id = NULL;
req_rm_msg_ctx = sandesha2_msg_init_init_msg(env, req_msg_ctx);
req_seq = (sandesha2_seq_t *) sandesha2_msg_ctx_get_msg_part(
@@ -657,28 +607,30 @@
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Sequence is NULL");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SEQ_NOT_EXIST,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
incoming_seq_id = sandesha2_identifier_get_identifier(
- sandesha2_seq_get_identifier(req_seq, env), env);
+ sandesha2_seq_get_identifier(req_seq, env), env);
if(!incoming_seq_id)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Sequence ID is NULL");
return AXIS2_FAILURE;
}
request_msg_no = SANDESHA2_MSG_NUMBER_GET_MSG_NUM(
- sandesha2_seq_get_msg_num(req_seq, env), env);
+ sandesha2_seq_get_msg_num(req_seq, env), env);
internal_seq_id = sandesha2_utils_get_outgoing_internal_seq_id(env,
- incoming_seq_id);
- req_last_msg_num_str = sandesha2_utils_get_seq_property(env,
- incoming_seq_id, SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_NO,
- storage_mgr);
- if(req_last_msg_num_str)
+ incoming_seq_id);
+ /* Deciding whether this is the last message. We assume it is if it
+ * relates to a message which arrived with the LastMessage flag on it.
+ */
+ last_req_id = sandesha2_utils_get_seq_property(env, incoming_seq_id,
+ SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_ID, storage_mgr);
+ relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
+ if(relates_to && last_req_id && 0 == axis2_strcmp(last_req_id,
+ relates_to_value))
{
- long req_last_msg_num = atol(req_last_msg_num_str);
- if(req_last_msg_num == request_msg_no)
- last_msg = AXIS2_TRUE;
+ last_msg = AXIS2_TRUE;
}
}
else
@@ -688,25 +640,28 @@
axis2_char_t *last_app_msg = NULL;
to = (axis2_char_t*)AXIS2_ENDPOINT_REF_GET_ADDRESS(to_epr, env);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "to:%s", to);
property = axis2_msg_ctx_get_property(msg_ctx, env,
SANDESHA2_CLIENT_SEQ_KEY, AXIS2_FALSE);
if(property)
seq_key = axis2_property_get_value(property, env);
internal_seq_id = sandesha2_utils_get_internal_seq_id(env,
to, seq_key);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "internal_seq_id:%s",
- internal_seq_id);
property = axis2_msg_ctx_get_property(msg_ctx, env,
SANDESHA2_CLIENT_LAST_MESSAGE, AXIS2_FALSE);
if(property)
last_app_msg = axis2_property_get_value(property, env);
- if(last_app_msg && 0 == axis2_strcmp(last_app_msg,
- SANDESHA2_VALUE_TRUE))
+ if(last_app_msg && 0 == axis2_strcmp(last_app_msg, SANDESHA2_VALUE_TRUE))
{
axis2_char_t *spec_ver = NULL;
spec_ver = sandesha2_utils_get_rm_version(env, internal_seq_id,
storage_mgr);
+ if(!spec_ver)
+ {
+ axis2_property_t *spec_ver_prop = NULL;
+ spec_ver_prop = axis2_msg_ctx_get_property(msg_ctx, env,
+ SANDESHA2_CLIENT_RM_SPEC_VERSION, AXIS2_FALSE);
+ spec_ver = axis2_property_get_value(spec_ver_prop, env);
+ }
if(sandesha2_spec_specific_consts_is_last_msg_indicator_reqd
(env, spec_ver))
{
@@ -763,23 +718,33 @@
internal_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER,
msg_number_str);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, res_highest_msg_bean);
+ relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
+ if(relates_to)
+ {
+ const axis2_char_t *relates_to_value = axis2_relates_to_get_value(
+ relates_to, env);
+ sandesha2_seq_property_bean_t *response_relates_to_bean =
+ sandesha2_seq_property_bean_create_with_data(env, internal_seq_id,
+ SANDESHA2_SEQ_PROP_HIGHEST_OUT_RELATES_TO, (axis2_char_t *)
+ relates_to_value);
+ sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
+ response_relates_to_bean);
+ }
if(last_msg)
{
sandesha2_seq_property_bean_t *res_highest_msg_key_bean = NULL;
sandesha2_seq_property_bean_t *res_last_msg_key_bean = NULL;
res_highest_msg_key_bean = sandesha2_seq_property_bean_create_with_data(
- env, internal_seq_id,
- SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_KEY,
- storage_key);
+ env, internal_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_KEY,
+ storage_key);
res_last_msg_key_bean = sandesha2_seq_property_bean_create_with_data(
- env, internal_seq_id,
- SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO,
- msg_number_str);
+ env, internal_seq_id, SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO,
+ msg_number_str);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- res_highest_msg_key_bean);
+ res_highest_msg_key_bean);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- res_last_msg_key_bean);
+ res_last_msg_key_bean);
}
out_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
@@ -793,10 +758,10 @@
sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;
incoming_seq_id = sandesha2_utils_get_svr_side_incoming_seq_id(env,
- internal_seq_id);
+ internal_seq_id);
incoming_to_bean = sandesha2_seq_property_mgr_retrieve(
- seq_prop_mgr, env, incoming_seq_id,
- SANDESHA2_SEQ_PROP_TO_EPR);
+ seq_prop_mgr, env, incoming_seq_id,
+ SANDESHA2_SEQ_PROP_TO_EPR);
if(incoming_to_bean)
{
axis2_char_t *incoming_to = NULL;
@@ -1047,7 +1012,7 @@
storage_mgr);
engine = axis2_engine_create(env, conf_ctx);
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(ack_rm_msg, env);
- if(AXIS2_SUCCESS != AXIS2_ENGINE_SEND(engine, env, msg_ctx))
+ if(!AXIS2_ENGINE_SEND(engine, env, msg_ctx))
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[Sandesha2]Engine Send failed");
Modified: webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c Tue Feb 13 20:23:25 2007
@@ -249,6 +249,7 @@
axis2_char_t *int_seq_id = NULL;
sandesha2_create_seq_mgr_t *create_seq_mgr = NULL;
sandesha2_seq_property_bean_t *out_seq_bean = NULL;
+ sandesha2_seq_property_bean_t *int_seq_bean = NULL;
AXIS2_LOG_INFO(env->log, "[sandesha2] Offer Accepted .........");
@@ -267,18 +268,26 @@
out_seq_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_name(out_seq_bean, env,
- SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
+ SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
/*sandesha2_seq_property_bean_set_seq_id(out_seq_bean, env,
offer_seq_id);
sandesha2_seq_property_bean_set_value(out_seq_bean, env,
int_seq_id);*/
sandesha2_seq_property_bean_set_seq_id(out_seq_bean, env,
- int_seq_id);
+ int_seq_id);
sandesha2_seq_property_bean_set_value(out_seq_bean, env,
- offer_seq_id);
-
+ offer_seq_id);
+ sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
+ out_seq_bean);
+ int_seq_bean = sandesha2_seq_property_bean_create(env);
+ sandesha2_seq_property_bean_set_name(int_seq_bean, env,
+ SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID);
+ sandesha2_seq_property_bean_set_seq_id(int_seq_bean, env,
+ offer_seq_id);
+ sandesha2_seq_property_bean_set_value(int_seq_bean, env,
+ int_seq_id);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- out_seq_bean);
+ int_seq_bean);
}
else
{
Modified: webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c Tue Feb 13 20:23:25 2007
@@ -361,8 +361,7 @@
sandesha2_next_msg_mgr_insert(next_bean_mgr, env, next_bean);
spec_ver_bean = sandesha2_seq_property_bean_create_with_data(env,
- offered_seq_id, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION,
- rm_spec_ver);
+ offered_seq_id, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, rm_spec_ver);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, spec_ver_bean);
rcvd_msg_bean = sandesha2_seq_property_bean_create_with_data(env,
Modified: webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Tue Feb 13 20:23:25 2007
@@ -262,8 +262,8 @@
sandesha2_msg_ctx_t *rm_msg_ctx)
{
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
- axis2_char_t *highest_msg_num_str = NULL;
- axis2_char_t *highest_msg_key = NULL;
+ axis2_char_t *highest_in_msg_num_str = NULL;
+ axis2_char_t *highest_in_msg_id = NULL;
long highest_in_msg_num = 0;
long highest_out_msg_num = 0;
axis2_char_t *res_side_int_seq_id = NULL;
@@ -278,82 +278,66 @@
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env);
- highest_msg_num_str = sandesha2_utils_get_seq_property(env, seq_id,
- SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, storage_mgr);
- highest_msg_key = sandesha2_utils_get_seq_property(env, seq_id,
- SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY, storage_mgr);
- if(highest_msg_num_str)
+ highest_in_msg_num_str = sandesha2_utils_get_seq_property(env, seq_id,
+ SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, storage_mgr);
+ highest_in_msg_id = sandesha2_utils_get_seq_property(env, seq_id,
+ SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID, storage_mgr);
+ if(highest_in_msg_num_str)
{
- if(!highest_msg_key)
+ if(!highest_in_msg_id)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Key of the "
- "highest message number has not been stored");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] "
+ "highest in msg id has not been stored");
return AXIS2_FAILURE;
}
- highest_in_msg_num = atol(highest_msg_num_str);
+ highest_in_msg_num = atol(highest_in_msg_num_str);
}
res_side_int_seq_id = sandesha2_utils_get_outgoing_internal_seq_id(env,
- seq_id);
+ seq_id);
if(0 == highest_in_msg_num)
add_res_side_term = AXIS2_FALSE;
else
{
+ /* Mark up the highest inbound message as if it had the last message
+ * flag on it.*/
+ axis2_char_t *in_msg_id = highest_in_msg_id;
sandesha2_seq_property_bean_t *last_in_msg_bean = NULL;
- axis2_msg_ctx_t *highest_in_msg = NULL;
- axis2_msg_ctx_t *highest_out_msg = NULL;
- axis2_op_ctx_t *op_ctx = NULL;
-
- last_in_msg_bean = sandesha2_seq_property_bean_create_with_data(env,
- seq_id, SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_NO,
- highest_msg_num_str);
+ axis2_char_t *highest_out_relates_to = NULL;
+
+ last_in_msg_bean = sandesha2_seq_property_bean_create_with_data(env,
+ seq_id, SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_ID, highest_in_msg_id);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, last_in_msg_bean);
- highest_in_msg = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env,
- highest_msg_key, conf_ctx);
- if(highest_in_msg)
- op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(highest_in_msg, env);
- if(op_ctx)
- highest_out_msg = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env,
- AXIS2_WSDL_MESSAGE_LABEL_OUT);
- if(highest_out_msg)
+ /* If an outbound message has already gone out with that relatesTo, then
+ * we can terminate right away.
+ */
+ highest_out_relates_to = sandesha2_utils_get_seq_property(env,
+ res_side_int_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_RELATES_TO,
+ storage_mgr);
+ if(highest_out_relates_to && 0 == axis2_strcmp(highest_out_relates_to,
+ in_msg_id))
{
- sandesha2_msg_ctx_t *highest_out_rm_msg = NULL;
- sandesha2_seq_t *seq_of_out_msg = NULL;
- highest_out_rm_msg = sandesha2_msg_init_init_msg(env,
- highest_out_msg);
- seq_of_out_msg = (sandesha2_seq_t*)
- sandesha2_msg_ctx_get_msg_part(highest_out_rm_msg, env,
- SANDESHA2_MSG_PART_SEQ);
- if(seq_of_out_msg)
- {
- axis2_char_t long_str[32];
- sandesha2_seq_property_bean_t *highest_out_msg_bean = NULL;
-
- highest_out_msg_num = SANDESHA2_MSG_NUMBER_GET_MSG_NUM(
- sandesha2_seq_get_msg_num(seq_of_out_msg, env), env);
- sprintf(long_str, "%ld", highest_out_msg_num);
- highest_out_msg_bean =
- sandesha2_seq_property_bean_create_with_data(env,
- res_side_int_seq_id, SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO,
- long_str);
- sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- highest_out_msg_bean);
- add_res_side_term = AXIS2_TRUE;
- }
+ axis2_char_t *highest_out_msg_num_str = NULL;
+ highest_out_msg_num_str = sandesha2_utils_get_seq_property(env,
+ res_side_int_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER,
+ storage_mgr);
+ highest_out_msg_num = atol(highest_out_msg_num_str);
+ add_res_side_term = AXIS2_TRUE;
}
}
out_seq_id = sandesha2_utils_get_seq_property(env, res_side_int_seq_id,
- SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_mgr);
- if(AXIS2_TRUE == add_res_side_term && highest_out_msg_num > 0 &&
- res_side_int_seq_id && out_seq_id)
+ SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_mgr);
+ if(add_res_side_term && highest_out_msg_num > 0 &&
+ res_side_int_seq_id && out_seq_id)
{
axis2_bool_t all_acked = AXIS2_FALSE;
all_acked = sandesha2_utils_is_all_msgs_acked_upto(env,
- highest_out_msg_num, res_side_int_seq_id, storage_mgr);
- if(AXIS2_TRUE == all_acked)
+ highest_out_msg_num, res_side_int_seq_id, storage_mgr);
+ if(all_acked)
+ {
sandesha2_terminate_mgr_add_terminate_seq_msg(env, rm_msg_ctx,
- out_seq_id, res_side_int_seq_id, storage_mgr);
- }
-
+ out_seq_id, res_side_int_seq_id, storage_mgr);
+ }
+ }
return AXIS2_SUCCESS;
}
@@ -491,13 +475,7 @@
sandesha2_terminate_seq_t *term_seq_part = NULL;
axis2_char_t *rm_version = NULL;
axis2_char_t *transport_to = NULL;
- axis2_char_t *key = NULL;
- sandesha2_sender_bean_t *term_bean = NULL;
- sandesha2_sender_mgr_t *retrans_mgr = NULL;
sandesha2_seq_property_bean_t *term_added = NULL;
- axis2_transport_out_desc_t *out_desc = NULL;
- axis2_transport_out_desc_t *sandesha2_out_desc = NULL;
- axis2_transport_sender_t *transport_sender = NULL;
axis2_char_t *temp_action = NULL;
axis2_string_t *soap_action = NULL;
Modified: webservices/sandesha/trunk/c/src/storage/permanent/permanent_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/permanent/permanent_sender_mgr.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/permanent/permanent_sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/permanent/permanent_sender_mgr.c Tue Feb 13 20:23:25 2007
@@ -638,8 +638,6 @@
axis2_array_list_t *match_list = NULL;
sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
sandesha2_sender_bean_t *result = NULL;
- AXIS2_LOG_INFO(env->log,
- "[sandesha2]Entry:sandesha2_permanent_sender_mgr_get_next_msg_to_send");
AXIS2_ENV_CHECK(env, NULL);
sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
@@ -685,8 +683,6 @@
break;
}
}
- AXIS2_LOG_INFO(env->log,
- "[sandesha2]Exit:sandesha2_permanent_sender_mgr_get_next_msg_to_send");
return result;
}
Modified: webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c?view=diff&rev=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c Tue Feb 13 20:23:25 2007
@@ -27,6 +27,7 @@
#include <axis2_hash.h>
#include <axis2_thread.h>
#include <axis2_property.h>
+#include <axis2_module_desc.h>
#include <platforms/axis2_platform_auto_sense.h>
#include <sqlite3.h>
@@ -115,25 +116,41 @@
trans_impl->trans.ops = &transaction_ops;
conf_ctx = (axis2_conf_ctx_t *) sandesha2_storage_mgr_get_ctx(
storage_mgr, env);
- conf = AXIS2_CONF_CTX_GET_CONF((const axis2_conf_ctx_t *) conf_ctx, env);
+ if(conf_ctx)
+ conf = AXIS2_CONF_CTX_GET_CONF((const axis2_conf_ctx_t *) conf_ctx, env);
+ else
+ return NULL;
prop_bean = (sandesha2_property_bean_t *)sandesha2_utils_get_property_bean(
env, conf);
- path = sandesha2_property_bean_get_db_path(prop_bean, env);
- if(conf_ctx)
+ /*path = sandesha2_property_bean_get_db_path(prop_bean, env);*/
{
- axis2_ctx_t *conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
- axis2_property_t *property = axis2_ctx_get_property(conf_ctx_base, env,
- SANDESHA2_IS_SVR_SIDE, AXIS2_FALSE);
- if(!property)
- {
- db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR,
- "sandesha2_svr_db", NULL);
- }
- else
+ axis2_module_desc_t *module_desc = NULL;
+ axis2_qname_t *qname = NULL;
+ qname = axis2_qname_create(env, "sandesha2", NULL, NULL);
+ module_desc = AXIS2_CONF_GET_MODULE(conf, env, qname);
+ if(module_desc)
{
- db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR,
- "sandesha2_client_db", NULL);
+ axis2_param_t *db_param = NULL;
+ db_param = AXIS2_MODULE_DESC_GET_PARAM(module_desc, env, SANDESHA2_DB);
+ if(db_param)
+ {
+ path = (axis2_char_t *) axis2_param_get_value(db_param, env);
+ }
}
+ axis2_qname_free(qname, env);
+ }
+ axis2_ctx_t *conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
+ axis2_property_t *property = axis2_ctx_get_property(conf_ctx_base, env,
+ SANDESHA2_IS_SVR_SIDE, AXIS2_FALSE);
+ if(!property)
+ {
+ db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR,
+ "sandesha2_svr_db", NULL);
+ }
+ else
+ {
+ db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR,
+ "sandesha2_client_db", NULL);
}
AXIS2_LOG_INFO(env->log, "db_name %s", db_name);
rc = sqlite3_open(db_name, &(trans_impl->dbconn));
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=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Tue Feb 13 20:23:25 2007
@@ -99,20 +99,12 @@
}
ack_msg_ctx = sandesha2_utils_create_new_related_msg_ctx(env, ref_rm_msg,
ack_op);
- /*property = AXIS2_MSG_CTX_GET_PROPERTY(ref_msg, env, AXIS2_WSA_VERSION,
- AXIS2_FALSE);
- if(property)
- {
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, AXIS2_WSA_VERSION, property,
- AXIS2_FALSE);
- property = NULL;
- }*/
property = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST,
AXIS2_FALSE, 0, SANDESHA2_VALUE_TRUE);
if(property)
{
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env,
SANDESHA2_APPLICATION_PROCESSING_DONE, property,
AXIS2_FALSE);
property = NULL;
@@ -128,7 +120,7 @@
AXIS2_MSG_CTX_SET_TO(ack_msg_ctx, env, acks_to);
/* Adding the sequence acknowledgement part */
sandesha2_msg_creator_add_ack_msg(env, ack_rm_msg, seq_id, storage_mgr);
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, AXIS2_TRANSPORT_IN, NULL,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env, AXIS2_TRANSPORT_IN, NULL,
AXIS2_FALSE);
addr_ns_uri = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE,
@@ -144,7 +136,7 @@
else
{
property = axis2_property_create_with_args(env, 0, 0, 0, addr_ns_uri);
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, AXIS2_WSA_VERSION, property,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env, AXIS2_WSA_VERSION, property,
AXIS2_FALSE);
}
}
@@ -171,11 +163,9 @@
property = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST,
AXIS2_FALSE, 0, SANDESHA2_VALUE_TRUE);
- AXIS2_MSG_CTX_SET_PROPERTY(ref_msg, env, SANDESHA2_ACK_WRITTEN, property,
+ axis2_msg_ctx_set_property(ref_msg, env, SANDESHA2_ACK_WRITTEN, property,
AXIS2_FALSE);
- /*AXIS2_CTX_SET_PROPERTY(ref_ctx, env, SANDESHA2_ACK_WRITTEN, property,
- AXIS2_FALSE);*/
- AXIS2_MSG_CTX_SET_SERVER_SIDE(ack_msg_ctx, env, AXIS2_TRUE);
+ axis2_msg_ctx_set_server_side(ack_msg_ctx, env, AXIS2_TRUE);
return ack_rm_msg;
}
else
@@ -206,7 +196,7 @@
property = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST,
AXIS2_FALSE, 0, SANDESHA2_VALUE_FALSE);
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env,
SANDESHA2_QUALIFIED_FOR_SENDING, property, AXIS2_FALSE);
sandesha2_sender_bean_set_msg_type(ack_bean, env,
SANDESHA2_MSG_TYPE_ACK);
@@ -249,18 +239,18 @@
env);
property = axis2_property_create_with_args(env, AXIS2_SCOPE_APPLICATION,
AXIS2_FALSE, orig_trans_out->ops->free_void_arg, orig_trans_out);
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env,
SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC, property,
AXIS2_FALSE);
property = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST,
AXIS2_FALSE, 0, SANDESHA2_VALUE_TRUE);
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env,
SANDESHA2_SET_SEND_TO_TRUE, property, AXIS2_FALSE);
property = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST,
AXIS2_FALSE, 0, key);
- AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env,
+ axis2_msg_ctx_set_property(ack_msg_ctx, env,
SANDESHA2_MESSAGE_STORE_KEY, property, AXIS2_FALSE);
trans_out = sandesha2_utils_get_transport_out(env);
@@ -268,7 +258,6 @@
ret_rm_msg = sandesha2_msg_init_init_msg(env, ack_msg_ctx);
sandesha2_utils_start_sender_for_seq(env, conf_ctx, seq_id);
- /*AXIS2_MSG_CTX_SET_PAUSED(ref_msg, env, AXIS2_TRUE);*/
return ret_rm_msg;
}
return 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=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Tue Feb 13 20:23:25 2007
@@ -131,10 +131,10 @@
AXIS2_PARAM_CHECK(env->error, storage_mgr, NULL);
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
- storage_mgr, env);
+ storage_mgr, env);
if(seq_prop_mgr)
rm_version_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
- env, key, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
+ env, key, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
if(!rm_version_bean)
return NULL;
return sandesha2_seq_property_bean_get_value(rm_version_bean, env);
@@ -189,9 +189,9 @@
AXIS2_PARAM_CHECK(env->error, storage_mgr, NULL);
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
- storage_mgr, env);
+ storage_mgr, env);
seq_prop_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
- env, incoming_seq_id, name);
+ env, incoming_seq_id, name);
if(!seq_prop_bean)
return NULL;
return sandesha2_seq_property_bean_get_value(seq_prop_bean, env);
@@ -435,7 +435,7 @@
AXIS2_EXTERN axis2_char_t* AXIS2_CALL
sandesha2_utils_get_outgoing_internal_seq_id(const axis2_env_t *env,
- axis2_char_t *seq_id)
+ axis2_char_t *seq_id)
{
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, seq_id, NULL);
@@ -1194,16 +1194,14 @@
internal_seq_id, SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES,
storage_mgr);
acked_msgs_list = sandesha2_utils_get_array_list_from_string(env,
- client_completed_msgs);
+ client_completed_msgs);
for(temp_msg_no = smallest_msg_no; temp_msg_no <= highest_in_msg_no;
- temp_msg_no++)
+ temp_msg_no++)
{
- axis2_char_t *str_msg_no = NULL;
-
- str_msg_no = AXIS2_MALLOC(env->allocator, 32*sizeof(axis2_char_t));
+ axis2_char_t str_msg_no[32];
sprintf(str_msg_no, "%ld", temp_msg_no);
if(!AXIS2_ARRAY_LIST_CONTAINS(acked_msgs_list, env,
- str_msg_no))
+ str_msg_no))
{
return AXIS2_FALSE;
}
@@ -1289,7 +1287,7 @@
return AXIS2_TRUE;
if(0 == AXIS2_STRCMP(AXIS2_WSA_ANONYMOUS_URL_SUBMISSION, address_l))
return AXIS2_TRUE;
- else if (sandesha2_utils_is_wsrm_anon_reply_to(env, address))
+ else if (sandesha2_utils_is_wsrm_anon_reply_to(env, (axis2_char_t *) address))
return AXIS2_TRUE;
return AXIS2_FALSE;
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=507382&r1=507381&r2=507382
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender.c Tue Feb 13 20:23:25 2007
@@ -262,7 +262,6 @@
sandesha2_sender_bean_t *sender_bean = NULL;
sandesha2_sender_worker_t *sender_worker = NULL;
axis2_char_t *msg_id = NULL;
- printf("in sender\n");
AXIS2_SLEEP(SANDESHA2_SENDER_SLEEP_TIME);
transaction = sandesha2_storage_mgr_get_transaction(storage_mgr,
env);
@@ -272,10 +271,7 @@
sender_bean = sandesha2_sender_mgr_get_next_msg_to_send(mgr, env);
if(!sender_bean)
{
- printf("sender_bean is null\n");
sandesha2_transaction_commit(transaction, env);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Sender Bean is NULL. "\
- "So continue");
continue;
}
msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *)
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org