ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r600451 - in /webservices/sandesha/trunk/c/src/storage/sqlite: permanent_bean_mgr.c permanent_create_seq_mgr.c permanent_invoker_mgr.c permanent_next_msg_mgr.c permanent_sender_mgr.c permanent_seq_property_mgr.c sandesha2_permanent_bean_mgr.h
Date Mon, 03 Dec 2007 09:04:53 GMT
Author: damitha
Date: Mon Dec  3 01:04:52 2007
New Revision: 600451

URL: http://svn.apache.org/viewvc?rev=600451&view=rev
Log:
Added entry exit logs to sqlite layer

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

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=600451&r1=600450&r2=600451&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 Mon Dec  3 01:04:52 2007
@@ -234,10 +234,6 @@
 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)(void *, int, char **, char **),
-    axis2_char_t *sql_stmt_retrieve,
-    axis2_char_t *sql_stmt_update,
     axis2_char_t *sql_stmt_insert)
 {
     axis2_char_t *error_msg = NULL;
@@ -246,7 +242,6 @@
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
    
-    sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, bean);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
     dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -278,14 +273,11 @@
 sandesha2_permanent_bean_mgr_remove(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    int (*retrieve_func)(void *, int, char **, char **),
-    axis2_char_t *sql_stmt_retrieve,
     axis2_char_t *sql_stmt_remove)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
     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;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
@@ -299,35 +291,6 @@
     }
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_bean_mgr_args_t));
     args->env = env;
-    args->data = NULL;
-    rc = sqlite3_exec(dbconn, sql_stmt_retrieve, retrieve_func, args, 
-        &error_msg);
-    if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(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;
-    }
-    if(args->data)
-        bean = (sandesha2_rm_bean_t *) args->data;
-    if(args)
-        AXIS2_FREE(env->allocator, args);
-    axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
-    if(bean)
-    {
-        if(sandesha2_rm_bean_get_key(bean, env))
-            sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, 
-                bean);
-    }
-    axutil_thread_mutex_lock(bean_mgr_impl->mutex);
     rc = sqlite3_exec(dbconn, sql_stmt_remove, 0, 0, &error_msg);
     if(rc == SQLITE_BUSY)
         rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_remove, 
@@ -393,33 +356,6 @@
     if(args)
         AXIS2_FREE(env->allocator, args);
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
-    if(bean)
-        sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, bean);
-    axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    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, 
-        &error_msg);
-    if(rc == SQLITE_BUSY)
-        rc = sandesha2_permanent_bean_mgr_busy_handler(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 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;
-    }
-    if(args->data)
-        bean = (sandesha2_rm_bean_t *) args->data;
-    if(args)
-        AXIS2_FREE(env->allocator, args);
-    axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
     return bean;
 }
 
@@ -427,9 +363,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)(void *, int, char **, char **),
-    axis2_char_t *sql_stmt_retrieve_old_bean,
     axis2_char_t *sql_stmt_update)
 {
     sandesha2_permanent_bean_mgr_impl_t *bean_mgr_impl = NULL;
@@ -437,8 +370,6 @@
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
-    if(bean)
-        sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, bean);
     axutil_thread_mutex_lock(bean_mgr_impl->mutex);
     dbconn = (sqlite3 *) sandesha2_permanent_storage_mgr_get_dbconn(
         bean_mgr_impl->storage_mgr, env);
@@ -473,9 +404,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(void *, int, char **, char **),
-    int (*count_func)(void *, int, char **, char **),
-    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;
@@ -546,48 +475,6 @@
     if(args)
         AXIS2_FREE(env->allocator, args);
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
-    /* Now we have a point-in-time view of the beans, lock them all.*/
-    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)
-            sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, 
-                temp);
-    }
-    /* Finally remove any beans that are no longer in the table */
-    axutil_thread_mutex_lock(bean_mgr_impl->mutex);
-    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 = sqlite3_exec(dbconn, sql_stmt_count, count_func, &count, 
-                &error_msg);
-            if(rc == SQLITE_BUSY)
-                rc = sandesha2_permanent_bean_mgr_busy_handler(dbconn, sql_stmt_count, 
-                    count_func, &count, &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_count:%s\n", sql_stmt_count);
-                printf("retrieve error_msg:%s\n", error_msg);
-                sqlite3_free(error_msg);
-                return NULL;
-            }
-            if(count == 0)
-            {
-                axutil_array_list_remove(beans, env, i);
-            }
-        }
-    }
-    axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
     return beans;
 }
 
@@ -597,9 +484,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(void *, int, char **, char **),
-    int (*count_func)(void *, int, char **, char **),
-    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;
@@ -608,7 +493,7 @@
     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)

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_create_seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_create_seq_mgr.c?rev=600451&r1=600450&r2=600451&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_create_seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_create_seq_mgr.c Mon Dec  3 01:04:52 2007
@@ -128,18 +128,6 @@
     return 0;
 }
 
-static int 
-sandesha2_create_seq_count_callback(
-    void *not_used, 
-    int argc, 
-    char **argv, 
-    char **col_name)
-{
-    int *count = (int *) not_used;
-    *count = AXIS2_ATOI(argv[0]);
-    return 0;
-}
-
 static void AXIS2_CALL 
 sandesha2_permanent_create_seq_mgr_free(
     sandesha2_create_seq_mgr_t *seq_mgr,
@@ -206,7 +194,6 @@
     axis2_conf_ctx_t *ctx)
 {
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     seq_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_create_seq_mgr_t));
 
@@ -246,9 +233,10 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_create_seq_mgr_insert");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *create_seq_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
         (sandesha2_rm_bean_t *) bean, env);
     axis2_char_t *internal_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(bean, env);
@@ -258,31 +246,17 @@
     axis2_char_t *ref_msg_store_key = 
         sandesha2_create_seq_bean_get_ref_msg_store_key(bean, env);
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_create_seq_mgr_insert");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     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);
-    
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_create_seq_mgr_insert");
+        sql_insert);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_create_seq_mgr_insert");
     return ret;
 }
 
@@ -294,23 +268,18 @@
 {
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
     axis2_char_t sql_remove[256];
-    axis2_char_t sql_retrieve[256];
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_create_seq_mgr_remove");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_create_seq_mgr_remove");
     AXIS2_PARAM_CHECK(env->error, msg_id, AXIS2_FALSE);
     seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
 
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_create_seq_mgr_remove");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_create_seq_mgr_remove");
     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
@@ -321,17 +290,16 @@
 {
     axis2_char_t sql_retrieve[256];
     sandesha2_permanent_create_seq_mgr_t *seq_mgr_impl = NULL;
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_create_seq_mgr_retrieve");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_create_seq_mgr_retrieve");
     AXIS2_PARAM_CHECK(env->error, msg_id, AXIS2_FALSE);
     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';", msg_id);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_create_seq_mgr_retrieve");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_create_seq_mgr_retrieve");
     return (sandesha2_create_seq_bean_t *) sandesha2_permanent_bean_mgr_retrieve(
         seq_mgr_impl->bean_mgr, env, sandesha2_create_seq_retrieve_callback, 
         sql_retrieve);
@@ -344,10 +312,12 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "Entry:[sandesha2]sandesha2_permanent_create_seq_mgr_update");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *create_seq_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
         (sandesha2_rm_bean_t *) bean, env);
     axis2_char_t *internal_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(bean, env);
@@ -357,23 +327,15 @@
     axis2_char_t *ref_msg_store_key = 
         sandesha2_create_seq_bean_get_ref_msg_store_key(bean, env);
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "Entry:[sandesha2]sandesha2_permanent_create_seq_mgr_update");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+        sql_update);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "Exit:[sandesha2]sandesha2_permanent_create_seq_mgr_update:return:%d", 
             ret);
     return ret;
@@ -386,20 +348,17 @@
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "Entry:[sandesha2]sandesha2_permanent_create_seq_mgr_find");
-    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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
+        sql_find);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "Exit:[sandesha2]sandesha2_permanent_create_seq_mgr_find");
     return ret;
 }
@@ -411,18 +370,14 @@
     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
@@ -439,8 +394,8 @@
     axis2_char_t *temp_seq_id = NULL;
     axis2_char_t *internal_seq_id = NULL;
     axis2_char_t *temp_internal_seq_id = NULL;
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_create_seq_mgr_match");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_create_seq_mgr_match");
     msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(bean, env);
     temp_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(candidate, 
         env);
@@ -465,8 +420,8 @@
     {
         equal = AXIS2_FALSE;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_create_seq_mgr_match:equal:%d", 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_create_seq_mgr_match:equal:%d", 
             equal);
     return equal;
 }

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_invoker_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_invoker_mgr.c?rev=600451&r1=600450&r2=600451&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_invoker_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_invoker_mgr.c Mon Dec  3 01:04:52 2007
@@ -114,18 +114,6 @@
     return 0;
 }
 
-static int 
-sandesha2_invoker_count_callback(
-    void *not_used, 
-    int argc, 
-    char **argv, 
-    char **col_name)
-{
-    int *count = (int *) not_used;
-    *count = AXIS2_ATOI(argv[0]);
-    return 0;
-}
-
 void AXIS2_CALL
 sandesha2_permanent_invoker_mgr_free(
     sandesha2_invoker_mgr_t *invoker_mgr,
@@ -192,7 +180,6 @@
     axis2_conf_ctx_t *ctx)
 {
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     invoker_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_invoker_mgr_t));
     invoker_mgr_impl->bean_mgr = sandesha2_permanent_bean_mgr_create(env,
@@ -230,37 +217,27 @@
     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;
 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_invoker_mgr_insert");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *msg_ctx_ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(
         (sandesha2_rm_bean_t *) bean, env);
     long msg_no = sandesha2_invoker_bean_get_msg_no(bean, env);
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_invoker_mgr_insert");
-    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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_invoker_mgr_insert");
+        sql_insert);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_invoker_mgr_insert");
     return ret;
 }
 
@@ -271,17 +248,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
@@ -295,14 +268,14 @@
     sandesha2_permanent_invoker_mgr_t *invoker_mgr_impl = NULL;
     AXIS2_PARAM_CHECK(env->error, key, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_invoker_mgr_retrieve");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_invoker_mgr_retrieve");
     sprintf(sql_retrieve, "select msg_ctx_ref_key, msg_no, seq_id, is_invoked"\
         " from invoker where msg_ctx_ref_key='%s'", key);
     sandesha2_permanent_bean_mgr_retrieve(invoker_mgr_impl->bean_mgr, env, 
         sandesha2_invoker_retrieve_callback, sql_retrieve);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_invoker_mgr_retrieve");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_invoker_mgr_retrieve");
     return bean;
 }
 
@@ -314,33 +287,28 @@
 {
     /*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;
 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_invoker_mgr_update");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *msg_ctx_ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(
         (sandesha2_rm_bean_t *) bean, env);
     long msg_no = sandesha2_invoker_bean_get_msg_no(bean, env);
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_invoker_mgr_update");
-    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);
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_invoker_mgr_update:return:%d", ret);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_invoker_mgr_update");
     return ret;
 }
 
@@ -351,20 +319,17 @@
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_invoker_mgr_find");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_invoker_mgr_find");
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_invoker_mgr_find");
+        sql_find);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_invoker_mgr_find");
     return ret;
 }
 
@@ -375,17 +340,13 @@
     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
@@ -405,8 +366,8 @@
     axis2_bool_t is_invoked = AXIS2_FALSE;
     axis2_bool_t temp_is_invoked = AXIS2_FALSE;
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_create_invoker_mgr_match");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_create_invoker_mgr_match");
     ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(bean, env);
     temp_ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(candidate, env);
     if(ref_key && temp_ref_key && 0 != axutil_strcmp(ref_key, temp_ref_key))
@@ -437,9 +398,8 @@
     {
         select = AXIS2_FALSE;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_create_invoker_mgr_match:return:%d", 
-            select);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_create_invoker_mgr_match");
     return select;
 }
 

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c?rev=600451&r1=600450&r2=600451&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_next_msg_mgr.c Mon Dec  3 01:04:52 2007
@@ -134,18 +134,6 @@
     return 0;
 }
 
-static int 
-sandesha2_next_msg_count_callback(
-    void *not_used, 
-    int argc, 
-    char **argv, 
-    char **col_name)
-{
-    int *count = (int *) not_used;
-    *count = AXIS2_ATOI(argv[0]);
-    return 0;
-}
-
 void AXIS2_CALL
 sandesha2_permanent_next_msg_mgr_free(
     sandesha2_next_msg_mgr_t *next_msg_mgr,
@@ -218,7 +206,6 @@
     axis2_conf_ctx_t *ctx)
 {
     sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     next_msg_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_next_msg_mgr_t));
 
@@ -268,17 +255,14 @@
     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;
 	long msg_no;
 	sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-        "[sandesha2] Entry:sandesha2_permanent_next_msg_mgr_insert");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]Entry:sandesha2_permanent_next_msg_mgr_insert");
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
 
 	seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) bean, 
@@ -288,19 +272,13 @@
     msg_no = sandesha2_next_msg_bean_get_next_msg_no_to_process(bean, env);
     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);
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_next_msg_mgr_insert");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_insert");
     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
@@ -310,21 +288,17 @@
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_next_msg_mgr_remove");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_next_msg_mgr_remove");
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_next_msg_mgr_remove");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_remove");
     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
@@ -337,18 +311,17 @@
     sandesha2_next_msg_bean_t *bean = NULL;
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Entry:sandesha2_permanent_next_msg_mgr_retrieve");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_next_msg_mgr_retrieve");
     sprintf(sql_retrieve, "select seq_id, ref_msg_key, polling_mode, msg_no"\
         " from next_msg where seq_id='%s';", seq_id);
     bean = (sandesha2_next_msg_bean_t *) sandesha2_permanent_bean_mgr_retrieve(
         next_msg_mgr_impl->bean_mgr, env, sandesha2_next_msg_retrieve_callback, 
         sql_retrieve);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2] Exit:sandesha2_permanent_next_msg_mgr_retrieve");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_retrieve");
     return bean;
 }
 
@@ -358,29 +331,28 @@
     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;
 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_next_msg_mgr_update");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) bean, 
         env);
     axis2_char_t *ref_msg_key = sandesha2_next_msg_bean_get_ref_msg_key(bean, env);
     axis2_bool_t polling_mode = sandesha2_next_msg_bean_is_polling_mode(bean, env);
     long msg_no = sandesha2_next_msg_bean_get_next_msg_no_to_process(bean, env);
 
-    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);
 
-    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);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_update");
     return ret;
 }
 
@@ -391,16 +363,17 @@
     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);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Entry:sandesha2_permanent_next_msg_mgr_find");
     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);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_find");
     return ret;
 }
 
@@ -411,18 +384,14 @@
     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;
 }
 
@@ -433,7 +402,6 @@
 {
     axis2_char_t *sql_find = 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";
     return (axutil_array_list_t *) sandesha2_next_msg_mgr_find(
@@ -455,9 +423,8 @@
     axis2_char_t *internal_seq_id = NULL;
     axis2_char_t *temp_internal_seq_id = NULL;
     sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-         "[sandesha2] Entry:sandesha2_permanent_next_msg_mgr_match");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+         "[sandesha2]Entry:sandesha2_permanent_next_msg_mgr_match");
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
     next_msg_no = sandesha2_next_msg_bean_get_next_msg_no_to_process(
         (sandesha2_next_msg_bean_t *) bean, env);
@@ -481,9 +448,8 @@
     {
         equal = AXIS2_FALSE;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_match:equal:%d", 
-            equal);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+        "[sandesha2]Exit:sandesha2_permanent_next_msg_mgr_match");
     return equal;
 }
 

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=600451&r1=600450&r2=600451&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 Mon Dec  3 01:04:52 2007
@@ -156,19 +156,6 @@
     return 0;
 }
 
-static int 
-sandesha2_sender_count_callback(
-    void *not_used, 
-    int argc, 
-    char **argv, 
-    char **col_name)
-{
-    int *count = (int *) not_used;
-    *count = AXIS2_ATOI(argv[0]);
-    return 0;
-}
-
-
 void AXIS2_CALL
 sandesha2_permanent_sender_mgr_free(
     sandesha2_sender_mgr_t *sender_mgr,
@@ -287,11 +274,12 @@
     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;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_sender_mgr_insert");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) bean, 
         env);
     axis2_char_t *msg_ctx_ref_key = sandesha2_sender_bean_get_msg_ctx_ref_key(bean, env);
@@ -306,23 +294,8 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2]Entry:sandesha2_permanent_sender_mgr_insert");
-    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',"\
@@ -331,10 +304,9 @@
         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);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2]Exit:sandesha2_permanent_sender_mgr_insert:return:%d", ret);
+        "[sandesha2]Exit:sandesha2_permanent_sender_mgr_insert");
     return ret;
 }
 
@@ -344,7 +316,6 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
@@ -352,14 +323,10 @@
     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);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Exit:sandesha2_permanent_sender_mgr_remove");
     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
@@ -396,11 +363,13 @@
     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;
 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_sender_mgr_update");
+    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     axis2_char_t *msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) bean, 
         env);
     axis2_char_t *msg_ctx_ref_key = sandesha2_sender_bean_get_msg_ctx_ref_key(bean, env);
@@ -415,16 +384,8 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2]Entry:sandesha2_permanent_sender_mgr_update");
-    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'"\
@@ -433,10 +394,10 @@
         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);
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2]Exit:sandesha2_permanent_invoker_mgr_update:return:%d", ret);
+        "[sandesha2]Exit:sandesha2_permanent_invoker_mgr_update");
     return ret;
 
     return AXIS2_SUCCESS;
@@ -449,7 +410,6 @@
     axis2_char_t *internal_seq_id)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_sender_bean_t *bean = NULL;
     axutil_array_list_t *ret = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
@@ -463,10 +423,9 @@
     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);
+        sql_find);
     if(bean)
         sandesha2_sender_bean_free((sandesha2_rm_bean_t *) bean, env);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
@@ -481,7 +440,6 @@
     sandesha2_sender_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
     axutil_array_list_t *ret = NULL;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
@@ -490,10 +448,9 @@
     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);
+        sql_find);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
         "[sandesha2]Exit:sandesha2_permanent_sender_mgr_find_by_sender_bean");
     return ret;
@@ -506,18 +463,15 @@
     sandesha2_sender_bean_t *bean)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
     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, "\
         "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;";
     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
@@ -627,7 +581,6 @@
     const axis2_char_t *seq_id)
 {
     axis2_char_t *sql_find = NULL;
-    axis2_char_t *sql_count = NULL;
     sandesha2_sender_bean_t *matcher = sandesha2_sender_bean_create(env);
     long time_now = 0;
     int i = 0, size = 0;
@@ -647,10 +600,9 @@
         "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;";
     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);
+        sql_find);
 
     /*
      * We either return an application message or an RM message. If we find

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c?rev=600451&r1=600450&r2=600451&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c Mon Dec  3 01:04:52 2007
@@ -117,19 +117,6 @@
     return 0;
 }
 
-static int 
-sandesha2_seq_property_count_callback(
-    void *not_used, 
-    int argc, 
-    char **argv, 
-    char **col_name)
-{
-    int *count = (int *) not_used;
-    *count = AXIS2_ATOI(argv[0]);
-    return 0;
-}
-
-
 void AXIS2_CALL
 sandesha2_permanent_seq_property_mgr_free(
     sandesha2_seq_property_mgr_t *seq_prop_mgr,
@@ -215,7 +202,6 @@
     axis2_conf_ctx_t *ctx)
 {
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     seq_prop_mgr_impl = AXIS2_MALLOC(env->allocator, 
         sizeof(sandesha2_permanent_seq_property_mgr_t));
 
@@ -259,33 +245,25 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_insert");
+    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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "Entry:[sandesha2]sandesha2_permanent_seq_property_mgr_insert");
-    AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
 
-    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);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "Exit:[sandesha2]sandesha2_permanent_seq_property_mgr_insert:return%d", 
-            ret);
+        "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_insert");
     return ret;
 }
 
@@ -298,26 +276,22 @@
 {
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_seq_property_mgr_remove");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_remove");
 
-    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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_seq_property_mgr_remove");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_remove");
     return status;
 }
 
@@ -333,9 +307,8 @@
     sandesha2_seq_property_bean_t *ret = NULL;
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_seq_property_mgr_retrieve");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_retrieve");
     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);
@@ -347,8 +320,8 @@
         seq_prop_mgr_impl->bean_mgr, env, sandesha2_seq_property_retrieve_callback, 
         sql_retrieve);
     AXIS2_FREE(env->allocator, key);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_seq_property_mgr_retrieve");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_retrieve");
     return ret;
 }
 
@@ -359,30 +332,25 @@
     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_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_update");
+    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_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "Entry:[sandesha2]sandesha2_permanent_seq_property_mgr_update");
-    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);
 
-    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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "Exit:[sandesha2]sandesha2_permanent_seq_property_mgr_update:return:%d", ret);
+        sql_update);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_update");
     return ret;
 }
 
@@ -393,20 +361,17 @@
     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_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_seq_property_mgr_find");
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_find");
     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);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_seq_property_mgr_find");
+        sql_find);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_find");
     return ret;
 }
 
@@ -417,17 +382,14 @@
     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;
-    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";
-    sql_count = "select count(*) as no_recs from seq_property";
     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
@@ -445,8 +407,8 @@
     axis2_char_t *value = NULL;
     axis2_char_t *temp_value = NULL;
     
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_permanent_seq_property_mgr_match");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Entry:sandesha2_permanent_seq_property_mgr_match");
     seq_id = sandesha2_seq_property_bean_get_seq_id(
         (sandesha2_seq_property_bean_t *) bean, env);
     temp_seq_id = sandesha2_seq_property_bean_get_seq_id(
@@ -471,9 +433,8 @@
     {
         equal = AXIS2_FALSE;
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_permanent_seq_property_mgr_match:equal:%d", 
-            equal);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2]Exit:sandesha2_permanent_seq_property_mgr_match");
     return equal;
 }
 
@@ -483,7 +444,6 @@
     const axutil_env_t *env)
 {
     sandesha2_permanent_seq_property_mgr_t *seq_prop_mgr_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     seq_prop_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_prop_mgr);
     return sandesha2_seq_property_mgr_find(seq_prop_mgr, env, NULL);
 }

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/sandesha2_permanent_bean_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/sandesha2_permanent_bean_mgr.h?rev=600451&r1=600450&r2=600451&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/sandesha2_permanent_bean_mgr.h (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/sandesha2_permanent_bean_mgr.h Mon Dec  3 01:04:52 2007
@@ -92,18 +92,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)(void *, int, char **, char **),
-    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)(void *, int, char **, char **),
-    axis2_char_t *sql_stmt_retrieve,
     axis2_char_t *sql_stmt_remove);
 
 sandesha2_rm_bean_t *AXIS2_CALL
@@ -117,9 +111,6 @@
 sandesha2_permanent_bean_mgr_update(
     sandesha2_permanent_bean_mgr_t *bean_mgr,
     const axutil_env_t *env,
-    sandesha2_rm_bean_t *bean,
-    int (*update_func)(void *, int, char **, char **),
-    axis2_char_t *sql_stmt_retrieve_old_bean,
     axis2_char_t *sql_stmt_update);
 
 axutil_array_list_t *AXIS2_CALL
@@ -128,9 +119,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(void *, int, char **, char **),
-    int (*count_func)(void *, int, char **, char **),
-    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(
@@ -138,9 +127,7 @@
     const axutil_env_t *env,
     sandesha2_rm_bean_t *bean,
     int (*find_func)(void *, int, char **, char **),
-    int (*count_func)(void *, int, char **, char **),
-    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(



---------------------------------------------------------------------
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