Author: damitha
Date: Sat Dec 8 18:44:00 2007
New Revision: 602614
URL: http://svn.apache.org/viewvc?rev=602614&view=rev
Log:
Cleaning the code
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/msg_retrans_adjuster.c
webservices/sandesha/trunk/c/src/workers/in_order_invoker.c
webservices/sandesha/trunk/c/src/workers/sender_worker.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?rev=602614&r1=602613&r2=602614&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Sat Dec 8
18:44:00 2007
@@ -478,8 +478,6 @@
#define SANDESHA2_POLLING_MGR "PollingManager"
- #define SANDESHA2_WITHIN_TRANSACTION "WithinTransaction"
-
#define SANDESHA2_STORAGE_MGR_PARAMETER "Sandesha2StorageManager"
#define SANDESHA2_POST_FAILURE_MESSAGE "PostFailureMessage"
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?rev=602614&r1=602613&r2=602614&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
(original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Sat
Dec 8 18:44:00 2007
@@ -217,7 +217,6 @@
"storage manager");
return AXIS2_FAILURE;
}
- property = axis2_ctx_get_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION);
fault_part = axiom_soap_body_get_fault(axiom_soap_envelope_get_body(
soap_envelope, env), env);
if(fault_part)
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=602614&r1=602613&r2=602614&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Sat Dec 8
18:44:00 2007
@@ -174,9 +174,6 @@
{
axis2_conf_ctx_t *conf_ctx = NULL;
axis2_ctx_t *ctx = NULL;
- axutil_property_t *property = NULL;
- axutil_property_t *new_property = NULL;
-
AXIS2_PARAM_CHECK(env->error, int_seq_id, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
@@ -186,13 +183,6 @@
conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
ctx = axis2_conf_ctx_get_base(conf_ctx, env);
- property = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION);
- if(property)
- new_property = axutil_property_clone(property, env);
- if(new_property)
- axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION,
- new_property);
/* we have to callback listener here */
sandesha2_terminate_mgr_time_out_sending_side_seq(env, conf_ctx,
int_seq_id,
AXIS2_FALSE, storage_mgr);
Modified: webservices/sandesha/trunk/c/src/workers/in_order_invoker.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/in_order_invoker.c?rev=602614&r1=602613&r2=602614&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/in_order_invoker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/in_order_invoker.c Sat Dec 8
18:44:00 2007
@@ -16,7 +16,6 @@
#include <sandesha2_in_order_invoker.h>
#include <sandesha2_constants.h>
#include <sandesha2_utils.h>
-#include <sandesha2_transaction.h>
#include <sandesha2_storage_mgr.h>
#include <sandesha2_terminate_mgr.h>
#include <sandesha2_seq_property_bean.h>
@@ -252,9 +251,6 @@
while(invoker->run_invoker)
{
- sandesha2_transaction_t *transaction = NULL;
- /* Use when transaction handling is done
- axis2_bool_t rollbacked = AXIS2_FALSE;*/
sandesha2_storage_mgr_t *storage_mgr = NULL;
sandesha2_next_msg_mgr_t *next_msg_mgr = NULL;
sandesha2_invoker_mgr_t *storage_map_mgr = NULL;
@@ -275,8 +271,6 @@
(storage_mgr, env);
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
storage_mgr, env);
- transaction = sandesha2_storage_mgr_get_transaction(storage_mgr,
- env);
all_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
env, SANDESHA2_SEQ_PROP_ALL_SEQS,
SANDESHA2_SEQ_PROP_INCOMING_SEQ_LIST);
@@ -299,9 +293,6 @@
axis2_bool_t continue_seq = AXIS2_TRUE;
seq_id = axutil_array_list_get(all_seq_list, env, i);
- sandesha2_transaction_commit(transaction, env);
- transaction = sandesha2_storage_mgr_get_transaction(
- storage_mgr, env);
next_msg_bean = sandesha2_next_msg_mgr_retrieve(
next_msg_mgr, env, seq_id);
if(!next_msg_bean)
@@ -357,14 +348,6 @@
rm_msg_ctx = sandesha2_msg_init_init_msg(env,
msg_to_invoke);
else continue;
- /* have to commit the transaction before invoking. This may
get
- * changed when WS-AT is available.
- */
- sandesha2_transaction_commit(transaction, env);
- property = axutil_property_create_with_args(env, 0, 0, 0,
- AXIS2_VALUE_TRUE);
- axis2_msg_ctx_set_property(msg_to_invoke, env,
- SANDESHA2_WITHIN_TRANSACTION, property);
property = axis2_msg_ctx_get_property(msg_to_invoke, env,
SANDESHA2_POST_FAILURE_MESSAGE);
@@ -389,8 +372,6 @@
return NULL;
}
invoked = AXIS2_TRUE;
- transaction = sandesha2_storage_mgr_get_transaction(
- storage_mgr, env);
sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, key);
msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(
storage_mgr, env, key, invoker->conf_ctx, AXIS2_FALSE);
@@ -427,9 +408,6 @@
next_msg_bean);
}
}
- sandesha2_transaction_commit(transaction, env);
-
- /* TODO make transaction handling effective */
}
return NULL;
}
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?rev=602614&r1=602613&r2=602614&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Sat Dec 8
18:44:00 2007
@@ -48,7 +48,6 @@
{
axis2_conf_ctx_t *conf_ctx;
axutil_thread_mutex_t *mutex;
- int counter;
axis2_char_t *msg_id;
axis2_msg_ctx_t *msg_ctx;
axis2_transport_out_desc_t *transport_out;
@@ -97,12 +96,9 @@
axis2_char_t *msg_id)
{
sandesha2_sender_worker_t *sender_worker = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
sender_worker = (sandesha2_sender_worker_t *)AXIS2_MALLOC
(env->allocator,
sizeof(sandesha2_sender_worker_t));
-
if(!sender_worker)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
AXIS2_FAILURE);
@@ -110,7 +106,6 @@
}
sender_worker->conf_ctx = conf_ctx;
sender_worker->mutex = NULL;
- sender_worker->counter = 0;
sender_worker->msg_id = axutil_strdup(env, msg_id);
sender_worker->msg_ctx = NULL;
sender_worker->transport_out = NULL;
@@ -142,7 +137,6 @@
}
sender_worker->conf_ctx = conf_ctx;
sender_worker->mutex = NULL;
- sender_worker->counter = 0;
sender_worker->msg_id = axutil_strdup(env, msg_id);
sender_worker->msg_ctx = msg_ctx;
sender_worker->transport_out = NULL;
@@ -160,8 +154,6 @@
const axutil_env_t *env)
{
sandesha2_sender_worker_t *sender_worker_l = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
sender_worker_l = (sandesha2_sender_worker_t *) sender_worker;
return sandesha2_sender_worker_free(sender_worker_l, env);
}
@@ -171,7 +163,6 @@
sandesha2_sender_worker_t *sender_worker,
const axutil_env_t *env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
/* Do not free this */
sender_worker->conf_ctx = NULL;
@@ -251,17 +242,6 @@
"not present in the store");
return AXIS2_FAILURE;
}
- property = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION);
- if(property)
- axutil_property_set_value(property, env, AXIS2_VALUE_TRUE);
- else
- {
- property = axutil_property_create_with_args(env, 0, 0, 0,
- AXIS2_VALUE_TRUE);
- axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_WITHIN_TRANSACTION,
- property);
- }
continue_sending = sandesha2_msg_retrans_adjuster_adjust_retrans(env,
sender_worker_bean, conf_ctx, storage_mgr);
sandesha2_sender_mgr_update(sender_mgr, env, sender_worker_bean);
@@ -346,17 +326,6 @@
transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
if(transport_sender)
{
- property = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION);
- if(property)
- axutil_property_set_value(property, env, AXIS2_VALUE_FALSE);
- else
- {
- property = axutil_property_create_with_args(env, 0, 0, 0,
- AXIS2_VALUE_FALSE);
- axis2_msg_ctx_set_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION, property);
- }
/* This is neccessary to avoid a double free */
axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
/* Consider building soap envelope */
@@ -368,17 +337,6 @@
successfully_sent = AXIS2_FALSE;
}
}
- property = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION);
- if(property)
- axutil_property_set_value(property, env, AXIS2_VALUE_TRUE);
- else
- {
- property = axutil_property_create_with_args(env, 0, 0, 0,
- AXIS2_VALUE_TRUE);
- axis2_msg_ctx_set_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION, property);
- }
msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *)
sender_worker_bean, env);
bean1 = sandesha2_sender_mgr_retrieve(sender_mgr, env, msg_id);
@@ -438,17 +396,6 @@
* status is false*/
status = AXIS2_FAILURE;
}
- property = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION);
- if(property)
- axutil_property_set_value(property, env, AXIS2_VALUE_FALSE);
- else
- {
- property = axutil_property_create_with_args(env, 0, 0, 0,
- AXIS2_VALUE_FALSE);
- axis2_msg_ctx_set_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION, property);
- }
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"[sandesha2]Exit:sandesha2_sender_worker_send");
return status;
@@ -487,7 +434,6 @@
axis2_msg_ctx_t *msg_ctx)
{
axutil_property_t *property = NULL;
- axutil_property_t *new_property = NULL;
axis2_msg_ctx_t *res_msg_ctx = NULL;
axis2_op_ctx_t *req_op_ctx = NULL;
axiom_soap_envelope_t *res_envelope = NULL;
@@ -560,14 +506,6 @@
res_envelope = axis2_http_transport_utils_create_soap_msg(env, msg_ctx,
soap_ns_uri);
}
-
- property = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION);
- if(property)
- new_property = axutil_property_clone(property, env);
- if(new_property)
- axis2_msg_ctx_set_property(res_msg_ctx, env,
- SANDESHA2_WITHIN_TRANSACTION, new_property);
if(res_envelope)
{
axis2_engine_t *engine = NULL;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]