ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r597306 - in /webservices/sandesha/trunk/c: config/ samples/rm_echo_1_1/ samples/rm_echo_single_1_1/ src/msgprocessors/ src/storage/mysql/ src/storage/sqlite/ src/util/ src/workers/
Date Thu, 22 Nov 2007 06:01:32 GMT
Author: damitha
Date: Wed Nov 21 22:01:30 2007
New Revision: 597306

URL: http://svn.apache.org/viewvc?rev=597306&view=rev
Log:
Format log messages

Modified:
    webservices/sandesha/trunk/c/config/mysql_schema.sh
    webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c
    webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
    webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c
    webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/config/mysql_schema.sh
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/mysql_schema.sh?rev=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/config/mysql_schema.sh (original)
+++ webservices/sandesha/trunk/c/config/mysql_schema.sh Wed Nov 21 22:01:30 2007
@@ -1,8 +1,31 @@
 #!/bin/bash
-drop database IF EXISTS sandesha2_db;
-create database sandesha2_db;
+drop database IF EXISTS sandesha2_svr_db;
+drop database IF EXISTS sandesha2_client_db;
+create database sandesha2_svr_db;
+create database sandesha2_client_db;
 
-connect sandesha2_db;
+connect sandesha2_svr_db;
+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)) engine=InnoDB;
+create table invoker(msg_ctx_ref_key varchar(100) primary key, 
+    msg_no long, seq_id varchar(200), is_invoked boolean) engine=InnoDB;
+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)) engine=InnoDB;
+create table next_msg(seq_id varchar(200) primary key, 
+    ref_msg_key varchar(100), polling_mode boolean, msg_no long) engine=InnoDB;
+create table seq_property(id varchar(200) , 
+    seq_id varchar(200), name varchar(200), value varchar(200)) engine=InnoDB;
+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), op_mep varchar(100), to_url
varchar(200),
+    reply_to varchar(200), transport_to varchar(200), execution_chain_str varchar(200), flow
int, 
+    msg_recv_str varchar(200), svr_side boolean, in_msg_store_key varchar(200), prop_str
varchar(8192), 
+    action varchar(200)) engine=InnoDB;
+
+connect sandesha2_client_db;
 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)) engine=InnoDB;

Modified: webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c?rev=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c Wed Nov 21 22:01:30 2007
@@ -73,7 +73,7 @@
     axutil_property_t *property = NULL;
     axis2_listener_manager_t *listener_manager = NULL;
     axis2_char_t *offered_seq_id = NULL;
-    axis2_bool_t offer = AXIS2_FALSE;
+    axis2_bool_t offer = AXIS2_TRUE;
     axis2_char_t *seq_key = NULL;
     int c;
    

Modified: webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c?rev=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c Wed Nov 21
22:01:30 2007
@@ -176,7 +176,7 @@
             property);
     }
     
-    /*payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
+    payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
     status = axis2_svc_client_send_robust(svc_client, env, payload);
     if(status)
         printf("\necho client single channel invoke SUCCESSFUL!\n");
@@ -189,19 +189,19 @@
         printf("\necho client single channel invoke SUCCESSFUL!\n");
     payload = NULL;
     AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
-*/
+
     payload = build_om_payload_for_echo_svc(env, "echo3", "sequence1");
     status = axis2_svc_client_send_robust(svc_client, env, payload);
     if(status)
         printf("\necho client single channel invoke SUCCESSFUL!\n");
     payload = NULL;
-    AXIS2_SLEEP(2 * SANDESHA2_MAX_COUNT);
+    AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
 
     sandesha2_client_terminate_seq_with_svc_client_and_seq_key(env, svc_client, 
         "sequence1");
     /*sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback4, 
         listener_manager);*/
-    AXIS2_SLEEP(4 * SANDESHA2_MAX_COUNT);
+    AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
     if (svc_client)
     {
         /*axis2_svc_client_free(svc_client, env);*/

Modified: webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c?rev=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c Wed Nov
21 22:01:30 2007
@@ -237,16 +237,16 @@
         create_seq_msg_id);
     if(!create_seq_bean)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create Sequence "
-            "entry is not found");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create Sequence "\
+            "entry not found");
         return AXIS2_FAILURE;
     }
     int_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(create_seq_bean,
         env);
     if(!int_seq_id)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] temp_sequence_id"
-            " has is not set");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] internal "\
+            "sequence id is not set");
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_FIND_SEQ_ID,
             AXIS2_FAILURE);
         return AXIS2_FAILURE;
@@ -258,8 +258,8 @@
                         env, create_seq_msg_id);
     if(!create_seq_sender_bean)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create sequence"
-                        " entry is not found");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create sequence"\
+            " entry not found");
         return AXIS2_FAILURE;
     }
     create_seq_storage_key = sandesha2_sender_bean_get_msg_ctx_ref_key(
@@ -303,8 +303,8 @@
                         int_seq_id, SANDESHA2_SEQ_PROP_OFFERED_SEQ);
         if(!offerd_seq_bean)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] No offered"
-                        " sequence entry. But an accept was received");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] No offered"\
+                " sequence entry. But an accept was received");
             return AXIS2_FAILURE;
         }
         offered_seq_id = sandesha2_seq_property_bean_get_value(offerd_seq_bean,
@@ -412,15 +412,15 @@
             key, conf_ctx, AXIS2_FALSE);
         if(!app_msg_ctx)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Unavailable"
-                        " application message");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Unavailable"\
+                " application message");
             return AXIS2_FAILURE;
         }
         rm_ver = sandesha2_utils_get_rm_version(env, int_seq_id, storage_mgr);
         if(!rm_ver)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cant find the"
-                        " rm_ver of the given message");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cant find "\
+                " then rm_ver of the given message");
             return AXIS2_FAILURE;
         }
         assumed_rm_ns = sandesha2_spec_specific_consts_get_rm_ns_val(env,
@@ -430,8 +430,8 @@
                         app_rm_msg, env, SANDESHA2_MSG_PART_SEQ);
         if(!seq_part)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence part"
-                        " is null");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence "\
+                "part is null");
             return AXIS2_FAILURE;
         }
         ident = sandesha2_identifier_create(env, assumed_rm_ns);
@@ -456,8 +456,8 @@
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
     axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
     sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,  
-            "[sandesha2] Exit: sandesha2_create_seq_res_msg_processor_process_in_msg");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
+        "[sandesha2] Exit: sandesha2_create_seq_res_msg_processor_process_in_msg");
     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=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c Wed Nov 21 22:01:30
2007
@@ -99,12 +99,12 @@
     axis2_char_t *user = NULL;
     axis2_char_t *password = NULL;
     axis2_char_t *path = NULL;
-    /*int rc = -1;*/
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_conf_t *conf = NULL;
-    sandesha2_property_bean_t *prop_bean = NULL;
-    axis2_module_desc_t *module_desc = NULL;
-    axutil_qname_t *qname = NULL;
+    axis2_ctx_t *conf_ctx_base = NULL; 
+    axutil_property_t *property = NULL;
+    axis2_char_t *db_name = NULL;
+    /*int rc = -1;*/
 
     AXIS2_ENV_CHECK(env, NULL);
     
@@ -124,44 +124,57 @@
         conf = axis2_conf_ctx_get_conf((const axis2_conf_ctx_t *) conf_ctx, env);
     else
         return NULL;
-    prop_bean = (sandesha2_property_bean_t *)sandesha2_utils_get_property_bean(
-        env, conf);
-    qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
-    module_desc = axis2_conf_get_module(conf, env, qname);
-    if(module_desc)
     {
+        axis2_module_desc_t *module_desc = NULL;
+        axutil_qname_t *qname = NULL;
+        qname = axutil_qname_create(env, "sandesha2", NULL, NULL);
         axutil_param_t *db_path = NULL;
         axutil_param_t *db_server = NULL;
         axutil_param_t *db_user = NULL;
         axutil_param_t *db_password = NULL;
-        db_path = axis2_module_desc_get_param(module_desc, env, SANDESHA2_DB);
-        if(db_path)
-        {
-            path = (axis2_char_t *) axutil_param_get_value(db_path, env);
-        }
-        db_server = axis2_module_desc_get_param(module_desc, env, 
-            SANDESHA2_DB_SERVER);
-        if(db_server)
+        module_desc = axis2_conf_get_module(conf, env, qname);
+        if(module_desc)
         {
-            server = (axis2_char_t *) axutil_param_get_value(db_server, env);
-        }
-        db_user = axis2_module_desc_get_param(module_desc, env, 
-            SANDESHA2_DB_USER);
-        if(db_user)
-        {
-            user = (axis2_char_t *) axutil_param_get_value(db_user, env);
-        }
-        db_password = axis2_module_desc_get_param(module_desc, env, 
-            SANDESHA2_DB_PASSWORD);
-        if(db_password)
-        {
-            password = (axis2_char_t *) axutil_param_get_value(db_password, env);
+            db_path = axis2_module_desc_get_param(module_desc, env, SANDESHA2_DB);
+            if(db_path)
+            {
+                path = (axis2_char_t *) axutil_param_get_value(db_path, env);
+            }
+            db_server = axis2_module_desc_get_param(module_desc, env, 
+                SANDESHA2_DB_SERVER);
+            if(db_server)
+            {
+                server = (axis2_char_t *) axutil_param_get_value(db_server, env);
+            }
+            db_user = axis2_module_desc_get_param(module_desc, env, 
+                SANDESHA2_DB_USER);
+            if(db_user)
+            {
+                user = (axis2_char_t *) axutil_param_get_value(db_user, env);
+            }
+            db_password = axis2_module_desc_get_param(module_desc, env, 
+                SANDESHA2_DB_PASSWORD);
+            if(db_password)
+            {
+                password = (axis2_char_t *) axutil_param_get_value(db_password, env);
+            }
         }
+        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, 
+        SANDESHA2_IS_SVR_SIDE);
+    if(!property)
+    {
+        db_name = "sandesha2_svr_db";
+    }
+    else
+    {
+        db_name = "sandesha2_client_db";
     }
-    axutil_qname_free(qname, env);
     trans_impl->dbconn = mysql_init(trans_impl->dbconn);
     if (!mysql_real_connect(trans_impl->dbconn, server,
-         user, password, SANDESHA2_DB, 0, NULL, 0))
+         user, password, db_name, 0, NULL, 0))
     {
         mysql_close(trans_impl->dbconn);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Can't open database: %s\n", 

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=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_transaction.c Wed Nov 21 22:01:30
2007
@@ -96,11 +96,7 @@
 {
     sandesha2_permanent_transaction_impl_t *trans_impl = NULL;
     /*axis2_char_t *error_msg = NULL;*/
-#ifdef WIN32
     axis2_char_t *path = "./";
-#else
-    axis2_char_t *path = "/tmp";
-#endif
     axis2_char_t *db_name = NULL;
     int rc = -1;
     axis2_conf_ctx_t *conf_ctx = NULL;
@@ -139,8 +135,7 @@
         }
         axutil_qname_free(qname, env);
     }
-    db_name = axutil_strcat(env, path, AXIS2_PATH_SEP_STR, 
-        "sandesha2_db", NULL);
+    db_name = axutil_strcat(env, path, AXIS2_PATH_SEP_STR, SANDESHA2_DB, NULL);
     rc = sqlite3_open(db_name, &(trans_impl->dbconn));
     if(rc != SQLITE_OK)
     {

Modified: webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/sandesha2_utils.c?rev=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Wed Nov 21 22:01:30 2007
@@ -615,8 +615,6 @@
 {
     axis2_char_t *ret = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     if(!to && !seq_key)
     {
         return NULL;
@@ -627,7 +625,11 @@
     }
     else if(!seq_key)
     {
-        return axutil_strdup(env, to);
+        seq_key = axutil_uuid_gen(env);
+        ret = axutil_strcat(env, SANDESHA2_INTERNAL_SEQ_PREFIX, ":", seq_key, 
+            NULL);
+        return ret;
+        /*return axutil_strdup(env, to);*/
     }
     else
     {

Modified: webservices/sandesha/trunk/c/src/workers/sender_worker.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?rev=597306&r1=597305&r2=597306&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Wed Nov 21 22:01:30 2007
@@ -309,8 +309,8 @@
     if(!msg_ctx)
     {
         sandesha2_transaction_rollback(transaction, env);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] msg_ctx is "
-                    "not present in the store");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] msg_ctx is "\
+            "not present in the store");
         #ifdef AXIS2_SVR_MULTI_THREADED
             AXIS2_THREAD_POOL_EXIT_THREAD(env->thread_pool, thd);
         #endif



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