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

svn commit: r595236 - in /webservices/sandesha/trunk/c/src/storage/sqlite: permanent_bean_mgr.c permanent_storage_mgr.c permanent_transaction.c

Author: damitha
Date: Thu Nov 15 00:37:34 2007
New Revision: 595236

URL: http://svn.apache.org/viewvc?rev=595236&view=rev
Log:
adding function entry functions

Modified:
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c

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=595236&r1=595235&r2=595236&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c Thu Nov 15 00:37:34 2007
@@ -244,7 +244,6 @@
     int rc = -1;
     sqlite3 *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);
@@ -289,7 +288,6 @@
     sandesha2_rm_bean_t *bean = NULL;
     sqlite3 *dbconn = NULL;
     int rc = -1;
-    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(
@@ -362,7 +360,6 @@
     sandesha2_rm_bean_t *bean = NULL;
     sqlite3 *dbconn = NULL;
     int rc = -1;
-    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(
@@ -439,7 +436,6 @@
     sqlite3 *dbconn = NULL;
     axis2_char_t *error_msg = 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);
@@ -488,7 +484,6 @@
     sqlite3 *dbconn = NULL;
     axutil_array_list_t *data_array = NULL;
     axis2_char_t *error_msg = 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)
@@ -610,7 +605,6 @@
     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, 
@@ -642,7 +636,6 @@
     int rc = -1;
     sqlite3 *dbconn = NULL;
     axis2_char_t sql_stmt_retrieve[512];
-    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(
@@ -742,7 +735,7 @@
 	prop_str = sandesha2_msg_store_bean_get_persistent_property_str(bean, env);
 	action = sandesha2_msg_store_bean_get_action(bean, env);
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Entry:sandesha2_permanent_bean_mgr_insert_msg_store_bean");
     sql_size = axutil_strlen(msg_id) + axutil_strlen(stored_key) + 
         axutil_strlen(soap_env_str) + sizeof(int) + sizeof(int) + 
@@ -849,7 +842,7 @@
     }
     AXIS2_FREE(env->allocator, sql_stmt_insert);
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Exit:sandesha2_permanent_bean_mgr_insert_msg_store_bean");
     return AXIS2_TRUE;
 }
@@ -865,7 +858,7 @@
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     sqlite3 *dbconn = NULL;
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    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);
@@ -894,7 +887,7 @@
         return AXIS2_FALSE;
     }
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Exit:sandesha2_permanent_bean_mgr_remove_msg_store_bean");
     return AXIS2_TRUE;
 }
@@ -919,7 +912,7 @@
     int count = -1;
 
 	bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2]Start:sandesha2_permanent_bean_mgr_store_response");
     sql_size = axutil_strlen(seq_id) + axutil_strlen(response) + 
         sizeof(int) + sizeof(int) + 512;
@@ -1001,7 +994,7 @@
         AXIS2_FREE(env->allocator, sql_stmt_insert);
         axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Exit:sandesha2_permanent_bean_mgr_store_response");
     return AXIS2_TRUE;
 }
@@ -1018,7 +1011,7 @@
     axis2_char_t *error_msg = NULL;
     int rc = -1;
     sqlite3 *dbconn = NULL;
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    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);
@@ -1048,7 +1041,7 @@
         return AXIS2_FALSE;
     }
     axutil_thread_mutex_unlock(bean_mgr_impl->mutex);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
         "[sandesha2] Exit:sandesha2_permanent_bean_mgr_remove_response");
     return AXIS2_TRUE;
 }
@@ -1066,7 +1059,6 @@
     int rc = -1;
     sqlite3 *dbconn = NULL;
     axis2_char_t sql_stmt_retrieve[512];
-    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(
@@ -1113,23 +1105,21 @@
     axutil_thread_mutex_t *mutex)
 {
     int counter = 0;
-    printf("in busy handler1\n");
-    while(rc == SQLITE_BUSY && counter < 5)
+    while(rc == SQLITE_BUSY && counter < 10)
     {
         printf("in busy handler %s\n", *error_msg);
+        printf("sql: %s\n", sql_stmt);
         if(*error_msg)
              sqlite3_free(*error_msg);
         counter++;
-        /*AXIS2_SLEEP(SANDESHA2_BUSY_WAIT_TIME);*/
         /* When this method is invoked, the mutex must have been locked,
            so unlock before going to sleep */
         axutil_thread_mutex_unlock(mutex);
-        AXIS2_USLEEP(1000000);
+        AXIS2_USLEEP(1000000000);
         /* Sleeping is over, lock again */
         axutil_thread_mutex_lock(mutex);
         rc = sqlite3_exec(dbconn, sql_stmt, callback_func, args, error_msg);
     }
-    printf("in busy handler2\n");
     return rc;
 }
 

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=595236&r1=595235&r2=595236&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Thu Nov 15 00:37:34 2007
@@ -1278,7 +1278,7 @@
     int rc = -1;
     sqlite3 *dbconn = NULL;
     axis2_ctx_t *conf_ctx_base = NULL; 
-    axutil_property_t *property = NULL;
+    /*axutil_property_t *property = NULL;*/
     axis2_char_t *db_name = NULL;
     axis2_char_t *sql_stmt1 = NULL;
     axis2_char_t *sql_stmt2 = NULL;
@@ -1307,20 +1307,20 @@
         axutil_qname_free(qname, env);
     }
     conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
-    property = axis2_ctx_get_property(conf_ctx_base, env,
+    /*property = axis2_ctx_get_property(conf_ctx_base, env,
         AXIS2_IS_SVR_SIDE);
     if(property && 0 == axutil_strcmp(AXIS2_VALUE_TRUE, 
-        axutil_property_get_value(property, env)))
+        axutil_property_get_value(property, env)))*/
     {
         db_name = axutil_strcat(env, path, AXIS2_PATH_SEP_STR,
             "sandesha2_svr_db", NULL);
     }
-    else if(property && 0 == axutil_strcmp(AXIS2_VALUE_FALSE, 
+    /*else if(property && 0 == axutil_strcmp(AXIS2_VALUE_FALSE, 
         axutil_property_get_value(property, env)))
     {
         db_name = axutil_strcat(env, path, AXIS2_PATH_SEP_STR,
             "sandesha2_client_db", NULL);
-    }
+    }*/
     rc = sqlite3_open(db_name, &dbconn);
     if(rc != SQLITE_OK)
     {

Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c?rev=595236&r1=595235&r2=595236&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c Thu Nov 15 00:37:34 2007
@@ -102,7 +102,7 @@
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_conf_t *conf = NULL;
     axis2_ctx_t *conf_ctx_base = NULL; 
-    axutil_property_t *property = NULL;
+    /*axutil_property_t *property = NULL;*/
 
     trans_impl =  (sandesha2_permanent_transaction_impl_t *)AXIS2_MALLOC 
         (env->allocator, sizeof(sandesha2_permanent_transaction_impl_t));
@@ -139,18 +139,18 @@
         axutil_qname_free(qname, env);
     }
     conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
-    property = axis2_ctx_get_property(conf_ctx_base, env, 
+    /*property = axis2_ctx_get_property(conf_ctx_base, env, 
         SANDESHA2_IS_SVR_SIDE);
-    if(!property)
+    if(!property)*/
     {
         db_name = axutil_strcat(env, path, AXIS2_PATH_SEP_STR, 
             "sandesha2_svr_db", NULL);
     }
-    else
+    /*else
     {
         db_name = axutil_strcat(env, path, AXIS2_PATH_SEP_STR, 
             "sandesha2_client_db", NULL);
-    }
+    }*/
     rc = sqlite3_open(db_name, &(trans_impl->dbconn));
     if(rc != SQLITE_OK)
     {



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