You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2007/12/06 09:39:09 UTC

svn commit: r601656 - in /webservices/sandesha/trunk/c/src: client/ handlers/ msgprocessors/ polling/ storage/mysql/ storage/sqlite/ util/ workers/

Author: damitha
Date: Thu Dec  6 00:39:05 2007
New Revision: 601656

URL: http://svn.apache.org/viewvc?rev=601656&view=rev
Log:
Removed transactions from sandesha2c.

Modified:
    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/app_msg_processor.c
    webservices/sandesha/trunk/c/src/polling/polling_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c
    webservices/sandesha/trunk/c/src/util/msg_creator.c
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
    webservices/sandesha/trunk/c/src/workers/sender.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/src/client/client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/client/client.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/client/client.c (original)
+++ webservices/sandesha/trunk/c/src/client/client.c Thu Dec  6 00:39:05 2007
@@ -18,7 +18,6 @@
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_seq_property_mgr.h>
 #include <sandesha2_create_seq_mgr.h>
-#include <sandesha2_transaction.h>
 #include "sandesha2_client_constants.h"
 #include <sandesha2_spec_specific_consts.h>
 #include <sandesha2_utils.h>
@@ -49,8 +48,6 @@
 #include <axiom_element.h>
 #include <axiom_soap_const.h>
 
-static sandesha2_transaction_t *client_report_transaction = NULL;
-
 /**
  * Caller must free the returned internal_seq_id
  * @param to
@@ -232,14 +229,8 @@
     sandesha2_create_seq_bean_t *create_seq_bean = NULL;
     axis2_conf_t *conf = NULL;
     axis2_ctx_t *ctx = NULL;
-    axutil_property_t *property = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    sandesha2_transaction_t *report_transaction = NULL;
-    axis2_char_t *within_transaction_str = NULL;
     axis2_char_t *out_seq_id = NULL;
-    axis2_bool_t commit = AXIS2_TRUE;
     
-    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, internal_seq_id, NULL);
     AXIS2_PARAM_CHECK(env->error, conf_ctx, NULL);
 
@@ -252,29 +243,6 @@
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env); 
     create_seq_mgr = sandesha2_storage_mgr_get_create_seq_mgr(storage_mgr, env); 
     ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-    if(client_report_transaction)
-    {
-        report_transaction = client_report_transaction;
-        commit = AXIS2_FALSE;
-    }
-    else
-    {
-        property = axis2_ctx_get_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION);
-        if(property)
-            within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-                property, env);
-        if(within_transaction_str && 0 == axutil_strcmp(within_transaction_str, 
-            AXIS2_VALUE_TRUE))
-        {
-            within_transaction = AXIS2_TRUE;
-        }
-        if(!within_transaction)
-        {
-            report_transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, 
-                env);
-        }
-        client_report_transaction = report_transaction;
-    }
     sandesha2_seq_report_set_internal_seq_id(seq_report, env, internal_seq_id);
     create_seq_find_bean = sandesha2_create_seq_bean_create(env);
     sandesha2_create_seq_bean_set_internal_seq_id(create_seq_find_bean, 
@@ -329,11 +297,6 @@
         SANDESHA2_SEQ_STATUS_ESTABLISHED);
     sandesha2_client_fill_outgoing_seq_info(env, seq_report, out_seq_id, 
         seq_prop_mgr);
-    if(report_transaction && commit)
-    {
-         sandesha2_transaction_commit(report_transaction, env);
-         client_report_transaction = NULL;
-    }
     return seq_report;
 }
 
@@ -403,17 +366,11 @@
     sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
     sandesha2_report_t *sandesha2_report = NULL;
     sandesha2_seq_property_bean_t *internal_seq_find_bean = NULL;
-    axis2_char_t *within_transaction_str = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    sandesha2_transaction_t *report_transaction = NULL;
-    axis2_bool_t rolled_back = AXIS2_FALSE;
     axutil_array_list_t *collection = NULL;
     axutil_array_list_t *svr_completed_msgs_beans = NULL;
     int i = 0, size = 0;
     sandesha2_seq_property_bean_t *svr_completed_msgs_find_bean = NULL;
     axis2_ctx_t *ctx = NULL;
-    axutil_property_t *property = NULL;
-    axis2_bool_t commit = AXIS2_TRUE;
 
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
@@ -424,33 +381,6 @@
     sandesha2_report = sandesha2_report_create(env);
     internal_seq_find_bean = sandesha2_seq_property_bean_create(env);
     ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-    if(client_report_transaction)
-    {
-        report_transaction = client_report_transaction;
-        commit = AXIS2_FALSE;
-    }
-    else
-    {
-        property = (axutil_property_t *) axis2_ctx_get_property(ctx, env, 
-            SANDESHA2_WITHIN_TRANSACTION);
-        if(property)
-            within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-                property, env);
-        if(within_transaction_str && 0 == axutil_strcmp(within_transaction_str, 
-            AXIS2_VALUE_TRUE))
-        {
-            within_transaction = AXIS2_TRUE;
-        }
-        if(AXIS2_TRUE != within_transaction)
-        {
-            if (storage_mgr)
-            {
-                report_transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, 
-                    env);
-            }
-        }
-        client_report_transaction = report_transaction;
-    }
     if(internal_seq_find_bean) 
         sandesha2_seq_property_bean_set_name(internal_seq_find_bean, env, 
             SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID);
@@ -530,12 +460,6 @@
         status = sandesha2_seq_report_get_seq_status(seq_report, env);
         sandesha2_report_add_to_seq_status_map(sandesha2_report, env, seq_id, status);
     }
-    if (AXIS2_TRUE != within_transaction && AXIS2_TRUE != rolled_back && 
-        report_transaction != NULL && commit) 
-    {
-        sandesha2_transaction_commit(report_transaction, env);
-        client_report_transaction = NULL;
-    }
 	return sandesha2_report;
 }
 
@@ -1582,13 +1506,8 @@
     sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
     axis2_conf_t *conf = NULL;
     axis2_ctx_t *ctx = NULL;
-    axutil_property_t *property = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    sandesha2_transaction_t *report_transaction = NULL;
     axutil_array_list_t *completed_msg_list = NULL;
-    axis2_char_t *within_transaction_str = NULL;
     axis2_char_t status = -1;
-    axis2_bool_t commit = AXIS2_TRUE;
     int i = 0, size = 0;
     
     AXIS2_ENV_CHECK(env, NULL);
@@ -1599,28 +1518,6 @@
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf); 
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env); 
     ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-    if(client_report_transaction)
-    {
-        report_transaction = client_report_transaction;
-        commit = AXIS2_FALSE;
-    }
-    else
-    {
-        property = axis2_ctx_get_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION);
-        if(property)
-            within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-                property, env);
-        if(within_transaction_str && 0 == axutil_strcmp(within_transaction_str, 
-            AXIS2_VALUE_TRUE))
-        {
-            within_transaction = AXIS2_TRUE;
-        }
-        if(!within_transaction)
-        {
-            report_transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, 
-                env);
-        }
-    }
     seq_report = sandesha2_seq_report_create(env);
     completed_msg_list = sandesha2_ack_mgr_get_svr_completed_msgs_list(env, 
         seq_id, seq_prop_mgr);
@@ -1642,8 +1539,6 @@
     status = sandesha2_client_get_svr_seq_status(env, seq_id, storage_mgr);
     sandesha2_seq_report_set_seq_status(seq_report, env, 
         status);
-    if(commit)
-        sandesha2_transaction_commit(report_transaction, env);
    
     return seq_report;
 }
@@ -1712,7 +1607,6 @@
         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);
@@ -1720,17 +1614,10 @@
         {
             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);
-            client_report_transaction = NULL;
-        }
         if(!seq_id_bean)
         {
             AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SEQ_ID_BEAN_NOT_SET, 
@@ -1967,9 +1854,6 @@
 {
     sandesha2_storage_mgr_t *storage_mgr = NULL;
     axis2_conf_t *conf = NULL;
-    axis2_char_t *within_transaction_str = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    sandesha2_transaction_t *transaction = NULL;
     axis2_ctx_t *ctx = NULL;
     axutil_property_t *property = NULL;
     axis2_options_t *options = NULL;
@@ -1991,20 +1875,6 @@
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
     ctx = axis2_conf_ctx_get_base(conf_ctx, env);
-    property = (axutil_property_t *) axis2_ctx_get_property(ctx, env, 
-        SANDESHA2_WITHIN_TRANSACTION);
-    if(property)
-        within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-            property, env);
-    if(within_transaction_str && 0 == axutil_strcmp(within_transaction_str, 
-        AXIS2_VALUE_TRUE))
-    {
-        within_transaction = AXIS2_TRUE;
-    }
-    if(AXIS2_TRUE != within_transaction)
-    {
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-    }
     response_envelope = sandesha2_storage_mgr_retrieve_response(storage_mgr, env, 
         client_seq_key, msg_no);
     if(response_envelope)
@@ -2013,8 +1883,6 @@
         result = axiom_soap_body_get_base_node(body, env);
     sandesha2_storage_mgr_remove_response(storage_mgr, env, client_seq_key, 
         msg_no);
-    sandesha2_transaction_commit(transaction, env);
-    client_report_transaction = NULL;
     return result;
 }
 

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=601656&r1=601655&r2=601656&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 Thu Dec  6 00:39:05 2007
@@ -25,7 +25,6 @@
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_seq.h>
 #include <sandesha2_msg_ctx.h>
-#include <sandesha2_transaction.h>
 #include <sandesha2_msg_processor.h>
 #include <sandesha2_msg_init.h>
 #include <sandesha2_constants.h>
@@ -101,8 +100,6 @@
     axis2_conf_t *conf = NULL;
     axis2_ctx_t *ctx = NULL;
     axiom_soap_envelope_t *soap_envelope = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    axis2_char_t *within_transaction_str = NULL;
     axiom_soap_fault_t *fault_part = NULL;
     axis2_char_t *reinjected_msg = AXIS2_FALSE;
     const axutil_string_t *str_soap_action = NULL;
@@ -113,10 +110,7 @@
     axis2_bool_t dropped = AXIS2_FALSE;
     axis2_bool_t isolated_last_msg = AXIS2_FALSE;
     sandesha2_storage_mgr_t *storage_mgr = NULL;
-    sandesha2_transaction_t *transaction = NULL;
     axutil_property_t *property = NULL;
-    axis2_bool_t rolled_back = AXIS2_FALSE;
-    AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  "[sandesha2]Start:sandesha2_global_in_handler");
    /* This handler needs to identify messages which follow the WSRM 1.0 
@@ -228,38 +222,11 @@
         return AXIS2_FAILURE;
     }
     property = axis2_ctx_get_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION);
-    if(property)
-        within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-            property, env);
-    if(within_transaction_str && 0 == axutil_strcmp(AXIS2_VALUE_TRUE, 
-        within_transaction_str))
-    {
-        within_transaction = AXIS2_TRUE;
-    }
-    if(!within_transaction)
-    {
-        axutil_property_t *prop = NULL;
-        
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-        prop = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-            AXIS2_FALSE, 0, AXIS2_VALUE_TRUE);
-        axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop);
-    }
     fault_part = axiom_soap_body_get_fault(axiom_soap_envelope_get_body(
                         soap_envelope, env), env);
     if(fault_part)
     {
         axis2_relates_to_t *relates_to = NULL;
-        if(!within_transaction)
-        {
-            axutil_property_t *prop = NULL;
-            sandesha2_transaction_rollback(transaction, env);
-            prop = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-                AXIS2_FALSE, 0, AXIS2_VALUE_FALSE);
-            axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop);
-            rolled_back = AXIS2_TRUE;
-            
-        }
         relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
         if(relates_to)
         {
@@ -294,16 +261,6 @@
             rm_msg_ctx, storage_mgr);
     if(dropped)
     {
-        if(!within_transaction)
-        {
-            axutil_property_t *prop = NULL;
-            sandesha2_transaction_rollback(transaction, env);
-            prop = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-                AXIS2_FALSE, 0, AXIS2_VALUE_FALSE);
-            axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-                prop);
-            rolled_back = AXIS2_TRUE;
-        }
         sandesha2_global_in_handler_process_dropped_msg(handler, env, rm_msg_ctx,
                         storage_mgr);
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
@@ -311,14 +268,6 @@
         return AXIS2_SUCCESS;
     }
     /*Process if global processing possible. - Currently none*/
-    if(!within_transaction && !rolled_back)
-    {
-        axutil_property_t *prop = NULL;
-        sandesha2_transaction_commit(transaction, env);
-        prop = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
-            AXIS2_FALSE, 0, AXIS2_VALUE_FALSE);
-        axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop);
-    }
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  "[sandesha2] Exit:sandesha2_global_in_handler");
        
     return AXIS2_SUCCESS;

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?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c Thu Dec  6 00:39:05 2007
@@ -22,7 +22,6 @@
 #include <axis2_conf_ctx.h>
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_msg_ctx.h>
-#include <sandesha2_transaction.h>
 #include <sandesha2_msg_processor.h>
 #include <sandesha2_ack_msg_processor.h>
 #include <sandesha2_ack_req_msg_processor.h>
@@ -81,12 +80,8 @@
     axis2_ctx_t *ctx = NULL;
     axis2_char_t *str_done = NULL;
     axis2_char_t *reinjected_msg = NULL;
-    axis2_char_t *within_transaction_str = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    axis2_bool_t rolled_back = AXIS2_FALSE;
     axis2_svc_t *svc = NULL;
     sandesha2_storage_mgr_t *storage_mgr = NULL;
-    sandesha2_transaction_t *transaction = NULL;
     sandesha2_msg_ctx_t *rm_msg_ctx = NULL;
     sandesha2_msg_processor_t *msg_processor = NULL;
     sandesha2_seq_ack_t *seq_ack = NULL;
@@ -129,37 +124,9 @@
     }
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
-    temp_prop = NULL;
-    temp_prop = axis2_ctx_get_property(ctx, env, 
-        SANDESHA2_WITHIN_TRANSACTION);
-    if(temp_prop)
-        within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-            temp_prop, env);
-    if(within_transaction_str && 0 == axutil_strcmp(AXIS2_VALUE_TRUE, 
-        within_transaction_str))
-    {
-        within_transaction = AXIS2_TRUE;
-    }
-    if(!within_transaction)
-    {
-        axutil_property_t *prop = NULL;
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-        prop = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
-        axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop);
-    }
     svc = axis2_msg_ctx_get_svc(msg_ctx, env);
     if(!svc)
     {
-        if(!within_transaction)
-        {
-            axutil_property_t *prop = NULL;
-            sandesha2_transaction_rollback(transaction, env);
-            prop = axutil_property_create_with_args(env, 0, 0, 0, 
-                AXIS2_VALUE_FALSE);
-            axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-                prop);
-            rolled_back = AXIS2_TRUE;
-        }
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
                 "[sandesha2] Axis2 Service is NULL");
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SVC_NULL, AXIS2_FAILURE);
@@ -171,27 +138,6 @@
     {
         /* Message should not be sent in an exception situation */
         axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);
-        if(!within_transaction)
-        {
-            axutil_property_t *prop = NULL;
-
-            sandesha2_transaction_rollback(transaction, env);
-            prop = axutil_property_create_with_args(env, 0, 0, 0, 
-                AXIS2_VALUE_FALSE);
-            axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-                    prop);
-            rolled_back = AXIS2_TRUE;
-            
-        }
-        if(!within_transaction && !rolled_back)
-        {
-            axutil_property_t *prop = NULL;
-            sandesha2_transaction_commit(transaction, env);
-            prop = axutil_property_create_with_args(env, 0, 0, 0, 
-                AXIS2_VALUE_FALSE);
-            axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-                prop);
-        }
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Cannot initialize the message");
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_INIT_MSG, 
@@ -223,15 +169,6 @@
     if(msg_processor)
     {
         sandesha2_msg_processor_process_in_msg(msg_processor, env, rm_msg_ctx);
-    }
-    if(!within_transaction && !rolled_back && transaction)
-    {
-        axutil_property_t *prop = NULL;
-        sandesha2_transaction_commit(transaction, env);
-        prop = axutil_property_create_with_args(env, 0, 0, 0, 
-            AXIS2_VALUE_FALSE);
-        axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-            prop);
     }
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2] Exit: sandesha2_in_handler_invoke");

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?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Thu Dec  6 00:39:05 2007
@@ -23,7 +23,6 @@
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_seq.h>
 #include <sandesha2_msg_ctx.h>
-#include <sandesha2_transaction.h>
 #include <sandesha2_msg_processor.h>
 #include <sandesha2_msg_init.h>
 #include <sandesha2_constants.h>
@@ -81,14 +80,10 @@
     axis2_conf_t *conf = NULL;
     axis2_char_t *str_done = NULL;
     axis2_char_t *dummy_msg_str = NULL;
-    axis2_char_t *within_transaction_str = NULL;
-    axis2_bool_t within_transaction = AXIS2_FALSE;
-    axis2_bool_t rolled_back = AXIS2_FALSE;
     axis2_bool_t dummy_msg = AXIS2_FALSE;
     axis2_svc_t *svc = NULL;
     axutil_qname_t *module_qname = NULL;
     sandesha2_storage_mgr_t *storage_mgr = NULL;
-    sandesha2_transaction_t *transaction = NULL;
     sandesha2_msg_ctx_t *rm_msg_ctx = NULL;
     sandesha2_msg_processor_t *msg_processor = NULL;
     int msg_type = -1;
@@ -173,24 +168,6 @@
         SANDESHA2_APPLICATION_PROCESSING_DONE, temp_prop);
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
-    temp_prop = axis2_msg_ctx_get_property(msg_ctx, env, 
-        SANDESHA2_WITHIN_TRANSACTION);
-    if(temp_prop)
-        within_transaction_str = (axis2_char_t *) axutil_property_get_value(
-            temp_prop, env);
-    if(within_transaction_str && 0 == axutil_strcmp(AXIS2_VALUE_TRUE, 
-        within_transaction_str))
-    {
-        within_transaction = AXIS2_TRUE;
-    }
-    if(!within_transaction)
-    {
-        axutil_property_t *prop = NULL;
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-        prop = axutil_property_create_with_args(env, 0, 0, 0, 
-            AXIS2_VALUE_TRUE);
-        axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop);
-    }
     /* Getting rm message */ 
     rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
     temp_prop = axis2_msg_ctx_get_property(msg_ctx, env, SANDESHA2_CLIENT_DUMMY_MESSAGE);
@@ -243,34 +220,11 @@
     {
         /* Message should not be sent in an exception situation */
         axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);
-        /* Rolling back the transaction */
-        if(!within_transaction)
-        {
-            axutil_property_t *prop = NULL;
-            sandesha2_transaction_rollback(transaction, env);
-            prop = axutil_property_create_with_args(env, 0, 0, 0, 
-                AXIS2_VALUE_FALSE);
-            axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-                prop);
-            rolled_back = AXIS2_TRUE;
-        }
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Error in processing the message");
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_PROCESS_MSG, 
                 AXIS2_FAILURE);
         return AXIS2_FAILURE;
-    }
-    if(!within_transaction && !rolled_back)
-    {
-        axutil_property_t *prop = NULL;
-        if (transaction)
-        {
-            sandesha2_transaction_commit(transaction, env);
-        }
-        prop = axutil_property_create_with_args(env, 0, 0, 0, 
-            AXIS2_VALUE_FALSE);
-        axis2_msg_ctx_set_property(msg_ctx, env, SANDESHA2_WITHIN_TRANSACTION, 
-            prop);
     }
     
     temp_prop = axis2_msg_ctx_get_property(msg_ctx, env, 

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?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Thu Dec  6 00:39:05 2007
@@ -581,7 +581,7 @@
     if(!rm_version)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "[sandesha2]Unable to find RM spec version");
+            "[sandesha2]Unable to find RM spec version for seq_id %s", str_seq_id);
         return AXIS2_FAILURE;
     }
     reply_to_epr = axis2_msg_ctx_get_reply_to(msg_ctx, env);
@@ -1217,11 +1217,6 @@
     }
     create_seq_msg = sandesha2_msg_ctx_get_msg_ctx(create_seq_rm_msg, env);
     axis2_msg_ctx_set_relates_to(create_seq_msg, env, NULL);
-    /* Set that the create sequence message is part of a transaction. */
-    property = axutil_property_create_with_args(env, 0, 0, 0, 
-        AXIS2_VALUE_TRUE);
-    axis2_msg_ctx_set_property(create_seq_msg, env, SANDESHA2_WITHIN_TRANSACTION, 
-        property);
     create_seq_bean = sandesha2_create_seq_bean_create_with_data(env, 
         internal_seq_id, (axis2_char_t*)axis2_msg_ctx_get_wsa_message_id(
         create_seq_msg, env), NULL);
@@ -1383,9 +1378,13 @@
     rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, storage_mgr);
     if(!rm_version)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "[sandesha2]Unable to find RM spec version");
-        return AXIS2_FAILURE;
+        rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, storage_mgr);
+        if(!rm_version)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]Unable to find "\
+                "RM spec version for the internal_seq_id %s", internal_seq_id);
+            return AXIS2_FAILURE;
+        }
     }
     rm_ns_val = sandesha2_spec_specific_consts_get_rm_ns_val(env, rm_version);
     

Modified: webservices/sandesha/trunk/c/src/polling/polling_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/polling/polling_mgr.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/polling/polling_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/polling/polling_mgr.c Thu Dec  6 00:39:05 2007
@@ -16,7 +16,6 @@
 #include <sandesha2_polling_mgr.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>
@@ -251,7 +250,6 @@
         int wait_time = 0;
         axis2_conf_t *conf = NULL;
         axis2_module_desc_t *module_desc = NULL;
-        sandesha2_transaction_t *transaction = NULL;
         axis2_status_t status = AXIS2_FAILURE;
 
         conf = axis2_conf_ctx_get_conf(polling_mgr->conf_ctx, env);
@@ -265,7 +263,6 @@
         }
         axutil_qname_free(qname, env);
         AXIS2_SLEEP(wait_time);
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
         next_msg_mgr = sandesha2_storage_mgr_get_next_msg_mgr(
                         storage_mgr, env);
          /* Getting the sequences to be polled. if schedule contains any requests, 
@@ -324,7 +321,6 @@
         {
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
                 "No valid MakeConnection entry is found.");
-            sandesha2_transaction_rollback(transaction, env);
             continue;
         }
         make_conn_seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) 
@@ -345,7 +341,6 @@
             ref_rm_msg_ctx, make_conn_seq_id, wsrm_anon_reply_to_uri, storage_mgr);
         if(!make_conn_rm_msg_ctx)
         {
-            sandesha2_transaction_rollback(transaction, env);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
@@ -410,12 +405,7 @@
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
                 "[sandesha2]make_connection sending failed");
-            sandesha2_transaction_rollback(transaction, env);
             return NULL;
-        }
-        if(transaction)
-        {
-            sandesha2_transaction_commit(transaction, env);
         }
     }
     return NULL;

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c Thu Dec  6 00:39:05 2007
@@ -614,7 +614,6 @@
         bean = (sandesha2_sender_bean_t *) axutil_array_list_get(match_list, 
             env, i);
         msg_type = sandesha2_sender_bean_get_msg_type(bean, env);
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]dam_msg_type:%d", msg_type);
         if(msg_type == SANDESHA2_MSG_TYPE_APPLICATION)
         {
             long msg_no = sandesha2_sender_bean_get_msg_no(bean, env);

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c Thu Dec  6 00:39:05 2007
@@ -40,12 +40,19 @@
     sandesha2_permanent_bean_mgr_t bean_mgr;
     sandesha2_storage_mgr_t *storage_mgr;
     axutil_thread_mutex_t *mutex;
+    axis2_conf_ctx_t *conf_ctx;
+    sqlite3 *dbconn;
 
 }sandesha2_permanent_bean_mgr_impl_t;
 
 #define SANDESHA2_INTF_TO_IMPL(bean_mgr) \
     ((sandesha2_permanent_bean_mgr_impl_t *) bean_mgr)
 
+static sqlite3 *
+sandesha2_permanent_bean_mgr_get_dbconn(
+    sandesha2_permanent_bean_mgr_t *bean_mgr,
+    const axutil_env_t *env);
+
 static int 
 sandesha2_permanent_bean_mgr_count_callback(
     void *not_used, 
@@ -205,6 +212,8 @@
     bean_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_bean_mgr_impl_t));
 
+    bean_mgr_impl->conf_ctx = conf_ctx;
+    bean_mgr_impl->dbconn = NULL;
     bean_mgr_impl->storage_mgr = storage_mgr;
     bean_mgr_impl->mutex = 
         sandesha2_permanent_storage_mgr_get_mutex(storage_mgr, env);
@@ -221,6 +230,11 @@
         "[sandesha2] Start:sandesha2_permanent_bean_mgr_free_impl");
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
 
+    if(bean_mgr_impl->dbconn)
+    {
+        sqlite3_close(bean_mgr_impl->dbconn);
+        bean_mgr_impl->dbconn = NULL;
+    }
     if(bean_mgr_impl)
     {
         AXIS2_FREE(env->allocator, bean_mgr_impl);
@@ -238,30 +252,28 @@
 {
     axis2_char_t *error_msg = NULL;
     int rc = -1;
-    sqlite3 *dbconn = NULL;
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
    
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(
+            bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
     }
-    rc = sqlite3_exec(dbconn, sql_stmt_insert, 0, 0, &error_msg);
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_insert, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_insert, 
-            0, 0, &error_msg, rc, bean_mgr_impl->mutex);
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, 
+            sql_stmt_insert, 0, 0, &error_msg, rc, bean_mgr_impl->mutex);
     if( rc != SQLITE_OK )
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql stmt: %s. sql error: %s", 
             sql_stmt_insert, error_msg);
-        printf("sql_stmt_insert:%s\n", sql_stmt_insert);
-        printf("insert error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -278,22 +290,21 @@
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     sandesha2_bean_mgr_args_t *args = NULL;
     axis2_char_t *error_msg = NULL;
-    sqlite3 *dbconn = NULL;
     int rc = -1;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
     }
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_bean_mgr_args_t));
     args->env = env;
-    rc = sqlite3_exec(dbconn, sql_stmt_remove, 0, 0, &error_msg);
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_remove, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_remove, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_remove, 
             0, 0, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -301,8 +312,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql stmt: %s. sql error: %s",
             sql_stmt_remove, error_msg);
-        printf("sql_stmt_remove:%s\n", sql_stmt_remove);
-        printf("remove error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -321,13 +330,16 @@
     sandesha2_bean_mgr_args_t *args = NULL;
     axis2_char_t *error_msg = NULL;
     sandesha2_rm_bean_t *bean = NULL;
-    sqlite3 *dbconn = NULL;
     int rc = -1;
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Entry:sandesha2_permanent_bean_mgr_retrieve");
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+    {
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    }
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return NULL;
@@ -335,19 +347,19 @@
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_bean_mgr_args_t));
     args->env = (axutil_env_t*)env;
     args->data = NULL;
-    rc = sqlite3_exec(dbconn, sql_stmt_retrieve, retrieve_func, args, 
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_retrieve, retrieve_func, args, 
         &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_retrieve, 
+    {
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_retrieve, 
             retrieve_func, args, &error_msg, rc, bean_mgr_impl->mutex);
+    }
     if(rc != SQLITE_OK )
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql stmt: %s. sql error: %s",
             sql_stmt_retrieve, error_msg);
-        printf("sql_stmt_retrieve:%s\n", sql_stmt_retrieve);
-        printf("retrieve error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -356,6 +368,8 @@
     if(args)
         AXIS2_FREE(env->allocator, args);
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Exit:sandesha2_permanent_bean_mgr_retrieve");
     return bean;
 }
 
@@ -366,22 +380,21 @@
     axis2_char_t *sql_stmt_update)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
-    sqlite3 *dbconn = NULL;
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
     }
 
-    rc = sqlite3_exec(dbconn, sql_stmt_update, 0, 0, &error_msg);
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_update, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_update, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_update, 
             0, 0, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -389,8 +402,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", 
             error_msg);
-        printf("sql_stmt_update:%s\n", sql_stmt_update);
-        printf("update error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -410,7 +421,6 @@
     sandesha2_bean_mgr_args_t *args = NULL;
     axutil_array_list_t *beans = NULL;
     int i = 0, size = 0, rc = -1;
-    sqlite3 *dbconn = NULL;
     axutil_array_list_t *data_array = NULL;
     axis2_char_t *error_msg = NULL;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
@@ -424,17 +434,17 @@
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_bean_mgr_args_t));
     args->env = (axutil_env_t*)env;
     args->data = NULL;
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return NULL;
     }
-    rc = sqlite3_exec(dbconn, sql_stmt_find, find_func, args, 
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_find, find_func, args, 
         &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_find, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_find, 
             find_func, args, &error_msg, rc, bean_mgr_impl->mutex);
     if(args->data)
         data_array = (axutil_array_list_t *) args->data;
@@ -448,8 +458,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", 
             error_msg);
-        printf("sql_stmt_find:%s\n", sql_stmt_find);
-        printf("retrieve error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return NULL;
     }
@@ -519,13 +527,12 @@
     axis2_char_t *error_msg = NULL;
     sandesha2_msg_store_bean_t *msg_store_bean = NULL;
     int rc = -1;
-    sqlite3 *dbconn = NULL;
     axis2_char_t sql_stmt_retrieve[512];
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return NULL;
@@ -538,10 +545,10 @@
         "transport_to, execution_chain_str, flow, msg_recv_str, svr_side, "\
         "in_msg_store_key, prop_str, action from msg where stored_key='%s'", 
         key);
-    rc = sqlite3_exec(dbconn, sql_stmt_retrieve, 
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_retrieve, 
         sandesha2_msg_store_bean_retrieve_callback, args, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_retrieve, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_retrieve, 
             sandesha2_msg_store_bean_retrieve_callback, args, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -549,8 +556,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
             error_msg);
-        printf("sql_stmt_retrieve:%s\n", sql_stmt_retrieve);
-        printf("retrieve error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -575,7 +580,6 @@
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     int sql_size = -1;
-    sqlite3 *dbconn = NULL;
     sandesha2_bean_mgr_args_t *args = NULL;
     sandesha2_msg_store_bean_t *msg_store_bean = NULL;
 	axis2_char_t *msg_id = NULL;
@@ -631,9 +635,9 @@
         axutil_strlen(prop_str) + axutil_strlen(action) + 512;
 
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
@@ -647,10 +651,10 @@
         "transport_to, execution_chain_str, flow, msg_recv_str, svr_side, "\
         "in_msg_store_key, prop_str, action from msg where stored_key = '%s'", 
         key);
-    rc = sqlite3_exec(dbconn, sql_stmt_retrieve,
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_retrieve,
         sandesha2_msg_store_bean_retrieve_callback, args, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_retrieve, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_retrieve, 
             sandesha2_msg_store_bean_retrieve_callback, args, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -658,8 +662,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
             error_msg);
-        printf("sql_stmt_retrieve:%s\n", sql_stmt_retrieve);
-        printf("retrieve error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -679,9 +681,9 @@
             soap_env_str, soap_version, transport_out, op, svc, svc_grp, op_mep, 
             to_url, transport_to, reply_to, execution_chain_str, flow, 
             msg_recv_str, svr_side, in_msg_store_key, prop_str, action, key);
-        rc = sqlite3_exec(dbconn, sql_stmt_update, 0, 0, &error_msg);
+        rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_update, 0, 0, &error_msg);
         if(rc == SQLITE_BUSY)
-            rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_update, 
+            rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_update, 
                 0, 0, &error_msg, rc, bean_mgr_impl->mutex);
         if( rc != SQLITE_OK )
         {
@@ -690,8 +692,6 @@
                 AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", 
                 error_msg);
-            printf("sql_stmt_update:%s\n", sql_stmt_update);
-            printf("update error_msg:%s\n", error_msg);
             AXIS2_FREE(env->allocator, sql_stmt_update);
             sqlite3_free(error_msg);
             return AXIS2_FALSE;
@@ -710,17 +710,15 @@
         soap_env_str, soap_version, transport_out, op, svc, svc_grp, op_mep, 
         to_url, reply_to, transport_to, execution_chain_str, flow, msg_recv_str, 
         svr_side, in_msg_store_key, prop_str, action);
-    rc = sqlite3_exec(dbconn, sql_stmt_insert, 0, 0, &error_msg);
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_insert, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_insert, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_insert, 
             0, 0, &error_msg, rc, bean_mgr_impl->mutex);
     if( rc != SQLITE_OK )
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", error_msg);
-        printf("sql_stmt_insert:%s\n", sql_stmt_insert);
-        printf("insert error_msg:%s\n", error_msg);
         AXIS2_FREE(env->allocator, sql_stmt_insert);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
@@ -742,22 +740,21 @@
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     axis2_char_t *error_msg = NULL;
     int rc = -1;
-    sqlite3 *dbconn = NULL;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Entry:sandesha2_permanent_bean_mgr_remove_msg_store_bean");
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
     }
     sprintf(sql_stmt_remove, "delete from msg where stored_key='%s'", key);
-    rc = sqlite3_exec(dbconn, sql_stmt_remove, 0, 0, &error_msg);
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_remove, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_remove, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_remove, 
             0, 0, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -765,8 +762,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
             error_msg);
-        printf("sql_stmt_remove:%s\n", sql_stmt_remove);
-        printf("remove error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -791,7 +786,6 @@
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     int sql_size = -1;
-    sqlite3 *dbconn = NULL;
 	sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     int count = -1;
 
@@ -804,17 +798,17 @@
         " from response where seq_id = '%s' and msg_no=%d", seq_id, msg_no);
 
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
     }
-    rc = sqlite3_exec(dbconn, sql_stmt_count, 
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_count, 
         sandesha2_permanent_bean_mgr_count_callback, &count, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_count, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_count, 
             sandesha2_permanent_bean_mgr_count_callback, &count, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -822,8 +816,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", 
             error_msg);
-        printf("sql_stmt_count:%s\n", sql_stmt_count);
-        printf("retrieve error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -833,9 +825,9 @@
         sprintf(sql_stmt_update, "update response set response_str='%s',"\
             "soap_version=%d where seq_id='%s' and msg_no=%d", response, 
             soap_version, seq_id, msg_no);
-        rc = sqlite3_exec(dbconn, sql_stmt_update, 0, 0, &error_msg);
+        rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_update, 0, 0, &error_msg);
         if(rc == SQLITE_BUSY)
-            rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_update, 
+            rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_update, 
                 0, 0, &error_msg, rc, bean_mgr_impl->mutex);
         if( rc != SQLITE_OK )
         {
@@ -844,8 +836,6 @@
                 AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", 
                 error_msg);
-            printf("sql_stmt_update:%s\n", sql_stmt_update);
-            printf("update error_msg:%s\n", error_msg);
             AXIS2_FREE(env->allocator, sql_stmt_update);
             sqlite3_free(error_msg);
             return AXIS2_FALSE;
@@ -860,17 +850,15 @@
         sprintf(sql_stmt_insert, "insert into response(seq_id, response_str,"\
             "msg_no, soap_version) values('%s', '%s', %d, %d)", seq_id, 
             response, msg_no, soap_version);
-        rc = sqlite3_exec(dbconn, sql_stmt_insert, 0, 0, &error_msg);
+        rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_insert, 0, 0, &error_msg);
         if(rc == SQLITE_BUSY)
-            rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_insert, 
+            rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_insert, 
                 0, 0, &error_msg, rc, bean_mgr_impl->mutex);
         if( rc != SQLITE_OK )
         {
             axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
             AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", error_msg);
-            printf("sql_stmt_insert:%s\n", sql_stmt_insert);
-            printf("insert error_msg:%s\n", error_msg);
             AXIS2_FREE(env->allocator, sql_stmt_insert);
             sqlite3_free(error_msg);
             return AXIS2_FALSE;
@@ -894,23 +882,22 @@
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     axis2_char_t *error_msg = NULL;
     int rc = -1;
-    sqlite3 *dbconn = NULL;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Entry:sandesha2_permanent_bean_mgr_remove_response");
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return AXIS2_FALSE;
     }
     sprintf(sql_stmt_remove, 
         "delete from response where seq_id='%s' and msg_no=%d", seq_id, msg_no);
-    rc = sqlite3_exec(dbconn, sql_stmt_remove, 0, 0, &error_msg);
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_remove, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_remove, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_remove, 
             0, 0, &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
     {
@@ -918,8 +905,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
             error_msg);
-        printf("sql_stmt_remove:%s\n", sql_stmt_remove);
-        printf("remove error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -940,13 +925,12 @@
     sandesha2_bean_mgr_args_t *args = NULL;
     axis2_char_t *error_msg = NULL;
     int rc = -1;
-    sqlite3 *dbconn = NULL;
     axis2_char_t sql_stmt_retrieve[512];
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
-        bean_mgr_impl->storage_mgr, env);
-    if(!dbconn)
+    if(!bean_mgr_impl->dbconn)
+        bean_mgr_impl->dbconn = sandesha2_permanent_bean_mgr_get_dbconn(bean_mgr, env);
+    if(!bean_mgr_impl->dbconn)
     {
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
         return NULL;
@@ -956,10 +940,10 @@
     args->data = NULL;
     sprintf(sql_stmt_retrieve, "select response_str, soap_version from response"\
         " where seq_id='%s' and msg_no=%d", seq_id, msg_no);
-    rc = sqlite3_exec(dbconn, sql_stmt_retrieve, 
+    rc = sqlite3_exec(bean_mgr_impl->dbconn, sql_stmt_retrieve, 
         sandesha2_permanent_bean_mgr_response_retrieve_callback, args, &error_msg);
     if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_retrieve, 
+        rc = sandesha2_permanent_bean_mgr_busy_handler(bean_mgr_impl->dbconn, sql_stmt_retrieve, 
             sandesha2_permanent_bean_mgr_response_retrieve_callback, args, 
             &error_msg, rc, bean_mgr_impl->mutex);
     if(rc != SQLITE_OK )
@@ -968,8 +952,6 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
             error_msg);
-        printf("sql_stmt_retrieve:%s\n", sql_stmt_retrieve);
-        printf("retrieve error_msg:%s\n", error_msg);
         sqlite3_free(error_msg);
         return AXIS2_FALSE;
     }
@@ -990,8 +972,6 @@
     int counter = 0;
     while(rc == SQLITE_BUSY && counter < 10)
     {
-        printf("in busy handler %s\n", *error_msg);
-        printf("sql: %s\n", sql_stmt);
         if(*error_msg)
              sqlite3_free(*error_msg);
         counter++;
@@ -1006,5 +986,51 @@
     return rc;
 }
 
-
+static sqlite3 *
+sandesha2_permanent_bean_mgr_get_dbconn(
+    sandesha2_permanent_bean_mgr_t *bean_mgr,
+    const axutil_env_t *env)
+{
+    axis2_conf_t *conf = NULL;
+    axis2_module_desc_t *module_desc = NULL;
+    axutil_qname_t *qname = NULL;
+    axis2_char_t *path = ".";
+    axis2_char_t *dbname = NULL;
+    int rc = -1;
+    sqlite3 *dbconn = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
+    bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
+    conf_ctx = bean_mgr_impl->conf_ctx;
+    if(conf_ctx)
+        conf = axis2_conf_ctx_get_conf((const axis2_conf_ctx_t *) conf_ctx, env);
+    else
+    {
+        return NULL;
+    }
+    qname = axutil_qname_create(env, SANDESHA2_MODULE, NULL, NULL);
+    module_desc = axis2_conf_get_module(conf, env, qname);
+    if(module_desc)
+    {
+        axutil_param_t *dbparam = NULL;
+        dbparam = axis2_module_desc_get_param(module_desc, env, SANDESHA2_DB);
+        if(dbparam)
+        {
+            path = (axis2_char_t *) axutil_param_get_value(dbparam, env);
+        }
+    }
+    axutil_qname_free(qname, env);
+    dbname = axutil_strcat(env, path, AXIS2_PATH_SEP_STR, SANDESHA2_DB, NULL);
+    rc = sqlite3_open(dbname, &(dbconn));
+    if(rc != SQLITE_OK)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Can't open database: %s"
+            " sqlite error: %s\n", dbname, sqlite3_errmsg(dbconn));
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_OPEN_DATABASE, 
+            AXIS2_FAILURE);
+        sqlite3_close(dbconn);
+        return NULL;
+    }
+    return dbconn;
+}
 

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_sender_mgr.c Thu Dec  6 00:39:05 2007
@@ -619,7 +619,6 @@
         bean = (sandesha2_sender_bean_t *) axutil_array_list_get(match_list, 
             env, i);
         msg_type = sandesha2_sender_bean_get_msg_type(bean, env);
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_msg_type:%d", msg_type);
         if(msg_type == SANDESHA2_MSG_TYPE_APPLICATION)
         {
             long msg_no = sandesha2_sender_bean_get_msg_no(bean, env);

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Thu Dec  6 00:39:05 2007
@@ -70,7 +70,7 @@
     sandesha2_invoker_mgr_t *invoker_mgr;
     axis2_conf_ctx_t *conf_ctx;
     axis2_char_t *db_name;
-    axutil_hash_t *transactions;
+    axutil_array_list_t *transactions;
     sandesha2_permanent_bean_mgr_t *bean_mgr;
     axutil_hash_t *msg_ctx_map;
     axutil_thread_mutex_t *mutex;
@@ -276,7 +276,7 @@
         "Sandesha2MessageMap");
     storage_mgr_impl->conf_ctx = conf_ctx;
     axutil_allocator_switch_to_global_pool(env->allocator);
-    storage_mgr_impl->transactions = axutil_hash_make(env);
+    storage_mgr_impl->transactions = axutil_array_list_create(env, 0);
     axutil_allocator_switch_to_local_pool(env->allocator);
     storage_mgr_impl->bean_mgr = NULL;
     storage_mgr_impl->mutex = axutil_thread_mutex_create(env->allocator,
@@ -325,7 +325,7 @@
 
     if(storage_mgr_impl->transactions)
     {
-        axutil_hash_free(storage_mgr_impl->transactions, env);
+        axutil_array_list_free(storage_mgr_impl->transactions, env);
     }
     if(storage_mgr_impl->create_seq_mgr)
     {
@@ -379,32 +379,21 @@
 {
 	sandesha2_transaction_t *transaction = NULL;
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
-    unsigned long int thread_id;
-    axis2_char_t *thread_id_key = NULL;
 
 	storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
-	thread_id = (unsigned long int ) axis2_os_thread_current();
-
 
     axutil_thread_mutex_lock(storage_mgr_impl->mutex);
     axutil_allocator_switch_to_global_pool(env->allocator);
-    thread_id_key = AXIS2_MALLOC(env->allocator, sizeof(char)*128);
-    sprintf(thread_id_key, "%lu", thread_id); 
-    transaction = (sandesha2_transaction_t *) axutil_hash_get(
-        storage_mgr_impl->transactions, thread_id_key, AXIS2_HASH_KEY_STRING);
-    while(transaction && sandesha2_permanent_transaction_is_active(transaction, env))
-    {
-        AXIS2_SLEEP(1);
-    }
+    transaction = (sandesha2_transaction_t *) axutil_array_list_get(
+        storage_mgr_impl->transactions, env, 0);
     
     if(!transaction)
     {
         axutil_thread_mutex_unlock(storage_mgr_impl->mutex);
         transaction = 
-            sandesha2_permanent_transaction_create(env, storage_mgr, thread_id);
+            sandesha2_permanent_transaction_create(env, storage_mgr, 0);
         axutil_thread_mutex_lock(storage_mgr_impl->mutex);
-        axutil_hash_set(storage_mgr_impl->transactions, thread_id_key, 
-            AXIS2_HASH_KEY_STRING, transaction);
+        axutil_array_list_add(storage_mgr_impl->transactions, env, transaction);
     }
     axutil_allocator_switch_to_local_pool(env->allocator);
     axutil_thread_mutex_unlock(storage_mgr_impl->mutex);
@@ -418,16 +407,10 @@
     sandesha2_transaction_t *transaction)
 {
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
-    unsigned long int thread_id = -1;
-    axis2_char_t *thread_id_key = AXIS2_MALLOC(env->allocator, 128);
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
 
-    thread_id = (unsigned long int) sandesha2_permanent_transaction_get_thread_id(
-        transaction, env);
-    sprintf(thread_id_key, "%lu", thread_id); 
     axutil_allocator_switch_to_global_pool(env->allocator);
-    axutil_hash_set(storage_mgr_impl->transactions, thread_id_key, 
-        AXIS2_HASH_KEY_STRING, NULL);
+    axutil_array_list_remove(storage_mgr_impl->transactions, env, 0);
     axutil_allocator_switch_to_local_pool(env->allocator);
 }
 
@@ -850,7 +833,6 @@
         axiom_soap_builder_free(soap_builder, env);
         return NULL;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_soap_envelope:%s", soap_env_str);
     axis2_msg_ctx_set_soap_envelope(msg_ctx, env, soap_envelope);
     axis2_msg_ctx_set_msg_id(msg_ctx, env, sandesha2_msg_store_bean_get_msg_id(
         msg_store_bean, env));
@@ -1142,14 +1124,11 @@
 {
     sqlite3* dbconn = NULL;
     sandesha2_transaction_t *transaction = NULL;
-    unsigned long int thread_id = (unsigned long int) axis2_os_thread_current();
-    axis2_char_t thread_id_key[128];
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
-    sprintf(thread_id_key, "%lu", thread_id);
     axutil_allocator_switch_to_global_pool(env->allocator);
-    transaction = (sandesha2_transaction_t *) axutil_hash_get(
-        storage_mgr_impl->transactions, thread_id_key, AXIS2_HASH_KEY_STRING);
+    transaction = (sandesha2_transaction_t *) axutil_array_list_get(
+        storage_mgr_impl->transactions, env, 0);
     axutil_allocator_switch_to_local_pool(env->allocator);
     if(transaction)
     {
@@ -1277,7 +1256,7 @@
     axis2_conf_ctx_t *conf_ctx)
 {
     axis2_conf_t *conf = NULL;
-    axis2_char_t *path = "./";
+    axis2_char_t *path = ".";
     int rc = -1;
     sqlite3 *dbconn = NULL;
     axis2_char_t *db_name = NULL;

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c Thu Dec  6 00:39:05 2007
@@ -95,17 +95,16 @@
     unsigned long int thread_id)
 {
     sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
-    /*axis2_char_t *error_msg = NULL;*/
-    axis2_char_t *path = "./";
+    /*axis2_char_t *path = "./";
     axis2_char_t *db_name = NULL;
     int rc = -1;
     axis2_conf_ctx_t *conf_ctx = NULL;
-    axis2_conf_t *conf = NULL;
+    axis2_conf_t *conf = NULL;*/
 
     trans_impl =  (sandesha2_permanent_transaction_impl_t *)AXIS2_MALLOC 
         (env->allocator, sizeof(sandesha2_permanent_transaction_impl_t));
 
-    trans_impl->mutex = sandesha2_permanent_storage_mgr_get_mutex(storage_mgr, env);
+    /*trans_impl->mutex = sandesha2_permanent_storage_mgr_get_mutex(storage_mgr, env);
     trans_impl->storage_mgr = storage_mgr;
     trans_impl->thread_id = thread_id;
     trans_impl->dbconn = NULL;
@@ -147,25 +146,9 @@
         return NULL;
     }
     axutil_thread_mutex_lock(trans_impl->mutex);
-    /*rc = sqlite3_exec(trans_impl->dbconn, "BEGIN DEFERRED TRANSACTION;", 0, 0,
-        &error_msg);
-    if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn, 
-            "BEGIN DEFERRED TRANSACTION;", 0, 0, &error_msg, rc, trans_impl->mutex);
-    if(rc != SQLITE_OK )
-    {
-        axutil_thread_mutex_unlock(trans_impl->mutex);
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "SQL Error %s",
-            error_msg);
-        printf("transaction begin error_msg:%s\n", error_msg);
-        sqlite3_free(error_msg);
-        sandesha2_transaction_free(&(trans_impl->trans), env);
-        return NULL;
-    }*/
 
     axutil_thread_mutex_unlock(trans_impl->mutex);
-    trans_impl->is_active = AXIS2_TRUE;
+    trans_impl->is_active = AXIS2_TRUE;*/
     return &(trans_impl->trans);
 }
 
@@ -179,11 +162,6 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     trans_impl = SANDESHA2_INTF_TO_IMPL(trans);
 
-    if(trans_impl->enlisted_beans)
-    {
-        axutil_array_list_free(trans_impl->enlisted_beans, env);
-        trans_impl->enlisted_beans = NULL;
-    }
     if(trans_impl)
     {
         AXIS2_FREE(env->allocator, trans_impl);
@@ -228,31 +206,14 @@
     sandesha2_transaction_t *trans,
     const axutil_env_t *env)
 {
-    /*axis2_char_t *error_msg = NULL;
-    int rc = -1;*/
-    sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
+    /*sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
     trans_impl = SANDESHA2_INTF_TO_IMPL(trans);
    
     axutil_thread_mutex_lock(trans_impl->mutex);
-    /*rc = sqlite3_exec(trans_impl->dbconn, "COMMIT TRANSACTION;", 0, 0, &error_msg);
-    if(rc == SQLITE_BUSY)
-    {
-        rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn, 
-            "COMMIT TRANSACTION", 0, 0, &error_msg, rc, trans_impl->mutex);
-    }
-    if(rc != SQLITE_OK )
-    {
-        axutil_thread_mutex_unlock(trans_impl->mutex);
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
-            error_msg);
-        printf("commit error_msg:%s\n", error_msg);
-        sqlite3_free(error_msg);
-    }*/
     sqlite3_close(trans_impl->dbconn);
     trans_impl->is_active = AXIS2_FALSE;
     sandesha2_permanent_transaction_release_locks(trans, env);
-    axutil_thread_mutex_unlock(trans_impl->mutex);
+    axutil_thread_mutex_unlock(trans_impl->mutex);*/
 }
 
 void AXIS2_CALL
@@ -260,30 +221,13 @@
     sandesha2_transaction_t *trans,
     const axutil_env_t *env)
 {
-    /*axis2_char_t *error_msg = NULL;
-    int rc = -1;*/
-    sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
+    /*sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
     trans_impl = SANDESHA2_INTF_TO_IMPL(trans);
     axutil_thread_mutex_lock(trans_impl->mutex);
-    /*rc = sqlite3_exec(trans_impl->dbconn, "ROLLBACK TRANSACTION;", 0, 0,
-        &error_msg);
-    if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn, 
-            "ROLLBACK TRANSACTION", 0, 0, &error_msg, rc, trans_impl->mutex);
-    if(rc != SQLITE_OK )
-    {
-        axutil_thread_mutex_unlock(trans_impl->mutex);
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s",
-            error_msg);
-        printf("sql_stmt_rollback:%s\n", "ROLLBACK TRANSACTION;");
-        printf("rollback error_msg:%s\n", error_msg);
-        sqlite3_free(error_msg);
-    }*/
     sqlite3_close(trans_impl->dbconn);
     trans_impl->is_active = AXIS2_FALSE;
     sandesha2_permanent_transaction_release_locks(trans, env);
-    axutil_thread_mutex_unlock(trans_impl->mutex);
+    axutil_thread_mutex_unlock(trans_impl->mutex);*/
 }
 
 void AXIS2_CALL
@@ -292,12 +236,12 @@
     const axutil_env_t *env)
 {
     sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
-    int i = 0, size = 0;
+    /*int i = 0, size = 0;*/
     trans_impl = SANDESHA2_INTF_TO_IMPL(trans);
     
 	sandesha2_permanent_storage_mgr_remove_transaction(trans_impl->storage_mgr, 
         env, trans);
-    if(trans_impl->enlisted_beans)
+    /*if(trans_impl->enlisted_beans)
         size = axutil_array_list_size(trans_impl->enlisted_beans, env);
     for(i = 0; i < size; i++)
     {
@@ -306,7 +250,7 @@
             axutil_array_list_get(trans_impl->enlisted_beans, env, i);
         rm_bean_l = sandesha2_rm_bean_get_base(rm_bean, env);
         sandesha2_rm_bean_set_transaction(rm_bean_l, env, NULL);
-    }
+    }*/
     /*axutil_array_list_free(trans_impl->enlisted_beans, env);
     trans_impl->enlisted_beans = NULL;*/
 }

Modified: webservices/sandesha/trunk/c/src/util/msg_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_creator.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_creator.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_creator.c Thu Dec  6 00:39:05 2007
@@ -805,7 +805,6 @@
                     }
                     if(0 == axutil_strcmp(AXIS2_HTTP_CLIENT, key))
                     {
-                        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_axis2_http_client");
                         axutil_property_set_own_value(new_prop, env, AXIS2_FALSE);
                     }
                     axutil_hash_set(new_msg_props, key, AXIS2_HASH_KEY_STRING, new_prop);

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?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Thu Dec  6 00:39:05 2007
@@ -148,10 +148,16 @@
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
         storage_mgr, env);
     if(seq_prop_mgr)
+    {
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came20");
         rm_version_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, 
             env, key, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
+    }
     if(!rm_version_bean)
+    {
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came21");
         return NULL;
+    }
     return sandesha2_seq_property_bean_get_value(rm_version_bean, env);
 }
 

Modified: webservices/sandesha/trunk/c/src/workers/sender.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender.c?rev=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender.c Thu Dec  6 00:39:05 2007
@@ -17,7 +17,6 @@
 #include <sandesha2_ack_mgr.h>
 #include <sandesha2_constants.h>
 #include <sandesha2_utils.h>
-#include <sandesha2_transaction.h>
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_seq_property_bean.h>
 #include <sandesha2_seq_property_mgr.h>
@@ -259,25 +258,21 @@
     seq_id = sender->seq_id;
     while(sender->run_sender)
     {
-        sandesha2_transaction_t *transaction = NULL;
         sandesha2_sender_mgr_t *mgr = NULL;
         sandesha2_sender_bean_t *sender_bean = NULL;
         axis2_char_t *msg_id = NULL;
 
-        transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
         seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
             storage_mgr, env);
         mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
         sender_bean = sandesha2_sender_mgr_get_next_msg_to_send(mgr, env, seq_id);
         if(!sender_bean)
         {
-            sandesha2_transaction_commit(transaction, env);
             AXIS2_USLEEP(100000);
             continue;
         }
         msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
             sender_bean, env);
-        sandesha2_transaction_commit(transaction, env);
         if(msg_id)
         {
             axis2_bool_t status = AXIS2_TRUE;

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=601656&r1=601655&r2=601656&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Thu Dec  6 00:39:05 2007
@@ -17,7 +17,6 @@
 #include <sandesha2_ack_mgr.h>
 #include <sandesha2_constants.h>
 #include <sandesha2_utils.h>
-#include <sandesha2_transaction.h>
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_sender_mgr.h>
 #include <sandesha2_seq_property_bean.h>
@@ -249,7 +248,6 @@
     sandesha2_sender_worker_args_t *args;
     axutil_env_t *env = NULL;
     sandesha2_storage_mgr_t *storage_mgr = NULL;
-    sandesha2_transaction_t *transaction = NULL;
     sandesha2_sender_bean_t *sender_worker_bean = NULL;
     sandesha2_sender_bean_t *bean1 = NULL;
     sandesha2_sender_mgr_t *sender_mgr = NULL;
@@ -280,14 +278,12 @@
     storage_mgr = sandesha2_utils_get_storage_mgr(env, 
         sender_worker->conf_ctx, 
         axis2_conf_ctx_get_conf(sender_worker->conf_ctx, env));
-    transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
     sender_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
     sender_worker_bean = sandesha2_sender_mgr_retrieve(sender_mgr, env, msg_id);
     if(!sender_worker_bean)
     {
         AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, 
             "[sandesha2] sender_worker_bean is NULL");
-        sandesha2_transaction_rollback(transaction, env);
         #ifdef AXIS2_SVR_MULTI_THREADED
             AXIS2_THREAD_POOL_EXIT_THREAD(env->thread_pool, thd);
         #endif
@@ -312,7 +308,6 @@
     }
     if(!msg_ctx)
     {
-        sandesha2_transaction_rollback(transaction, env);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] msg_ctx is "\
             "not present in the store");
         #ifdef AXIS2_SVR_MULTI_THREADED
@@ -337,9 +332,6 @@
     if(!continue_sending)
     {
         sender_worker->status = AXIS2_FAILURE;
-        /* We commit here since we have cleaned the
-         * sending side data and that need to commited */
-        sandesha2_transaction_commit(transaction, env);
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Do not continue sending the message");
         #ifdef AXIS2_SVR_MULTI_THREADED
@@ -355,7 +347,6 @@
     if(qualified_for_sending && 0 != axutil_strcmp(
         qualified_for_sending, AXIS2_VALUE_TRUE))
     {
-        sandesha2_transaction_rollback(transaction, env);
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Message is not qualified for sending");
         #ifdef AXIS2_SVR_MULTI_THREADED
@@ -389,7 +380,6 @@
         }
         if(continue_sending)
         {
-            sandesha2_transaction_rollback(transaction, env);
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Continue "\
                 "Sending is true. So returning from Sender Worker");
             #ifdef AXIS2_SVR_MULTI_THREADED
@@ -429,7 +419,6 @@
     transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
     if(transport_sender)
     {
-        sandesha2_transaction_commit(transaction, env);
         property = axis2_msg_ctx_get_property(msg_ctx, env, 
             SANDESHA2_WITHIN_TRANSACTION);
         if(property)
@@ -452,7 +441,6 @@
         	successfully_sent = AXIS2_FALSE;
 		}
     }
-    transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
     property = axis2_msg_ctx_get_property(msg_ctx, env, 
         SANDESHA2_WITHIN_TRANSACTION); 
     if(property)
@@ -532,11 +520,6 @@
         axis2_msg_ctx_set_property(msg_ctx, env, 
                     SANDESHA2_WITHIN_TRANSACTION, property);
     }
-    /* TODO make transaction handling effective */
-    if(transaction)
-    {
-        sandesha2_transaction_commit(transaction, env);
-    }
     #ifdef AXIS2_SVR_MULTI_THREADED
         AXIS2_THREAD_POOL_EXIT_THREAD(env->thread_pool, thd);
     #endif
@@ -555,7 +538,6 @@
 {
     sandesha2_sender_worker_t *sender_worker = NULL;
     sandesha2_storage_mgr_t *storage_mgr = NULL;
-    sandesha2_transaction_t *transaction = NULL;
     sandesha2_sender_bean_t *sender_worker_bean = NULL;
     sandesha2_sender_bean_t *bean1 = NULL;
     sandesha2_sender_mgr_t *sender_mgr = NULL;
@@ -578,14 +560,12 @@
     
     storage_mgr = sandesha2_utils_get_storage_mgr(env, 
         conf_ctx, axis2_conf_ctx_get_conf(conf_ctx, env));
-    transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
     sender_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
     sender_worker_bean = sandesha2_sender_mgr_retrieve(sender_mgr, env, msg_id);
     if(!sender_worker_bean)
     {
         AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, 
             "[sandesha2] sender_worker_bean is NULL");
-        sandesha2_transaction_rollback(transaction, env);
         return AXIS2_FAILURE;
     }
 
@@ -607,7 +587,6 @@
     }
     if(!msg_ctx)
     {
-        sandesha2_transaction_rollback(transaction, env);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] msg_ctx is "\
             "not present in the store");
         return AXIS2_FAILURE;
@@ -629,9 +608,6 @@
     if(!continue_sending)
     {
         status = AXIS2_FAILURE;
-        /* We commit here since we have cleaned the
-         * sending side data and that need to commited */
-        sandesha2_transaction_commit(transaction, env);
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Do not continue sending the message");
         return status;
@@ -644,7 +620,6 @@
     if(qualified_for_sending && 0 != axutil_strcmp(
         qualified_for_sending, AXIS2_VALUE_TRUE))
     {
-        sandesha2_transaction_rollback(transaction, env);
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
             "[sandesha2] Message is not qualified for sending");
         return AXIS2_FAILURE;
@@ -675,7 +650,6 @@
         }
         if(continue_sending)
         {
-            sandesha2_transaction_rollback(transaction, env);
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Continue "\
                 "Sending is true. So returning from Sender Worker");
             return AXIS2_SUCCESS;
@@ -712,7 +686,6 @@
     transport_sender = axis2_transport_out_desc_get_sender(transport_out, env);
     if(transport_sender)
     {
-        sandesha2_transaction_commit(transaction, env);
         property = axis2_msg_ctx_get_property(msg_ctx, env, 
             SANDESHA2_WITHIN_TRANSACTION);
         if(property)
@@ -735,7 +708,6 @@
         	successfully_sent = AXIS2_FALSE;
 		}
     }
-    transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
     property = axis2_msg_ctx_get_property(msg_ctx, env, 
         SANDESHA2_WITHIN_TRANSACTION); 
     if(property)
@@ -816,11 +788,6 @@
             AXIS2_VALUE_FALSE);
         axis2_msg_ctx_set_property(msg_ctx, env, 
                     SANDESHA2_WITHIN_TRANSACTION, property);
-    }
-    /* TODO make transaction handling effective */
-    if(transaction)
-    {
-        sandesha2_transaction_commit(transaction, env);
     }
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
         "[sandesha2]Exit:sandesha2_sender_worker_send");        



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org