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/05/17 07:54:58 UTC
svn commit: r538810 - in /webservices/sandesha/trunk/c: include/ src/
src/msgprocessors/ src/util/ src/workers/
Author: damitha
Date: Wed May 16 22:54:57 2007
New Revision: 538810
URL: http://svn.apache.org/viewvc?view=rev&rev=538810
Log:
Fixing RM 1.1 dual channel two way client
Modified:
webservices/sandesha/trunk/c/include/sandesha2_sender.h
webservices/sandesha/trunk/c/include/sandesha2_sender_worker.h
webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_utils.h
webservices/sandesha/trunk/c/src/Makefile.am
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/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/util/ack_mgr.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
webservices/sandesha/trunk/c/src/workers/sender.c
webservices/sandesha/trunk/c/src/workers/sender_worker.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_sender.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_sender.h?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender.h Wed May 16 22:54:57 2007
@@ -78,7 +78,8 @@
(sandesha2_sender_t *sender,
const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx,
- axis2_char_t *seq_id);
+ axis2_char_t *seq_id,
+ const axis2_bool_t persistent);
axis2_status_t AXIS2_CALL
sandesha2_sender_run (
Modified: webservices/sandesha/trunk/c/include/sandesha2_sender_worker.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_sender_worker.h?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender_worker.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender_worker.h Wed May 16 22:54:57 2007
@@ -92,7 +92,8 @@
axis2_status_t AXIS2_CALL
sandesha2_sender_worker_run (
sandesha2_sender_worker_t *sender_worker,
- const axutil_env_t *env);
+ const axutil_env_t *env,
+ const axis2_bool_t persistent_msg_ctx);
void sandesha2_sender_worker_set_transport_out(
sandesha2_sender_worker_t *sender_worker,
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?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h Wed May 16 22:54:57 2007
@@ -71,7 +71,8 @@
axis2_msg_ctx_t *first_app_msg,
axis2_char_t *int_seq_id,
axis2_char_t *spec_version,
- sandesha2_storage_mgr_t *storage_mgr);
+ sandesha2_storage_mgr_t *storage_mgr,
+ const axis2_bool_t persistent);
/** @} */
#ifdef __cplusplus
Modified: webservices/sandesha/trunk/c/include/sandesha2_utils.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_utils.h?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_utils.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_utils.h Wed May 16 22:54:57 2007
@@ -114,7 +114,8 @@
sandesha2_utils_start_sender_for_seq(
const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx,
- axis2_char_t *seq_id);
+ axis2_char_t *seq_id,
+ const axis2_bool_t persistent);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
sandesha2_utils_start_polling_mgr(
Modified: webservices/sandesha/trunk/c/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/Makefile.am?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/Makefile.am Wed May 16 22:54:57 2007
@@ -1 +1 @@
-SUBDIRS = wsrm storage util transport workers handlers msgprocessors polling core client
+SUBDIRS = wsrm storage util transport workers handlers msgprocessors polling client core
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?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Wed May 16 22:54:57 2007
@@ -378,7 +378,7 @@
AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- sandesha2_utils_start_sender_for_seq(env, conf_ctx, seq_id);
+ sandesha2_utils_start_sender_for_seq(env, conf_ctx, seq_id, AXIS2_FALSE);
axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);
}
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=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Wed May 16 22:54:57 2007
@@ -914,8 +914,16 @@
{
if(!out_seq_bean)
send_create_seq = AXIS2_TRUE;
- sandesha2_seq_mgr_setup_new_client_seq(env, msg_ctx, internal_seq_id,
- spec_ver, storage_mgr);
+ if(is_svr_side)
+ {
+ sandesha2_seq_mgr_setup_new_client_seq(env, msg_ctx, internal_seq_id,
+ spec_ver, storage_mgr, AXIS2_FALSE);
+ }
+ else
+ {
+ sandesha2_seq_mgr_setup_new_client_seq(env, msg_ctx, internal_seq_id,
+ spec_ver, storage_mgr, AXIS2_TRUE);
+ }
}
if(send_create_seq)
{
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=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Wed May 16 22:54:57 2007
@@ -392,7 +392,7 @@
to_epr = axis2_msg_ctx_get_to(out_msg_ctx, env);
if(to_epr && !sandesha2_utils_is_anon_uri(env,
axis2_endpoint_ref_get_address(to_epr, env)))
- {
+ {
orig_trans_out = axis2_msg_ctx_get_transport_out_desc(out_msg_ctx, env);
property = axutil_property_create_with_args(env, 0, 0, 0, orig_trans_out);
axis2_msg_ctx_set_property(out_msg_ctx, env,
@@ -434,22 +434,18 @@
op_ctx = axis2_msg_ctx_get_op_ctx(out_msg_ctx, env);
if(to_epr)
{
- printf("to_epr:%s\n", axis2_endpoint_ref_get_address(to_epr, env));
if(sandesha2_utils_is_anon_uri(env, axis2_endpoint_ref_get_address(to_epr,
env)))
{
- printf("came1\n");
axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
}
else
{
- printf("came2\n");
axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_FALSE);
}
}
else
{
- printf("came3\n");
axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
}
return AXIS2_SUCCESS;
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=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Wed May 16 22:54:57 2007
@@ -245,7 +245,7 @@
axis2_msg_ctx_set_transport_out_desc(ack_msg_ctx, env, trans_out);
ret_rm_msg = sandesha2_msg_init_init_msg(env, ack_msg_ctx);
- sandesha2_utils_start_sender_for_seq(env, conf_ctx, seq_id);
+ sandesha2_utils_start_sender_for_seq(env, conf_ctx, seq_id, AXIS2_FALSE);
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=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Wed May 16 22:54:57 2007
@@ -393,7 +393,8 @@
sandesha2_utils_start_sender_for_seq(
const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx,
- axis2_char_t *seq_id)
+ axis2_char_t *seq_id,
+ const axis2_bool_t persistent)
{
sandesha2_sender_t *sender = NULL;
axutil_property_t *property = NULL;
@@ -416,7 +417,8 @@
axis2_ctx_set_property(axis2_conf_ctx_get_base(conf_ctx, env),
env, SANDESHA2_SENDER, property);
}
- status = sandesha2_sender_run_for_seq(sender, env, conf_ctx, seq_id);
+ status = sandesha2_sender_run_for_seq(sender, env, conf_ctx, seq_id,
+ persistent);
return status;
}
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?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Wed May 16 22:54:57 2007
@@ -316,7 +316,8 @@
axis2_msg_ctx_t *first_app_msg,
axis2_char_t *int_seq_id,
axis2_char_t *spec_version,
- sandesha2_storage_mgr_t *storage_mgr)
+ sandesha2_storage_mgr_t *storage_mgr,
+ const axis2_bool_t persistent)
{
axis2_conf_ctx_t *conf_ctx = NULL;
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
@@ -497,7 +498,8 @@
epr, env);
if(!axis2_msg_ctx_get_server_side(first_app_msg, env) ||
!sandesha2_utils_is_anon_uri(env, addr))
- sandesha2_utils_start_sender_for_seq(env, conf_ctx, int_seq_id);
+ sandesha2_utils_start_sender_for_seq(env, conf_ctx, int_seq_id,
+ persistent);
sandesha2_seq_mgr_update_client_side_listener_if_needed(env, first_app_msg,
anon_uri);
AXIS2_LOG_INFO(env->log, "Exit:sandesha2_seq_mgr_setup_new_client_seq");
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=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender.c Wed May 16 22:54:57 2007
@@ -55,6 +55,7 @@
axutil_thread_mutex_t *mutex;
int seq_index;
int counter;
+ axis2_bool_t persistent_msg_ctx;
};
struct sandesha2_sender_args
@@ -185,7 +186,8 @@
sandesha2_sender_t *sender,
const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx,
- axis2_char_t *seq_id)
+ axis2_char_t *seq_id,
+ const axis2_bool_t persistent)
{
AXIS2_LOG_INFO(env->log, "Start:sandesha2_sender_run_for_seq");
axutil_thread_mutex_lock(sender->mutex);
@@ -199,6 +201,7 @@
{
sender->conf_ctx = conf_ctx;
sender->run_sender = AXIS2_TRUE;
+ sender->persistent_msg_ctx = persistent;
sandesha2_sender_run(sender, env);
}
axutil_thread_mutex_unlock(sender->mutex);
@@ -321,7 +324,8 @@
/* Start a sender worker which will work on this message */
sender_worker = sandesha2_sender_worker_create(env, sender->conf_ctx,
msg_id);
- sandesha2_sender_worker_run(sender_worker, env);
+ sandesha2_sender_worker_run(sender_worker, env,
+ sender->persistent_msg_ctx);
AXIS2_SLEEP(sleep_time * 2);
status = sandesha2_sender_worker_get_status(
sender_worker, env);
Modified: webservices/sandesha/trunk/c/src/workers/sender_worker.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?view=diff&rev=538810&r1=538809&r2=538810
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Wed May 16 22:54:57 2007
@@ -54,6 +54,7 @@
axis2_msg_ctx_t *msg_ctx;
axis2_transport_out_desc_t *transport_out;
axis2_status_t status;
+ axis2_bool_t persistent_msg_ctx;
};
struct sandesha2_sender_worker_args
@@ -70,7 +71,8 @@
axis2_status_t AXIS2_CALL
sandesha2_sender_worker_run (
sandesha2_sender_worker_t *sender_worker,
- const axutil_env_t *env);
+ const axutil_env_t *env,
+ const axis2_bool_t persistent_msg_ctx);
static void * AXIS2_THREAD_FUNC
sandesha2_sender_worker_worker_func(
@@ -207,7 +209,8 @@
axis2_status_t AXIS2_CALL
sandesha2_sender_worker_run (
sandesha2_sender_worker_t *sender_worker,
- const axutil_env_t *env)
+ const axutil_env_t *env,
+ const axis2_bool_t persistent_msg_ctx)
{
axutil_thread_t *worker_thread = NULL;
sandesha2_sender_worker_args_t *args = NULL;
@@ -216,6 +219,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
sender_worker->status = AXIS2_TRUE;
+ sender_worker->persistent_msg_ctx = persistent_msg_ctx;
args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_sender_worker_args_t));
args->impl = sender_worker;
args->env = (axutil_env_t*)env;
@@ -292,8 +296,12 @@
if(!msg_ctx)
{
axutil_allocator_switch_to_global_pool(env->allocator);
- msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env, key,
- sender_worker->conf_ctx, AXIS2_FALSE);
+ if(sender_worker->persistent_msg_ctx)
+ msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env,
+ key, sender_worker->conf_ctx, AXIS2_FALSE);
+ else
+ msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env,
+ key, sender_worker->conf_ctx, AXIS2_TRUE);
axutil_allocator_switch_to_local_pool(env->allocator);
}
if(!msg_ctx)
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org