ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r600436 - in /webservices/sandesha/trunk/c/src/storage: mysql/ sqlite/
Date Mon, 03 Dec 2007 06:50:07 GMT
Author: damitha
Date: Sun Dec  2 22:50:06 2007
New Revision: 600436

URL: http://svn.apache.org/viewvc?rev=600436&view=rev
Log:

updated the myssql storage internal api to avoid unneccessary function parameters

Modified:
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c
    webservices/sandesha/trunk/c/src/storage/mysql/sandesha2_permanent_bean_mgr.h
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_bean_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_bean_mgr.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_bean_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_bean_mgr.c Sun Dec  2 22:50:06
2007
@@ -167,7 +167,6 @@
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     
-    AXIS2_ENV_CHECK(env, NULL);
     bean_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_bean_mgr_impl_t));
 
@@ -194,19 +193,13 @@
 sandesha2_permanent_bean_mgr_insert(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    sandesha2_rm_bean_t *bean,
-    int (*retrieve_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_retrieve,
-    axis2_char_t *sql_stmt_update,
     axis2_char_t *sql_stmt_insert)
 {
     int rc = -1;
     MYSQL *dbconn = NULL;
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     
-    sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, bean);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
     if(!dbconn)
@@ -230,14 +223,11 @@
 sandesha2_permanent_bean_mgr_remove(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    int (*retrieve_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_retrieve,
     axis2_char_t *sql_stmt_remove)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     MYSQL *dbconn = NULL;
     int rc = -1;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -271,7 +261,6 @@
     MYSQL *dbconn = NULL;
     MYSQL_RES *res;
     int rc = -1;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -316,18 +305,12 @@
 sandesha2_permanent_bean_mgr_update(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    sandesha2_rm_bean_t *bean,
-    int (*retrieve_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_retrieve_old_bean,
     axis2_char_t *sql_stmt_update)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     MYSQL *dbconn = NULL;
     int rc = -1;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
-    if(bean)
-        sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, bean);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
     if(!dbconn)
@@ -353,9 +336,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(MYSQL_RES *, void *),
-    int (*count_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_find,
-    axis2_char_t *sql_stmt_count)
+    axis2_char_t *sql_stmt_find)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     sandesha2_bean_mgr_args_t *args = NULL;
@@ -364,7 +345,6 @@
     MYSQL *dbconn = NULL;
     MYSQL_RES *res;
     axutil_array_list_t *data_array = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     beans = axutil_array_list_create(env, 0);
     if(!beans)
@@ -423,34 +403,6 @@
         axutil_array_list_free(data_array, env);
     if(args)
         AXIS2_FREE(env->allocator, args);
-    /* Finally remove any beans that are no longer in the table */
-    size = axutil_array_list_size(beans, env);
-    for(i = 0; i < size; i++)
-    {
-        sandesha2_rm_bean_t *temp = axutil_array_list_get(beans, env, i);
-        if(temp)
-        {
-            int count = -1;
-
-            rc = mysql_query(dbconn, sql_stmt_count);
-            if(rc)
-            {
-                AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SQL_ERROR, AXIS2_FAILURE);
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sql error %s", 
-                    mysql_error(dbconn));
-                printf("sql_stmt_count:%s\n", sql_stmt_count);
-                printf("retrieve error_msg:%s\n", mysql_error(dbconn));
-                return NULL;
-            }
-            res = mysql_store_result(dbconn);
-            count_func(res, &count);
-            /* mysql_free_result(res); */
-            if(count == 0)
-            {
-                axutil_array_list_remove(beans, env, i);
-            }
-        }
-    }
     return beans;
 }
 
@@ -460,19 +412,16 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(MYSQL_RES *, void *),
-    int (*count_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_find,
-    axis2_char_t *sql_stmt_count)
+    axis2_char_t *sql_stmt_find)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     axutil_array_list_t *beans = NULL;
     int size = 0;
     sandesha2_rm_bean_t *ret = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     beans = sandesha2_permanent_bean_mgr_find(bean_mgr, env, bean, find_func, 
-        count_func, sql_stmt_find, sql_stmt_count);
+        sql_stmt_find);
     if(beans)
         size = axutil_array_list_size(beans, env);
     if( size > 1)
@@ -500,7 +449,6 @@
     MYSQL *dbconn = NULL;
     MYSQL_RES *res;
     axis2_char_t sql_stmt_retrieve[512];
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -702,7 +650,6 @@
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     int rc = -1;
     MYSQL *dbconn = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -821,7 +768,6 @@
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     int rc = -1;
     MYSQL *dbconn = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -857,7 +803,6 @@
     MYSQL *dbconn = NULL;
     MYSQL_RES *res;
     axis2_char_t sql_stmt_retrieve[512];
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     dbconn = (MYSQL *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c Sun Dec  2 22:50:06
2007
@@ -125,18 +125,6 @@
     return 0;
 }
 
-static int 
-sandesha2_create_seq_count_callback(
-    MYSQL_RES *res,
-    void *data)
-{
-    MYSQL_ROW row;
-    int *count = (int *) data;
-    if((row = mysql_fetch_row(res)) != NULL)
-        *count = AXIS2_ATOI(row[0]);
-    return 0;
-}
-
 static void AXIS2_CALL 
 sandesha2_permanent_create_seq_mgr_free(
     sandesha2_create_seq_mgr_t *seq_mgr,
@@ -243,8 +231,6 @@
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
     axis2_bool_t ret = AXIS2_FALSE;
     axis2_char_t sql_insert[1024];
-    axis2_char_t sql_update[1024];
-    axis2_char_t sql_retrieve[256];
 	axis2_char_t *create_seq_msg_id = NULL;
 	axis2_char_t *internal_seq_id = NULL;
 	axis2_char_t *seq_id = NULL;
@@ -283,23 +269,13 @@
 		ref_msg_store_key = "";
 	}
 
-    sprintf(sql_retrieve, "select create_seq_msg_id, internal_seq_id,"\
-        "seq_id, create_seq_msg_store_key, ref_msg_store_key from create_seq "\
-        "where create_seq_msg_id='%s';", create_seq_msg_id);
-    
-    sprintf(sql_update, "update create_seq set internal_seq_id='%s', seq_id='%s'"\
-        ",create_seq_msg_store_key='%s', ref_msg_store_key='%s' where "\
-        "create_seq_msg_id='%s';", internal_seq_id, seq_id, 
-        create_seq_msg_store_key, ref_msg_store_key, create_seq_msg_id);
-    
     sprintf(sql_insert, "insert into create_seq(create_seq_msg_id, "\
         "internal_seq_id, seq_id, create_seq_msg_store_key, ref_msg_store_key) "\
         "values('%s', '%s', '%s', '%s', '%s');", create_seq_msg_id, 
         internal_seq_id, seq_id, create_seq_msg_store_key, ref_msg_store_key);
 
     ret = sandesha2_permanent_bean_mgr_insert(seq_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_create_seq_retrieve_callback, 
-        sql_retrieve, sql_update, sql_insert);
+        sql_insert);
     return ret;
 }
 
@@ -311,7 +287,6 @@
 {
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
     axis2_char_t sql_remove[256];
-    axis2_char_t sql_retrieve[256];
 
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, msg_id, AXIS2_FALSE);
@@ -319,11 +294,8 @@
 
     sprintf(sql_remove, "delete from create_seq where create_seq_msg_id='%s';", 
         msg_id);
-    sprintf(sql_retrieve, "select create_seq_msg_id, internal_seq_id,"\
-        "seq_id, create_seq_msg_store_key, ref_msg_store_key from create_seq "\
-        "where create_seq_msg_id='%s';", msg_id);
     return sandesha2_permanent_bean_mgr_remove(seq_mgr_impl->bean_mgr, env, 
-        sandesha2_create_seq_retrieve_callback, sql_retrieve, sql_remove);
+        sql_remove);
 }
 
 static sandesha2_create_seq_bean_t *AXIS2_CALL
@@ -353,7 +325,6 @@
     sandesha2_create_seq_bean_t *bean)
 {
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
-    axis2_char_t sql_retrieve[256];
     axis2_char_t sql_update[1024];
     axis2_bool_t ret = AXIS2_FALSE;
 	axis2_char_t *internal_seq_id = NULL;
@@ -384,18 +355,13 @@
     
 	seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
 
-    sprintf(sql_retrieve, "select create_seq_msg_id, internal_seq_id,"\
-        "seq_id, create_seq_msg_store_key, ref_msg_store_key from create_seq "\
-        "where create_seq_msg_id='%s';", create_seq_msg_id);
-    
 	sprintf(sql_update, "update create_seq set internal_seq_id='%s', seq_id='%s'"\
         ",create_seq_msg_store_key='%s', ref_msg_store_key='%s' where "\
         "create_seq_msg_id='%s';", internal_seq_id, seq_id, 
         create_seq_msg_store_key, ref_msg_store_key, create_seq_msg_id);
     
 	ret = sandesha2_permanent_bean_mgr_update(seq_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *)bean, sandesha2_create_seq_retrieve_callback, 
-        sql_retrieve, sql_update);
+        sql_update);
     return ret;
 }
 
@@ -406,17 +372,15 @@
     sandesha2_create_seq_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
     axutil_array_list_t *ret = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr); 
     sql_find = "select create_seq_msg_id,internal_seq_id,"\
         "seq_id,create_seq_msg_store_key, ref_msg_store_key from create_seq;";
-    sql_count = "select count(*) as no_recs from create_seq;";
     ret = sandesha2_permanent_bean_mgr_find(seq_mgr_impl->bean_mgr, env, 
         (sandesha2_rm_bean_t *) bean, sandesha2_create_seq_find_callback,
-        sandesha2_create_seq_count_callback, sql_find, sql_count);
+        sql_find);
     return ret;
 }
 
@@ -427,18 +391,15 @@
     sandesha2_create_seq_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
     sql_find = "select create_seq_msg_id,internal_seq_id,"\
         "seq_id,create_seq_msg_store_key, ref_msg_store_key from create_seq;";
-    sql_count = "select count(*) as no_recs from create_seq;";
     return (sandesha2_create_seq_bean_t *) sandesha2_permanent_bean_mgr_find_unique(
         seq_mgr_impl->bean_mgr, env, (sandesha2_rm_bean_t *) bean, 
-        sandesha2_create_seq_find_callback, sandesha2_create_seq_count_callback, 
-        sql_find, sql_count);
+        sandesha2_create_seq_find_callback, sql_find);
 }
 
 static axis2_bool_t AXIS2_CALL

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c Sun Dec  2 22:50:06
2007
@@ -119,18 +119,6 @@
     return 0;
 }
 
-static int 
-sandesha2_invoker_count_callback(
-    MYSQL_RES *res,
-    void *data)
-{
-    MYSQL_ROW row;
-    int *count = (int *) data;
-    if((row = mysql_fetch_row(res)) != NULL)
-        *count = AXIS2_ATOI(row[0]);
-    return 0;
-}
-
 void AXIS2_CALL
 sandesha2_permanent_invoker_mgr_free(
     sandesha2_invoker_mgr_t *invoker_mgr,
@@ -235,8 +223,6 @@
     sandesha2_invoker_bean_t *bean)
 {
     axis2_char_t sql_insert[1024];
-    axis2_char_t sql_retrieve[256];
-    axis2_char_t sql_update[1024];
     axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
 
@@ -246,22 +232,14 @@
     axis2_char_t *seq_id = sandesha2_invoker_bean_get_seq_id(bean, env);
     axis2_bool_t is_invoked = sandesha2_invoker_bean_is_invoked(bean, env);
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
 
-    sprintf(sql_retrieve, "select msg_ctx_ref_key, msg_no, "\
-        "seq_id, is_invoked from invoker where msg_ctx_ref_key='%s'", 
-        msg_ctx_ref_key);
-    sprintf(sql_update, "update invoker set msg_no=%ld, seq_id='%s',"\
-        "is_invoked=%d where msg_ctx_ref_key='%s';", msg_no, seq_id, is_invoked, 
-        msg_ctx_ref_key);
     sprintf(sql_insert, "insert into invoker(msg_ctx_ref_key, msg_no, seq_id,"\
         "is_invoked) values('%s', %ld, '%s', %d);", msg_ctx_ref_key, msg_no, 
         seq_id, is_invoked);
     ret = sandesha2_permanent_bean_mgr_insert(invoker_mgr_impl->bean_mgr, env,
-        (sandesha2_rm_bean_t *) bean, sandesha2_invoker_retrieve_callback, 
-        sql_retrieve, sql_update, sql_insert);
+        sql_insert);
     return ret;
 }
 
@@ -272,17 +250,13 @@
     axis2_char_t *key)
 {
     axis2_char_t sql_remove[256];
-    axis2_char_t sql_retrieve[256];
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, key, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
     sprintf(sql_remove, "delete from invoker where msg_ctx_ref_key='%s';", key);
-    sprintf(sql_retrieve, "select msg_ctx_ref_key, msg_no, seq_id, is_invoked"\
-        " from invoker where msg_ctx_ref_key='%s'", key);
     return sandesha2_permanent_bean_mgr_remove(invoker_mgr_impl->bean_mgr, env, 
-        sandesha2_invoker_retrieve_callback, sql_retrieve, sql_remove);
+        sql_remove);
 }
 
 sandesha2_invoker_bean_t *AXIS2_CALL
@@ -311,7 +285,6 @@
 {
     /*axis2_char_t *ref_key = NULL;*/
     axis2_char_t *sql_update = NULL;
-    axis2_char_t *sql_retrieve = NULL;
     axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
 
@@ -324,15 +297,11 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
 
-    sprintf(sql_retrieve, "select msg_ctx_ref_key, msg_no, "\
-        "seq_id, is_invoked from invoker where msg_ctx_ref_key='%s'", 
-        msg_ctx_ref_key);
     sprintf(sql_update, "update invoker set msg_no=%ld, seq_id='%s',"\
         "is_invoked=%d where msg_ctx_ref_key='%s';", msg_no, seq_id, is_invoked, 
         msg_ctx_ref_key);
     ret = sandesha2_permanent_bean_mgr_update(invoker_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *)bean, sandesha2_invoker_retrieve_callback, 
-        sql_retrieve, sql_update);
+        sql_update);
 
     return ret;
 }
@@ -344,16 +313,14 @@
     sandesha2_invoker_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     axutil_array_list_t *ret = NULL;
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
     sql_find = "select msg_ctx_ref_key,msg_no, seq_id,is_invoked from invoker;";
-    sql_count = "select count(*) as no_recs from invoker;";
     ret = sandesha2_permanent_bean_mgr_find(invoker_mgr_impl->bean_mgr, env, 
         (sandesha2_rm_bean_t *) bean, sandesha2_invoker_find_callback,
-        sandesha2_invoker_count_callback, sql_find, sql_count);
+        sql_find);
     return ret;
 }
 
@@ -364,17 +331,14 @@
     sandesha2_invoker_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
     sql_find = "select msg_ctx_ref_key,msg_no,seq_id,is_invoked from invoker;";
-    sql_count = "select count(*) as no_recs from invoker;";
     return (sandesha2_invoker_bean_t *) sandesha2_permanent_bean_mgr_find_unique(
         invoker_mgr_impl->bean_mgr, env, (sandesha2_rm_bean_t *) bean, 
-        sandesha2_invoker_find_callback, sandesha2_invoker_count_callback, 
-        sql_find, sql_count);
+        sandesha2_invoker_find_callback, sql_find);
 }
 
 axis2_bool_t AXIS2_CALL

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c Sun Dec  2 22:50:06
2007
@@ -124,18 +124,6 @@
     return 0;
 }
 
-static int 
-sandesha2_next_msg_count_callback(
-    MYSQL_RES *res,
-    void *data)
-{
-    MYSQL_ROW row;
-    int *count = (int *) data;
-    if((row = mysql_fetch_row(res)) != NULL)
-        *count = AXIS2_ATOI(row[0]);
-    return 0;
-}
-
 void AXIS2_CALL
 sandesha2_permanent_next_msg_mgr_free(
     sandesha2_next_msg_mgr_t *next_msg_mgr,
@@ -258,8 +246,6 @@
     sandesha2_next_msg_bean_t *bean)
 {
     axis2_char_t sql_insert[1024];
-    axis2_char_t sql_retrieve[256];
-    axis2_char_t sql_update[1024];
 	axis2_char_t *seq_id = NULL;
 	axis2_char_t *ref_msg_key = NULL;
 	axis2_bool_t polling_mode;
@@ -279,17 +265,11 @@
     if(!seq_id) seq_id = "";
     if(!ref_msg_key) ref_msg_key = "";
 
-    sprintf(sql_retrieve, "select seq_id, ref_msg_key, polling_mode, msg_no"\
-        " from next_msg where seq_id='%s';", seq_id);
-    sprintf(sql_update, "update next_msg set ref_msg_key='%s', polling_mode=%d"\
-        ",msg_no=%ld where seq_id='%s';", ref_msg_key, polling_mode, msg_no, 
-        seq_id);
     sprintf(sql_insert, "insert into next_msg(seq_id, ref_msg_key,"\
         "polling_mode, msg_no) values('%s', '%s', %d, %ld);", seq_id, 
         ref_msg_key, polling_mode, msg_no);
     return sandesha2_permanent_bean_mgr_insert(next_msg_mgr_impl->bean_mgr, env,
-        (sandesha2_rm_bean_t *) bean, sandesha2_next_msg_retrieve_callback, 
-        sql_retrieve, sql_update, sql_insert);
+        sql_insert);
 }
 
 axis2_bool_t AXIS2_CALL
@@ -299,17 +279,14 @@
     axis2_char_t *seq_id)
 {
     axis2_char_t sql_remove[256];
-    axis2_char_t sql_retrieve[256];
     sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FALSE);
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
     sprintf(sql_remove, "delete from next_msg where seq_id='%s'",
         seq_id);
-    sprintf(sql_retrieve, "select seq_id, ref_msg_key, polling_mode, msg_no"\
-        " from next_msg where seq_id='%s';", seq_id);
     return sandesha2_permanent_bean_mgr_remove(next_msg_mgr_impl->bean_mgr, env, 
-        sandesha2_next_msg_retrieve_callback, sql_retrieve, sql_remove);
+        sql_remove);
 }
 
 sandesha2_next_msg_bean_t *AXIS2_CALL
@@ -339,7 +316,6 @@
     const axutil_env_t *env,
     sandesha2_next_msg_bean_t *bean)
 {
-    axis2_char_t sql_retrieve[256];
     axis2_char_t sql_update[1024];
     axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
@@ -359,14 +335,11 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
 
-    sprintf(sql_retrieve, "select seq_id, ref_msg_key, polling_mode, msg_no"\
-        " from next_msg where seq_id='%s';", seq_id);
     sprintf(sql_update, "update next_msg set ref_msg_key='%s', polling_mode=%d"\
         ",msg_no=%ld where seq_id='%s';", ref_msg_key, polling_mode, msg_no, 
         seq_id);
     ret = sandesha2_permanent_bean_mgr_update(next_msg_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_next_msg_retrieve_callback, 
-        sql_retrieve, sql_update);
+        sql_update);
     return ret;
 }
 
@@ -377,16 +350,14 @@
     sandesha2_next_msg_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     axutil_array_list_t *ret = NULL;
     sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
     sql_find = "select seq_id,ref_msg_key, polling_mode,msg_no from next_msg";
-    sql_count = "select count(*) as no_recs from next_msg";
     ret = sandesha2_permanent_bean_mgr_find(next_msg_mgr_impl->bean_mgr, env, 
         (sandesha2_rm_bean_t *) bean, sandesha2_next_msg_find_callback,
-        sandesha2_next_msg_count_callback, sql_find, sql_count);
+        sql_find);
     return ret;
 }
 
@@ -397,18 +368,15 @@
     sandesha2_next_msg_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_next_msg_bean_t *ret = NULL;
     sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
     sql_find = "select seq_id,ref_msg_key,polling_mode,msg_no from next_msg";
-    sql_count = "select count(*) as no_recs from next_msg";
     ret = (sandesha2_next_msg_bean_t *) sandesha2_permanent_bean_mgr_find_unique(
         next_msg_mgr_impl->bean_mgr, env, (sandesha2_rm_bean_t *) bean, 
-        sandesha2_next_msg_find_callback, sandesha2_next_msg_count_callback, 
-        sql_find, sql_count);
+        sandesha2_next_msg_find_callback, sql_find);
     return ret;
 }
 

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=600436&r1=600435&r2=600436&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 Sun Dec  2 22:50:06
2007
@@ -154,18 +154,6 @@
     return 0;
 }
 
-static int
-sandesha2_sender_count_callback(
-    MYSQL_RES *res,
-    void *data)
-{
-    MYSQL_ROW row;
-    int *count = (int *) data;
-    if((row = mysql_fetch_row(res)) != NULL)
-        *count = AXIS2_ATOI(row[0]);
-    return 0;
-}
-
 void AXIS2_CALL
 sandesha2_permanent_sender_mgr_free(
     sandesha2_sender_mgr_t *sender_mgr,
@@ -247,7 +235,6 @@
 {
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
     
-    AXIS2_ENV_CHECK(env, NULL);
     sender_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_sender_mgr_t));
 
@@ -285,8 +272,6 @@
     sandesha2_sender_bean_t *bean)
 {
     axis2_char_t sql_insert[1024];
-    axis2_char_t sql_retrieve[256];
-    axis2_char_t sql_update[1024];
     axis2_bool_t ret = AXIS2_FALSE;
 	axis2_char_t *msg_ctx_ref_key = NULL;
 	axis2_char_t *internal_seq_id = NULL;
@@ -329,18 +314,6 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
 
-    sprintf(sql_retrieve, "select msg_id, msg_ctx_ref_key, "\
-        "internal_seq_id, sent_count, msg_no, send, resend, time_to_send, "\
-        "msg_type, seq_id, wsrm_anon_uri, to_address from sender "\
-        "where msg_id='%s'", msg_id);
-
-    sprintf(sql_update, "update sender set msg_ctx_ref_key='%s'"\
-        ", internal_seq_id='%s', sent_count=%d, msg_no=%ld, send=%d"\
-        ", resend=%d, time_to_send=%ld, msg_type=%d, seq_id='%s'"\
-        ", wsrm_anon_uri='%s', to_address='%s' where msg_id='%s';",
-        msg_ctx_ref_key, internal_seq_id, sent_count, msg_no, send, resend,
-        time_to_send, msg_type, seq_id, wsrm_anon_uri, to_address, msg_id);
-
     sprintf(sql_insert, "insert into sender(msg_id, msg_ctx_ref_key,"\
         "internal_seq_id, sent_count, msg_no, send, resend, time_to_send,"\
         "msg_type, seq_id, wsrm_anon_uri, to_address) values('%s', '%s', '%s',"\
@@ -349,8 +322,7 @@
         msg_type, seq_id, wsrm_anon_uri, to_address);
 
     ret = sandesha2_permanent_bean_mgr_insert(sender_mgr_impl->bean_mgr, env,
-        (sandesha2_rm_bean_t *) bean, sandesha2_sender_retrieve_callback, 
-        sql_retrieve, sql_update, sql_insert);
+        sql_insert);
     return ret;
 }
 
@@ -360,19 +332,13 @@
     const axutil_env_t *env,
     axis2_char_t *msg_id)
 {
-    axis2_char_t sql_retrieve[256];
     axis2_char_t sql_remove[256];
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, msg_id, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
     sprintf(sql_remove, "delete from sender where msg_id='%s'", msg_id);
-    sprintf(sql_retrieve, "select msg_id, msg_ctx_ref_key, "\
-        "internal_seq_id, sent_count, msg_no, send, resend, time_to_send, "\
-        "msg_type, seq_id, wsrm_anon_uri, to_address from sender "\
-        "where msg_id='%s'", msg_id);
     return sandesha2_permanent_bean_mgr_remove(sender_mgr_impl->bean_mgr, env,
-        sandesha2_sender_retrieve_callback, sql_retrieve, sql_remove);
+        sql_remove);
 }
 
 sandesha2_sender_bean_t *AXIS2_CALL
@@ -385,7 +351,6 @@
     sandesha2_sender_bean_t *ret = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, msg_id, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
 
@@ -406,7 +371,6 @@
     const axutil_env_t *env,
     sandesha2_sender_bean_t *bean)
 {
-    axis2_char_t sql_retrieve[256];
     axis2_char_t sql_update[1024];
     axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
@@ -425,7 +389,6 @@
     axis2_char_t *wsrm_anon_uri = sandesha2_sender_bean_get_wsrm_anon_uri(bean, env);
     axis2_char_t *to_address = sandesha2_sender_bean_get_to_address(bean, env);
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
 
@@ -436,11 +399,6 @@
     if(!wsrm_anon_uri) wsrm_anon_uri = "";
     if(!to_address) to_address = "";
 
-    sprintf(sql_retrieve, "select msg_id, msg_ctx_ref_key, "\
-        "internal_seq_id, sent_count, msg_no, send, resend, time_to_send, "\
-        "msg_type, seq_id, wsrm_anon_uri, to_address from sender "\
-        "where msg_id='%s'", msg_id);
-
     sprintf(sql_update, "update sender set msg_ctx_ref_key='%s'"\
         ", internal_seq_id='%s', sent_count=%d, msg_no=%ld, send=%d"\
         ", resend=%d, time_to_send=%ld, msg_type=%d, seq_id='%s'"\
@@ -449,7 +407,7 @@
         time_to_send, msg_type, seq_id, wsrm_anon_uri, to_address, msg_id);
 
     ret = sandesha2_permanent_bean_mgr_update(sender_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_sender_retrieve_callback, sql_retrieve, sql_update);
+        sql_update);
 
     return ret;
 
@@ -467,7 +425,6 @@
     sandesha2_sender_bean_t *bean = NULL;
     axutil_array_list_t *ret = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
     
     bean = sandesha2_sender_bean_create(env);
@@ -478,8 +435,7 @@
         "wsrm_anon_uri, to_address from sender;";
     sql_count = "select count(*) as no_recs from sender;";
     ret = sandesha2_permanent_bean_mgr_find(sender_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_sender_find_callback,
-        sandesha2_sender_count_callback, sql_find, sql_count);
+        (sandesha2_rm_bean_t *) bean, sandesha2_sender_find_callback, sql_find);
     if(bean)
         sandesha2_sender_bean_free((sandesha2_rm_bean_t *) bean, env);
     return ret;
@@ -495,15 +451,13 @@
     axis2_char_t *sql_count = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
     axutil_array_list_t *ret = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
     sql_find = "select msg_id, msg_ctx_ref_key, internal_seq_id,"\
         "sent_count, msg_no, send, resend, time_to_send, msg_type, seq_id, "\
         "wsrm_anon_uri, to_address from sender;";
     sql_count = "select count(*) as no_recs from sender;";
     ret = sandesha2_permanent_bean_mgr_find(sender_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_sender_find_callback,
-        sandesha2_sender_count_callback, sql_find, sql_count);
+        (sandesha2_rm_bean_t *) bean, sandesha2_sender_find_callback, sql_find);
     return ret;
 }
 
@@ -516,7 +470,6 @@
     axis2_char_t *sql_find = NULL;
     axis2_char_t *sql_count = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
     sql_find = "select msg_ctx_ref_key, internal_seq_id, "\
@@ -525,8 +478,7 @@
     sql_count = "select count(*) as no_recs from sender;";
     return (sandesha2_sender_bean_t *) sandesha2_permanent_bean_mgr_find(
         sender_mgr_impl->bean_mgr, env, (sandesha2_rm_bean_t *) bean, 
-        sandesha2_sender_find_callback, sandesha2_sender_count_callback, 
-        sql_find, sql_count);
+        sandesha2_sender_find_callback, sql_find);
 }
 
 axis2_bool_t AXIS2_CALL
@@ -645,8 +597,7 @@
         "to_address from sender;";
     sql_count = "select count(*) as no_recs from sender;";
     match_list = sandesha2_permanent_bean_mgr_find(sender_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) matcher, sandesha2_sender_find_callback,
-        sandesha2_sender_count_callback, sql_find, sql_count);
+        (sandesha2_rm_bean_t *) matcher, sandesha2_sender_find_callback, sql_find);
 
     /*
      * We either return an application message or an RM message. If we find

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c Sun Dec  2
22:50:06 2007
@@ -121,19 +121,6 @@
     return 0;
 }
 
-static int 
-sandesha2_seq_property_count_callback(
-    MYSQL_RES *res,
-    void *data)
-{
-    MYSQL_ROW row;
-    int *count = (int *) data;
-    if((row = mysql_fetch_row(res)) != NULL)
-        *count = AXIS2_ATOI(row[0]);
-    return 0;
-}
-
-
 void AXIS2_CALL
 sandesha2_permanent_seq_property_mgr_free(
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
@@ -263,18 +250,15 @@
     sandesha2_seq_property_bean_t *bean)
 {
     axis2_char_t sql_insert[1024];
-    axis2_char_t sql_update[1024];
-    axis2_char_t sql_retrieve[1024];
     axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
 
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *id = sandesha2_permanent_seq_property_mgr_get_id_with_bean(env, bean);
     axis2_char_t *seq_id = sandesha2_seq_property_bean_get_seq_id(bean, env);
     axis2_char_t *name = sandesha2_seq_property_bean_get_name(bean, env);
     axis2_char_t *value = sandesha2_seq_property_bean_get_value(bean, env);
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
 
     if(!id) id = "";
@@ -282,15 +266,10 @@
     if(!name) name = "";
     if(!value) value = "";
 
-    sprintf(sql_retrieve, "select seq_id, name, value from seq_property "\
-        "where id='%s'", id);
-    sprintf(sql_update, "update seq_property set seq_id='%s', name='%s',"\
-        "value='%s' where id='%s'", seq_id, name, value, id);
     sprintf(sql_insert, "insert into seq_property(id, seq_id, name, value) "\
         "values('%s', '%s', '%s', '%s')", id, seq_id, name, value);
     ret = sandesha2_permanent_bean_mgr_insert(seq_prop_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean,  sandesha2_seq_property_retrieve_callback, 
-        sql_retrieve, sql_update, sql_insert);
+        sql_insert);
     return ret;
 }
 
@@ -303,21 +282,17 @@
 {
     axis2_char_t *key = NULL;
     axis2_char_t sql_remove[256];
-    axis2_char_t sql_retrieve[1024];
     axis2_status_t status = AXIS2_FAILURE;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, name, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
     key = sandesha2_permanent_seq_property_mgr_get_id_with_seq_id_and_name(env, 
         seq_id, name);
     sprintf(sql_remove, "delete from seq_property where id='%s'", key);
-    sprintf(sql_retrieve, "select seq_id, name, value from seq_property "\
-        "where id='%s'", key);
     status = sandesha2_permanent_bean_mgr_remove(seq_prop_mgr_impl->bean_mgr, env, 
-        sandesha2_seq_property_retrieve_callback, sql_retrieve, sql_remove);
+        sql_remove);
     AXIS2_FREE(env->allocator, key);
     return status;
 }
@@ -334,7 +309,6 @@
     sandesha2_seq_property_bean_t *ret = NULL;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, name, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
@@ -356,17 +330,15 @@
     sandesha2_seq_property_bean_t *bean)
 {
     axis2_char_t sql_update[1024];
-    axis2_char_t sql_retrieve[1024];
     axis2_bool_t ret = AXIS2_FALSE;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
 
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *id = sandesha2_permanent_seq_property_mgr_get_id_with_bean(env, bean);
     axis2_char_t *seq_id = sandesha2_seq_property_bean_get_seq_id(bean, env);
     axis2_char_t *name = sandesha2_seq_property_bean_get_name(bean, env);
     axis2_char_t *value = sandesha2_seq_property_bean_get_value(bean, env);
 
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
 
     if(!id) id = "";
@@ -374,13 +346,10 @@
     if(!name) name = "";
     if(!value) value = "";
 
-    sprintf(sql_retrieve, "select seq_id, name, value from seq_property "\
-        "where id='%s'", id);
     sprintf(sql_update, "update seq_property set seq_id='%s', name='%s',"\
         "value='%s' where id='%s'", seq_id, name, value, id);
     ret = sandesha2_permanent_bean_mgr_update(seq_prop_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_seq_property_retrieve_callback, 
-        sql_retrieve, sql_update);
+        sql_update);
     return ret;
 }
 
@@ -391,16 +360,13 @@
     sandesha2_seq_property_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
     axutil_array_list_t *ret = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
     sql_find = "select seq_id, name,value from seq_property";
-    sql_count = "select count(*) as no_recs from seq_property";
     ret = sandesha2_permanent_bean_mgr_find(seq_prop_mgr_impl->bean_mgr, env, 
-        (sandesha2_rm_bean_t *) bean, sandesha2_seq_property_find_callback,
-        sandesha2_seq_property_count_callback, sql_find, sql_count);
+        (sandesha2_rm_bean_t *) bean, sandesha2_seq_property_find_callback, 
+        sql_find);
     return ret;
 }
 
@@ -413,7 +379,6 @@
     axis2_char_t *sql_find = NULL;
     axis2_char_t *sql_count = NULL;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
     sql_find = "select seq_id, name,value from seq_property";
@@ -421,7 +386,7 @@
     return (sandesha2_seq_property_bean_t *) 
         sandesha2_permanent_bean_mgr_find_unique(seq_prop_mgr_impl->bean_mgr, 
         env, (sandesha2_rm_bean_t *) bean, sandesha2_seq_property_find_callback,
-        sandesha2_seq_property_count_callback, sql_find, sql_count);
+        sql_find);
 }
 
 static axis2_bool_t AXIS2_CALL

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c Sun Dec  2 22:50:06
2007
@@ -262,7 +262,6 @@
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
     axis2_conf_t *conf = NULL;
    
-    AXIS2_ENV_CHECK(env, NULL);
     storage_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_storage_mgr_t));
 
@@ -514,8 +513,6 @@
     const axutil_env_t *env,
     axis2_conf_ctx_t *conf_ctx)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-    
     sandesha2_permanent_storage_mgr_set_ctx(storage_mgr, env, conf_ctx);
 
     return AXIS2_SUCCESS;

Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c Sun Dec  2 22:50:06
2007
@@ -106,8 +106,6 @@
     axis2_char_t *db_name = NULL;
     /*int rc = -1;*/
 
-    AXIS2_ENV_CHECK(env, NULL);
-    
     trans_impl =  (sandesha2_permanent_transaction_impl_t *)AXIS2_MALLOC 
         (env->allocator, sizeof(sandesha2_permanent_transaction_impl_t));
 
@@ -207,7 +205,6 @@
 {
     sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     trans_impl = SANDESHA2_INTF_TO_IMPL(trans);
 
     if(trans_impl->enlisted_beans)

Modified: webservices/sandesha/trunk/c/src/storage/mysql/sandesha2_permanent_bean_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/sandesha2_permanent_bean_mgr.h?rev=600436&r1=600435&r2=600436&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/sandesha2_permanent_bean_mgr.h (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/sandesha2_permanent_bean_mgr.h Sun Dec
 2 22:50:06 2007
@@ -93,18 +93,12 @@
 sandesha2_permanent_bean_mgr_insert(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    sandesha2_rm_bean_t *bean,
-    int (*retrieve_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_retrieve,
-    axis2_char_t *sql_stmt_update,
     axis2_char_t *sql_stmt_insert);
 
 axis2_bool_t AXIS2_CALL
 sandesha2_permanent_bean_mgr_remove(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    int (*retrieve_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_retrieve,
     axis2_char_t *sql_stmt_remove);
 
 sandesha2_rm_bean_t *AXIS2_CALL
@@ -118,9 +112,6 @@
 sandesha2_permanent_bean_mgr_update(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    sandesha2_rm_bean_t *bean,
-    int (*retrieve_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_retrieve_old_bean,
     axis2_char_t *sql_stmt_update);
 
 axutil_array_list_t *AXIS2_CALL
@@ -129,9 +120,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(MYSQL_RES *, void *),
-    int (*count_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_find,
-    axis2_char_t *sql_stmt_count);
+    axis2_char_t *sql_stmt_find);
 
 sandesha2_rm_bean_t *AXIS2_CALL
 sandesha2_permanent_bean_mgr_find_unique(
@@ -139,9 +128,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(MYSQL_RES *, void *),
-    int (*count_func)(MYSQL_RES *, void *),
-    axis2_char_t *sql_stmt_find,
-    axis2_char_t *sql_stmt_count);
+    axis2_char_t *sql_stmt_find);
 
 axis2_bool_t AXIS2_CALL
 sandesha2_permanent_bean_mgr_match(

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=600436&r1=600435&r2=600436&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 Sun Dec  2 22:50:06
2007
@@ -860,7 +860,6 @@
     sqlite3 *dbconn = NULL;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Entry:sandesha2_permanent_bean_mgr_remove_msg_store_bean");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     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(
@@ -1013,7 +1012,6 @@
     sqlite3 *dbconn = NULL;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Entry:sandesha2_permanent_bean_mgr_remove_response");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     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(



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


Mime
View raw message