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

svn commit: r603904 - in /webservices/sandesha/trunk/c: config/module.xml include/sandesha2_permanent_storage_mgr.h src/core/mod_sandesha2.c src/storage/sqlite/permanent_bean_mgr.c src/storage/sqlite/permanent_storage_mgr.c

Author: damitha
Date: Thu Dec 13 04:22:59 2007
New Revision: 603904

URL: http://svn.apache.org/viewvc?rev=603904&view=rev
Log:
it is now working with apache.

Modified:
    webservices/sandesha/trunk/c/config/module.xml
    webservices/sandesha/trunk/c/include/sandesha2_permanent_storage_mgr.h
    webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c

Modified: webservices/sandesha/trunk/c/config/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?rev=603904&r1=603903&r2=603904&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Thu Dec 13 04:22:59 2007
@@ -70,7 +70,7 @@
     </operation>
 
    <!-- Database connection parameters -->
-   <parameter name="sandesha2_db" locked="false">/tmp</parameter>
+   <!--parameter name="sandesha2_db" locked="false">/tmp</parameter-->
    <parameter name="db_server" locked="false">localhost</parameter>
    <parameter name="db_user" locked="false">g</parameter>
    <parameter name="db_password" locked="false">g</parameter>

Modified: webservices/sandesha/trunk/c/include/sandesha2_permanent_storage_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_permanent_storage_mgr.h?rev=603904&r1=603903&r2=603904&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_permanent_storage_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_permanent_storage_mgr.h Thu Dec 13 04:22:59 2007
@@ -92,6 +92,10 @@
     axis2_conf_ctx_t *conf_ctx,
     const axis2_bool_t persistent);
 
+axis2_status_t AXIS2_CALL
+sandesha2_permanent_storage_mgr_create_db(
+    sandesha2_storage_mgr_t *storage_mgr,
+    const axutil_env_t *env);
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/mod_sandesha2.c?rev=603904&r1=603903&r2=603904&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/core/mod_sandesha2.c (original)
+++ webservices/sandesha/trunk/c/src/core/mod_sandesha2.c Thu Dec 13 04:22:59 2007
@@ -101,8 +101,11 @@
     /*storage_mgr = sandesha2_utils_get_inmemory_storage_mgr(env, conf_ctx);
     sandesha2_storage_mgr_init_storage(storage_mgr, env, module_desc);*/
     
-    /*sandesha2_storage_mgr_t *storage_mgr = sandesha2_utils_get_permanent_storage_mgr(env, conf_ctx);
-    sandesha2_storage_mgr_init_storage(storage_mgr, env, module_desc);*/
+    sandesha2_storage_mgr_t *storage_mgr = sandesha2_utils_get_permanent_storage_mgr(env, conf_ctx);
+    sandesha2_storage_mgr_init_storage(storage_mgr, env, module_desc);
+    /*if(!sandesha2_permanent_storage_mgr_create_db(
+        storage_mgr, env))
+        return AXIS2_FAILURE;*/
     
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
         "[sandesha2]Module initializing completed");

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=603904&r1=603903&r2=603904&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c Thu Dec 13 04:22:59 2007
@@ -1038,6 +1038,13 @@
         sqlite3_close(dbconn);
         return NULL;
     }
+#if !defined(WIN32)
+    {
+        axis2_char_t permission_str[256];
+        sprintf(permission_str, "chmod 777 %s", dbname); 
+        system(permission_str);
+    }
+#endif
     return dbconn;
 }
 

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=603904&r1=603903&r2=603904&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Thu Dec 13 04:22:59 2007
@@ -214,10 +214,10 @@
     const axutil_env_t *env,
     axis2_msg_ctx_t *msg_ctx);
 
-static axis2_status_t AXIS2_CALL
+/*axis2_status_t AXIS2_CALL
 sandesha2_permanent_storage_mgr_create_db(
     sandesha2_storage_mgr_t *storage_mgr,
-    const axutil_env_t *env);
+    const axutil_env_t *env);*/
 
 static const sandesha2_storage_mgr_ops_t storage_mgr_ops = 
 {
@@ -1167,7 +1167,7 @@
     return storage_mgr_impl->mutex;
 }
 
-static axis2_status_t AXIS2_CALL
+axis2_status_t AXIS2_CALL
 sandesha2_permanent_storage_mgr_create_db(
     sandesha2_storage_mgr_t *storage_mgr,
     const axutil_env_t *env)
@@ -1187,26 +1187,26 @@
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
     dbconn = sandesha2_permanent_bean_mgr_get_dbconn(storage_mgr_impl->bean_mgr, 
         env);
-    sql_stmt1 = "create table if not exists create_seq("\
+    sql_stmt1 = "create table create_seq("\
         "create_seq_msg_id varchar(100) primary key, "\
         "internal_seq_id varchar(200), seq_id varchar(200), "\
         "create_seq_msg_store_key varchar(100), ref_msg_store_key varchar(100))";
-    sql_stmt2 = "create table if not exists invoker("\
+    sql_stmt2 = "create table invoker("\
         "msg_ctx_ref_key varchar(100) primary key,"\
         "msg_no long, seq_id varchar(200), is_invoked boolean)";
-    sql_stmt3 = "create table if not exists sender("\
+    sql_stmt3 = "create table sender("\
         "msg_id varchar(100) primary key, msg_ctx_ref_key varchar(100), "\
         "internal_seq_id varchar(200), sent_count int, msg_no long, "\
         "send boolean, resend boolean, time_to_send long, msg_type int, "\
         "seq_id varchar(200), wsrm_anon_uri varchar(100), "\
         "to_address varchar(100))";
-    sql_stmt4 = "create table if not exists next_msg("\
+    sql_stmt4 = "create table next_msg("\
         "seq_id varchar(200) primary key, internal_seq_id varchar(200), "\
         "ref_msg_key varchar(100), "\
         "polling_mode boolean, msg_no long)";
-    sql_stmt5 = "create table if not exists seq_property(id varchar(200) ,"\
+    sql_stmt5 = "create table seq_property(id varchar(200) ,"\
         "seq_id varchar(200), name varchar(200), value varchar(200))";
-    sql_stmt6 = "create table if not exists msg("\
+    sql_stmt6 = "create table msg("\
         "stored_key varchar(200) primary key, msg_id varchar(200), "\
         "soap_env_str text, soap_version int, transport_out varchar(100), "\
         "op varchar(100), svc varchar(100), svc_grp varchar(100), "\
@@ -1215,7 +1215,7 @@
         "flow int, msg_recv_str varchar(200), svr_side boolean, "\
         "in_msg_store_key varchar(200), prop_str varchar(8192), "\
         "action varchar(200))";
-    sql_stmt7 = "create table if not exists response(seq_id varchar(200), "\
+    sql_stmt7 = "create table response(seq_id varchar(200), "\
         "response_str text, msg_no int, soap_version int)";
     if(dbconn)
     {
@@ -1227,7 +1227,7 @@
                 "SQL Error: %s", error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         rc = sqlite3_exec(dbconn, sql_stmt2, NULL, 0, &error_msg);
         if( rc != SQLITE_OK )
@@ -1237,7 +1237,7 @@
                 error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         rc = sqlite3_exec(dbconn, sql_stmt3, NULL, 0, &error_msg);
         if( rc != SQLITE_OK )
@@ -1247,7 +1247,7 @@
                 error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         rc = sqlite3_exec(dbconn, sql_stmt4, NULL, 0, &error_msg);
         if( rc != SQLITE_OK )
@@ -1257,7 +1257,7 @@
                 error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         rc = sqlite3_exec(dbconn, sql_stmt5, NULL, 0, &error_msg);
         if( rc != SQLITE_OK )
@@ -1268,7 +1268,7 @@
                 error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         rc = sqlite3_exec(dbconn, sql_stmt6, NULL, 0, &error_msg);
         if( rc != SQLITE_OK )
@@ -1278,7 +1278,7 @@
                 error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         rc = sqlite3_exec(dbconn, sql_stmt7, NULL, 0, &error_msg);
         if( rc != SQLITE_OK )
@@ -1288,7 +1288,7 @@
                 error_msg);
             sqlite3_free(error_msg);
             sqlite3_close(dbconn);
-            return AXIS2_FAILURE;
+            /*return AXIS2_FAILURE;*/
         }
         sqlite3_close(dbconn);
     }



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