Author: damitha
Date: Wed Jan 10 21:27:18 2007
New Revision: 495125
URL: http://svn.apache.org/viewvc?view=rev&rev=495125
Log:
Storage with sqlite database now works fine. This is tested only in linux only
with
rm_echo sample.
Modified:
webservices/sandesha/trunk/c/include/sandesha2_permanent_transaction.h
webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h
webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h
webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
webservices/sandesha/trunk/c/src/client/client.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
webservices/sandesha/trunk/c/src/storage/create_seq_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_transaction.c
webservices/sandesha/trunk/c/src/storage/inmemory/sandesha2_inmemory_bean_mgr.h
webservices/sandesha/trunk/c/src/storage/invoker_mgr.c
webservices/sandesha/trunk/c/src/storage/next_msg_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_bean_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_create_seq_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_invoker_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_next_msg_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_sender_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_seq_property_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_storage_mgr.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
webservices/sandesha/trunk/c/src/storage/permanent/sandesha2_permanent_bean_mgr.h
webservices/sandesha/trunk/c/src/storage/storage_mgr.c
webservices/sandesha/trunk/c/src/util/msg_creator.c
webservices/sandesha/trunk/c/src/util/terminate_mgr.c
webservices/sandesha/trunk/c/src/workers/sender_worker.c
webservices/sandesha/trunk/c/src/wsrm/seq_offer.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_permanent_transaction.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_permanent_transaction.h?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_permanent_transaction.h
(original)
+++ webservices/sandesha/trunk/c/include/sandesha2_permanent_transaction.h Wed
Jan 10 21:27:18 2007
@@ -53,6 +53,11 @@
struct sandesha2_transaction *transaction,
const axis2_env_t *env);
+axis2_bool_t
+sandesha2_permanent_transaction_is_active(
+ struct sandesha2_transaction *trans,
+ const axis2_env_t *env);
+
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h
(original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h Wed Jan
10 21:27:18 2007
@@ -52,7 +52,7 @@
sandesha2_rm_bean_t *seq_property,
const axis2_env_t *env);
-struct sandesha2_rm_bean* AXIS2_CALL
+struct sandesha2_rm_bean * AXIS2_CALL
sandesha2_seq_property_bean_get_base(
sandesha2_rm_bean_t* seq_property,
const axis2_env_t *env);
@@ -63,18 +63,18 @@
const axis2_env_t *env,
struct sandesha2_rm_bean* rm_bean);
-axis2_char_t* AXIS2_CALL
+axis2_char_t *AXIS2_CALL
sandesha2_seq_property_bean_get_name (
sandesha2_seq_property_bean_t *seq_property,
const axis2_env_t *env);
-void AXIS2_CALL
+void AXIS2_CALL
sandesha2_seq_property_bean_set_name (
sandesha2_seq_property_bean_t *seq_property,
const axis2_env_t *env,
axis2_char_t *name);
-axis2_char_t* AXIS2_CALL
+axis2_char_t *AXIS2_CALL
sandesha2_seq_property_bean_get_seq_id (
sandesha2_seq_property_bean_t *seq_property,
const axis2_env_t *env);
@@ -113,7 +113,7 @@
const axis2_env_t *env,
struct sandesha2_transaction *transaction);
-struct sandesha2_transaction* AXIS2_CALL
+struct sandesha2_transaction *AXIS2_CALL
sandesha2_seq_property_bean_get_transaction(
sandesha2_rm_bean_t *seq_property_bean,
const axis2_env_t *env);
Modified: webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h Wed Jan 10
21:27:18 2007
@@ -59,7 +59,7 @@
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *envv);
- axis2_status_t (AXIS2_CALL *
+ AXIS2_EXTERN axis2_status_t (AXIS2_CALL *
free_void_arg)(
void *storage_mgr,
const axis2_env_t *env);
Modified: webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c Wed Jan 10
21:27:18 2007
@@ -208,7 +208,7 @@
property);
}
}
- /*payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
+ payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
callback = axis2_callback_create(env);
AXIS2_CALLBACK_SET_ON_COMPLETE(callback, rm_echo_callback_on_complete);
AXIS2_CALLBACK_SET_ON_ERROR(callback, rm_echo_callback_on_error);
@@ -223,7 +223,7 @@
AXIS2_CALLBACK_SET_ON_ERROR(callback2, rm_echo_callback_on_error);
sandesha2_client_send_non_blocking(env, svc_client, options, NULL,
callback2, payload,
listener_manager);
- wait_on_callback(env, callback2);*/
+ wait_on_callback(env, callback2);
callback3 = axis2_callback_create(env);
AXIS2_CALLBACK_SET_ON_COMPLETE(callback3, rm_echo_callback_on_complete);
Modified: webservices/sandesha/trunk/c/src/client/client.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/client/client.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/client/client.c (original)
+++ webservices/sandesha/trunk/c/src/client/client.c Wed Jan 10 21:27:18 2007
@@ -427,7 +427,6 @@
{
if(AXIS2_TRUE != within_transaction && report_transaction != NULL)
{
- printf("rollback11\n");
sandesha2_transaction_rollback(report_transaction, env);
rolled_back = AXIS2_TRUE;
}
@@ -478,7 +477,6 @@
{
if(AXIS2_TRUE != within_transaction && report_transaction != NULL)
{
- printf("rollback12\n");
sandesha2_transaction_rollback(report_transaction, env);
rolled_back = AXIS2_TRUE;
}
@@ -1663,17 +1661,25 @@
sandesha2_identifier_t *identifier = NULL;
sandesha2_seq_property_bean_t *seq_id_bean = NULL;
axis2_char_t *seq_id = NULL;
+ sandesha2_transaction_t *transaction = NULL;
conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
if(storage_mgr)
+ {
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
storage_mgr, env);
+ transaction = sandesha2_storage_mgr_get_transaction(storage_mgr,
+ env);
+ }
if(seq_prop_mgr)
seq_id_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
env,
internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
+ if(transaction)
+ sandesha2_transaction_commit(transaction, env);
if(!seq_id_bean)
{
+ printf("came52\n");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SEQ_ID_BEAN_NOT_SET,
AXIS2_FAILURE);
return NULL;
@@ -1681,6 +1687,7 @@
seq_id = sandesha2_seq_property_bean_get_value(seq_id_bean, env);
if(!seq_id)
{
+ printf("came53\n");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_FIND_SEQ_ID,
AXIS2_FAILURE);
return NULL;
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=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
(original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Wed
Jan 10 21:27:18 2007
@@ -204,7 +204,6 @@
if(!within_transaction)
{
axis2_property_t *prop = NULL;
- printf("rollback1\n");
sandesha2_transaction_rollback(transaction, env);
prop = axis2_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION, 0, SANDESHA2_VALUE_FALSE);
@@ -245,7 +244,6 @@
if(!within_transaction)
{
axis2_property_t *prop = NULL;
- printf("rollback2\n");
sandesha2_transaction_rollback(transaction, env);
prop = axis2_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION, 0, SANDESHA2_VALUE_FALSE);
@@ -265,7 +263,6 @@
if(!within_transaction)
{
axis2_property_t *prop = NULL;
- printf("rollback3\n");
sandesha2_transaction_rollback(transaction, env);
prop = axis2_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION, 0, SANDESHA2_VALUE_FALSE);
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c Wed Jan 10
21:27:18 2007
@@ -161,7 +161,6 @@
if(!within_transaction)
{
axis2_property_t *prop = NULL;
- printf("rollback4\n");
sandesha2_transaction_rollback(transaction, env);
prop = axis2_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION, 0, SANDESHA2_VALUE_FALSE);
@@ -184,7 +183,6 @@
{
axis2_property_t *prop = NULL;
- printf("rollback5\n");
sandesha2_transaction_rollback(transaction, env);
prop = axis2_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION, 0, SANDESHA2_VALUE_FALSE);
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Wed Jan
10 21:27:18 2007
@@ -144,7 +144,6 @@
if(!within_transaction)
{
axis2_property_t *prop = NULL;
-
transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
@@ -209,7 +208,6 @@
if(!within_transaction)
{
axis2_property_t *prop = NULL;
- printf("rollback13\n");
sandesha2_transaction_rollback(transaction, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
@@ -226,7 +224,6 @@
if(!within_transaction && !rolled_back)
{
axis2_property_t *prop = NULL;
-
sandesha2_transaction_commit(transaction, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
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=495125&r1=495124&r2=495125
==============================================================================
---
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
(original)
+++
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
Wed Jan 10 21:27:18 2007
@@ -83,7 +83,7 @@
sandesha2_terminate_seq_msg_processor_setup_highest_msg_nums(
const axis2_env_t *env,
axis2_conf_ctx_t *conf_ctx,
- sandesha2_storage_mgr_t *storage_man,
+ sandesha2_storage_mgr_t *storage_mgr,
axis2_char_t *seq_id,
sandesha2_msg_ctx_t *rm_msg_ctx);
@@ -92,7 +92,7 @@
const axis2_env_t *env,
sandesha2_msg_ctx_t *rm_msg_ctx,
axis2_char_t *seq_id,
- sandesha2_storage_mgr_t *storage_man);
+ sandesha2_storage_mgr_t *storage_mgr);
static axis2_status_t AXIS2_CALL
sandesha2_terminate_seq_msg_processor_free (
@@ -167,7 +167,7 @@
sandesha2_terminate_seq_t *term_seq = NULL;
axis2_char_t *seq_id = NULL;
axis2_conf_ctx_t *conf_ctx = NULL;
- sandesha2_storage_mgr_t *storage_man = NULL;
+ sandesha2_storage_mgr_t *storage_mgr = NULL;
sandesha2_msg_ctx_t *fault_ctx = NULL;
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
sandesha2_seq_property_bean_t *term_rcvd_bean = NULL;
@@ -209,10 +209,10 @@
return AXIS2_FAILURE;
}
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
- storage_man = sandesha2_utils_get_storage_mgr(env, conf_ctx,
+ storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx,
AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
fault_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env,
- rm_msg_ctx, seq_id, storage_man);
+ rm_msg_ctx, seq_id, storage_mgr);
if(fault_ctx)
{
axis2_engine_t *engine = NULL;
@@ -223,7 +223,7 @@
AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
return AXIS2_SUCCESS;
}
- seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_man,
env);
+ seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr,
env);
term_rcvd_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_seq_id(term_rcvd_bean, env, seq_id);
sandesha2_seq_property_bean_set_name(term_rcvd_bean, env,
@@ -236,20 +236,19 @@
if(AXIS2_TRUE == sandesha2_spec_specific_consts_is_term_seq_res_reqd(env,
spec_version))
sandesha2_terminate_seq_msg_processor_add_terminate_seq_res(env,
- rm_msg_ctx, seq_id, storage_man);
+ rm_msg_ctx, seq_id, storage_mgr);
sandesha2_terminate_seq_msg_processor_setup_highest_msg_nums(env,
conf_ctx,
- storage_man, seq_id, rm_msg_ctx);
+ storage_mgr, seq_id, rm_msg_ctx);
sandesha2_terminate_mgr_clean_recv_side_after_terminate_msg(env, conf_ctx,
- seq_id, storage_man);
+ seq_id, storage_mgr);
transmit_bean = sandesha2_seq_property_bean_create_with_data(env, seq_id,
SANDESHA2_SEQ_PROP_SEQ_TERMINATED,
SANDESHA2_VALUE_TRUE);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, transmit_bean);
- sandesha2_seq_mgr_update_last_activated_time(env, seq_id, storage_man);
+ sandesha2_seq_mgr_update_last_activated_time(env, seq_id, storage_mgr);
sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
AXIS2_LOG_INFO(env->log,
"[sandesha2] Exit:
sandesha2_terminate_msg_processor_process_in_msg");
-
return AXIS2_SUCCESS;
}
@@ -258,7 +257,7 @@
sandesha2_terminate_seq_msg_processor_setup_highest_msg_nums(
const axis2_env_t *env,
axis2_conf_ctx_t *conf_ctx,
- sandesha2_storage_mgr_t *storage_man,
+ sandesha2_storage_mgr_t *storage_mgr,
axis2_char_t *seq_id,
sandesha2_msg_ctx_t *rm_msg_ctx)
{
@@ -273,16 +272,16 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, storage_man, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
- seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_man,
env);
+ 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_man);
+ 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_man);
+ SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY, storage_mgr);
if(highest_msg_num_str)
{
if(!highest_msg_key)
@@ -308,7 +307,7 @@
seq_id, SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_NO,
highest_msg_num_str);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, last_in_msg_bean);
- highest_in_msg = sandesha2_storage_mgr_retrieve_msg_ctx(storage_man,
env,
+ 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);
@@ -343,16 +342,16 @@
}
}
out_seq_id = sandesha2_utils_get_seq_property(env, res_side_int_seq_id,
- SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_man);
+ 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)
{
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_man);
+ highest_out_msg_num, res_side_int_seq_id, storage_mgr);
if(AXIS2_TRUE == all_acked)
sandesha2_terminate_mgr_add_terminate_seq_msg(env, rm_msg_ctx,
- out_seq_id, res_side_int_seq_id, storage_man);
+ out_seq_id, res_side_int_seq_id, storage_mgr);
}
return AXIS2_SUCCESS;
@@ -363,7 +362,7 @@
const axis2_env_t *env,
sandesha2_msg_ctx_t *rm_msg_ctx,
axis2_char_t *seq_id,
- sandesha2_storage_mgr_t *storage_man)
+ sandesha2_storage_mgr_t *storage_mgr)
{
axis2_msg_ctx_t *msg_ctx = NULL;
axis2_msg_ctx_t *out_msg_ctx = NULL;
@@ -376,24 +375,19 @@
axis2_char_t *anon_uri = NULL;
axis2_endpoint_ref_t *to_epr = NULL;
axis2_ctx_t *ctx = NULL;
- sandesha2_sender_bean_t *term_res_bean = NULL;
- axis2_char_t *key = NULL;
- axis2_transport_out_desc_t *orig_trans_out = NULL;
- axis2_transport_out_desc_t *trans_out = NULL;
- sandesha2_sender_mgr_t *retrans_mgr = NULL;
-
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, storage_man, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
out_msg_ctx = axis2_core_utils_create_out_msg_ctx(env, msg_ctx);
out_rm_msg = sandesha2_msg_creator_create_terminate_seq_res_msg(env,
- rm_msg_ctx, out_msg_ctx, storage_man);
+ rm_msg_ctx, out_msg_ctx, storage_mgr);
ack_rm_msg = sandesha2_ack_mgr_generate_ack_msg(env, rm_msg_ctx, seq_id,
- storage_man);
+ storage_mgr);
seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(ack_rm_msg,
env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
sandesha2_msg_ctx_set_msg_part(out_rm_msg, env,
@@ -410,7 +404,8 @@
AXIS2_MSG_CTX_SET_RESPONSE_WRITTEN(out_msg_ctx, env, AXIS2_TRUE);
/* test code */
-
+ axis2_transport_out_desc_t *orig_trans_out = NULL;
+ axis2_transport_out_desc_t *trans_out = NULL;
orig_trans_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(out_msg_ctx, env);
property = axis2_property_create_with_args(env, 3, 0, orig_trans_out);
AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env,
@@ -418,7 +413,9 @@
trans_out = sandesha2_utils_get_transport_out(env);
AXIS2_MSG_CTX_SET_TRANSPORT_OUT_DESC(out_msg_ctx, env, trans_out);
-
+ sandesha2_sender_bean_t *term_res_bean = NULL;
+ axis2_char_t *key = NULL;
+ sandesha2_sender_mgr_t *retrans_mgr = NULL;
key = axis2_uuid_gen(env);
term_res_bean = sandesha2_sender_bean_create(env);
sandesha2_sender_bean_set_msg_ctx_ref_key(term_res_bean, env, key);
@@ -427,7 +424,7 @@
key);
AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env, SANDESHA2_MESSAGE_STORE_KEY,
property, AXIS2_FALSE);
- sandesha2_storage_mgr_store_msg_ctx(storage_man, env, key, out_msg_ctx);
+ sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, key, out_msg_ctx);
/* TODO: refine the terminate delay */
sandesha2_sender_bean_set_time_to_send(term_res_bean, env,
@@ -443,7 +440,7 @@
AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, SANDESHA2_QUALIFIED_FOR_SENDING,
property, AXIS2_FALSE);
sandesha2_sender_bean_set_resend(term_res_bean, env, AXIS2_FALSE);
- retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_man, env);
+ retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
sandesha2_sender_mgr_insert(retrans_mgr, env, term_res_bean);
/* end test code */
@@ -453,7 +450,7 @@
addr_ns_uri = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE,
- storage_man);
+ storage_mgr);
anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
@@ -479,7 +476,7 @@
{
axis2_msg_ctx_t *msg_ctx = NULL;
axis2_conf_ctx_t *conf_ctx = NULL;
- sandesha2_storage_mgr_t *storage_man = NULL;
+ sandesha2_storage_mgr_t *storage_mgr = NULL;
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
axis2_char_t *to_address = NULL;
axis2_char_t *seq_key = NULL;
@@ -511,9 +508,9 @@
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
- storage_man = sandesha2_utils_get_storage_mgr(env, conf_ctx,
+ storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx,
AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
- seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_man,
env);
+ seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr,
env);
to_address = (axis2_char_t*)AXIS2_ENDPOINT_REF_GET_ADDRESS(
AXIS2_MSG_CTX_GET_TO(msg_ctx, env), env);
property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
SANDESHA2_CLIENT_SEQ_KEY,
@@ -522,7 +519,7 @@
seq_key = AXIS2_PROPERTY_GET_VALUE(property, env);
int_seq_id = sandesha2_utils_get_internal_seq_id(env, to_address, seq_key);
out_seq_id = sandesha2_utils_get_seq_property(env, int_seq_id,
- SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_man);
+ SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_mgr);
if(!out_seq_id)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] seq_id was not"
@@ -532,7 +529,7 @@
return AXIS2_FAILURE;
}
terminated = sandesha2_utils_get_seq_property(env, int_seq_id,
- SANDESHA2_SEQ_PROP_TERMINATE_ADDED, storage_man);
+ SANDESHA2_SEQ_PROP_TERMINATE_ADDED, storage_mgr);
old_op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
qname = axis2_qname_create(env, "temp", NULL, NULL);
@@ -565,7 +562,7 @@
SANDESHA2_APPLICATION_PROCESSING_DONE, property,
AXIS2_FALSE);
AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env,
to_address));
- rm_version = sandesha2_utils_get_rm_version(env, int_seq_id, storage_man);
+ rm_version = sandesha2_utils_get_rm_version(env, int_seq_id, storage_mgr);
if(!rm_version)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cant find the"
@@ -579,7 +576,7 @@
sandesha2_spec_specific_consts_get_terminate_seq_soap_action
(env, rm_version));
transport_to = sandesha2_utils_get_seq_property(env, int_seq_id,
- SANDESHA2_SEQ_PROP_TRANSPORT_TO, storage_man);
+ SANDESHA2_SEQ_PROP_TRANSPORT_TO, storage_mgr);
if(transport_to)
{
@@ -596,7 +593,7 @@
term_bean = sandesha2_sender_bean_create(env);
sandesha2_sender_bean_set_msg_ctx_ref_key(term_bean, env, key);
/*AXIS2_MSG_CTX_SET_KEEP_ALIVE(msg_ctx, env, AXIS2_TRUE);*/
- sandesha2_storage_mgr_store_msg_ctx(storage_man, env, key, msg_ctx);
+ sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, key, msg_ctx);
/* TODO: refine the terminate delay */
sandesha2_sender_bean_set_time_to_send(term_bean, env,
@@ -612,7 +609,7 @@
AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, SANDESHA2_QUALIFIED_FOR_SENDING,
property, AXIS2_FALSE);
sandesha2_sender_bean_set_resend(term_bean, env, AXIS2_FALSE);
- retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_man, env);
+ retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
sandesha2_sender_mgr_insert(retrans_mgr, env, term_bean);
term_added = sandesha2_seq_property_bean_create(env);
@@ -653,6 +650,9 @@
transport_sender = AXIS2_TRANSPORT_OUT_DESC_GET_SENDER(sandesha2_out_desc,
env);
AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);
+ sandesha2_terminate_mgr_terminate_sending_side(env, conf_ctx, int_seq_id,
+ AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env), storage_mgr);
+
AXIS2_LOG_INFO(env->log,
"[sandesha2] Exit: sandesha2_terminate_msg_processor_process_out_msg");
return AXIS2_SUCCESS;
Modified: webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c Wed Jan
10 21:27:18 2007
@@ -35,7 +35,7 @@
#define SANDESHA2_INTF_TO_IMPL(seq_property_bean) \
((sandesha2_seq_property_bean_impl_t *) seq_property_bean)
-axis2_char_t* AXIS2_CALL
+static axis2_char_t *
sandesha2_inmemory_seq_property_mgr_get_key(
sandesha2_rm_bean_t *seq_property_bean,
const axis2_env_t *env);
@@ -292,7 +292,7 @@
env);
}
-axis2_char_t* AXIS2_CALL
+static axis2_char_t *
sandesha2_inmemory_seq_property_mgr_get_key(
sandesha2_rm_bean_t *seq_property_bean,
const axis2_env_t *env)
Modified: webservices/sandesha/trunk/c/src/storage/create_seq_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/create_seq_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/create_seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/create_seq_mgr.c Wed Jan 10
21:27:18 2007
@@ -27,7 +27,7 @@
sandesha2_create_seq_mgr_t *seq_mgr,
const axis2_env_t *env)
{
- seq_mgr->ops.free(seq_mgr, env);
+ return seq_mgr->ops.free(seq_mgr, env);
}
axis2_bool_t AXIS2_CALL
Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c Wed
Jan 10 21:27:18 2007
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_constants.h>
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_error.h>
#include <sandesha2_storage_mgr.h>
#include <axis2_log.h>
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c
Wed Jan 10 21:27:18 2007
@@ -15,7 +15,7 @@
*/
#include <sandesha2_inmemory_create_seq_mgr.h>
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_constants.h>
#include <sandesha2_storage_mgr.h>
#include <sandesha2_create_seq_mgr.h>
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c
Wed Jan 10 21:27:18 2007
@@ -15,7 +15,7 @@
*/
#include <sandesha2_inmemory_invoker_mgr.h>
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_invoker_mgr.h>
#include <sandesha2_storage_mgr.h>
#include <sandesha2_constants.h>
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c
Wed Jan 10 21:27:18 2007
@@ -15,7 +15,7 @@
*/
#include <sandesha2_inmemory_next_msg_mgr.h>
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_next_msg_mgr.h>
#include <sandesha2_constants.h>
#include <sandesha2_error.h>
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c Wed
Jan 10 21:27:18 2007
@@ -15,7 +15,7 @@
*/
#include <sandesha2_inmemory_sender_mgr.h>
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_sender_mgr.h>
#include <sandesha2_constants.h>
#include <sandesha2_error.h>
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
---
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c
(original)
+++
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c
Wed Jan 10 21:27:18 2007
@@ -16,7 +16,7 @@
#include <sandesha2_seq_property_mgr.h>
#include <sandesha2_inmemory_seq_property_mgr.h>
-#include "sandesha2_inmemory_bean_mgr.h"
+#include <sandesha2_inmemory_bean_mgr.h>
#include <sandesha2_constants.h>
#include <sandesha2_error.h>
#include <sandesha2_utils.h>
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_transaction.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_transaction.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_transaction.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_transaction.c
Wed Jan 10 21:27:18 2007
@@ -44,33 +44,33 @@
#define SANDESHA2_INTF_TO_IMPL(trans) \
((sandesha2_inmemory_transaction_impl_t *) trans)
-axis2_status_t AXIS2_CALL
+static axis2_status_t
sandesha2_inmemory_transaction_free(
sandesha2_transaction_t *trans,
const axis2_env_t *env);
-axis2_bool_t AXIS2_CALL
+static axis2_bool_t
sandesha2_inmemory_transaction_is_active(
sandesha2_transaction_t *trans,
const axis2_env_t *env);
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_commit(
sandesha2_transaction_t *trans,
const axis2_env_t *env);
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_rollback(
sandesha2_transaction_t *trans,
const axis2_env_t *env);
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_enlist(
sandesha2_transaction_t *trans,
const axis2_env_t *env,
sandesha2_rm_bean_t *rm_bean);
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_release_locks(
sandesha2_transaction_t *trans,
const axis2_env_t *env);
@@ -105,7 +105,7 @@
return &(trans_impl->trans);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t
sandesha2_inmemory_transaction_free(
sandesha2_transaction_t *trans,
const axis2_env_t *env)
@@ -133,15 +133,14 @@
return AXIS2_SUCCESS;
}
-axis2_bool_t AXIS2_CALL
+static axis2_bool_t
sandesha2_inmemory_transaction_is_active(
sandesha2_transaction_t *trans,
const axis2_env_t *env)
{
- int size = 0;
sandesha2_inmemory_transaction_impl_t *trans_impl = NULL;
trans_impl = SANDESHA2_INTF_TO_IMPL(trans);
-
+ int size = 0;
if(trans_impl->enlisted_beans)
size = AXIS2_ARRAY_LIST_SIZE(trans_impl->enlisted_beans, env);
if(size > 0)
@@ -150,7 +149,7 @@
return AXIS2_FALSE;
}
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_commit(
sandesha2_transaction_t *trans,
const axis2_env_t *env)
@@ -158,7 +157,7 @@
sandesha2_inmemory_transaction_release_locks(trans, env);
}
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_rollback(
sandesha2_transaction_t *trans,
const axis2_env_t *env)
@@ -166,7 +165,7 @@
sandesha2_inmemory_transaction_release_locks(trans, env);
}
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_release_locks(
sandesha2_transaction_t *trans,
const axis2_env_t *env)
@@ -190,7 +189,7 @@
trans_impl->enlisted_beans = NULL;
}
-void AXIS2_CALL
+static void
sandesha2_inmemory_transaction_enlist(
sandesha2_transaction_t *trans,
const axis2_env_t *env,
Modified:
webservices/sandesha/trunk/c/src/storage/inmemory/sandesha2_inmemory_bean_mgr.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/sandesha2_inmemory_bean_mgr.h?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
---
webservices/sandesha/trunk/c/src/storage/inmemory/sandesha2_inmemory_bean_mgr.h
(original)
+++
webservices/sandesha/trunk/c/src/storage/inmemory/sandesha2_inmemory_bean_mgr.h
Wed Jan 10 21:27:18 2007
@@ -124,7 +124,7 @@
const axis2_env_t *env,
axis2_char_t *key);
-sandesha2_rm_bean_t* AXIS2_CALL
+sandesha2_rm_bean_t *AXIS2_CALL
sandesha2_inmemory_bean_mgr_retrieve(
sandesha2_inmemory_bean_mgr_t *bean_mgr,
const axis2_env_t *env,
@@ -137,13 +137,13 @@
axis2_char_t *key,
sandesha2_rm_bean_t *bean);
-axis2_array_list_t* AXIS2_CALL
+axis2_array_list_t *AXIS2_CALL
sandesha2_inmemory_bean_mgr_find(
sandesha2_inmemory_bean_mgr_t *bean_mgr,
const axis2_env_t *env,
sandesha2_rm_bean_t *bean);
-sandesha2_rm_bean_t * AXIS2_CALL
+sandesha2_rm_bean_t *AXIS2_CALL
sandesha2_inmemory_bean_mgr_find_unique(
sandesha2_inmemory_bean_mgr_t *bean_mgr,
const axis2_env_t *env,
Modified: webservices/sandesha/trunk/c/src/storage/invoker_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/invoker_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/invoker_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/invoker_mgr.c Wed Jan 10 21:27:18
2007
@@ -27,7 +27,7 @@
sandesha2_invoker_mgr_t *invoker,
const axis2_env_t *env)
{
- invoker->ops.free(invoker, env);
+ return invoker->ops.free(invoker, env);
}
axis2_bool_t AXIS2_CALL
Modified: webservices/sandesha/trunk/c/src/storage/next_msg_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/next_msg_mgr.c?view=diff&rev=495125&r1=495124&r2=495125
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/next_msg_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/next_msg_mgr.c Wed Jan 10 21:27:18
2007
@@ -28,7 +28,7 @@
sandesha2_next_msg_mgr_t *next_msg,
const axis2_env_t *env)
{
- next_msg->ops.free(next_msg, env);
+ return next_msg->ops.free(next_msg, env);
}
axis2_bool_t AXIS2_CALL
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]