Author: damitha
Date: Sat Jan 20 23:03:45 2007
New Revision: 498251

URL: http://svn.apache.org/viewvc?view=rev&rev=498251
Log:
rm_ping is now running with apache2

Modified:
    webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
    webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c
    webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
    
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
    webservices/sandesha/trunk/c/src/polling/polling_mgr.c
    webservices/sandesha/trunk/c/src/storage/permanent/permanent_storage_mgr.c

Modified: webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c?view=diff&rev=498251&r1=498250&r2=498251
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c Sat Jan 20 
23:03:45 2007
@@ -236,7 +236,7 @@
     sandesha2_client_send_non_blocking(env, svc_client, options, NULL, 
callback3, payload, 
             listener_manager);
     wait_on_callback(env, callback3);
-    AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
+    AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
     /* RM Version 1.1 */
     if(version == 1)
     {

Modified: webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c?view=diff&rev=498251&r1=498250&r2=498251
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c Sat Jan 20 
23:03:45 2007
@@ -165,7 +165,8 @@
      /** Wait till callback is complete. Simply keep the parent thread running
        until our on_complete or on_error is invoked */
 
-    AXIS2_SLEEP(MAX_COUNT);
+    /*AXIS2_SLEEP(MAX_COUNT);*/
+    AXIS2_SLEEP(120);
    
     if (svc_client)
     {

Modified: 
webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c?view=diff&rev=498251&r1=498250&r2=498251
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c 
(original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Sat 
Jan 20 23:03:45 2007
@@ -179,9 +179,9 @@
     {
         axis2_property_t *prop = NULL;
         
-        axis2_allocator_switch_to_global_pool(env->allocator);
+        /*axis2_allocator_switch_to_global_pool(env->allocator);*/
         transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
-        axis2_allocator_switch_to_local_pool(env->allocator);
+        /*axis2_allocator_switch_to_local_pool(env->allocator);*/
         prop = axis2_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
             AXIS2_FALSE, 0, SANDESHA2_VALUE_TRUE);
         AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop, 

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?view=diff&rev=498251&r1=498250&r2=498251
==============================================================================
--- 
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 
Sat Jan 20 23:03:45 2007
@@ -335,7 +335,6 @@
             if(reply_to_addr)
             {
                 polling_mode = sandesha2_utils_is_anon_uri(env, reply_to_addr);
-
             }
         }
         /* Storing the referenceMessage of the sending side sequence as the 
reference message
@@ -348,9 +347,8 @@
             ref_msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, 
                 env, ref_msg_store_key, conf_ctx);
         new_msg_store_key = axis2_uuid_gen(env);
-        sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, 
-            new_msg_store_key, ref_msg_ctx);
-        printf("new_msg_store_key:%s\n", new_msg_store_key);
+        sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, 
new_msg_store_key, 
+            ref_msg_ctx);
         sandesha2_next_msg_bean_set_ref_msg_key(next_bean, env, 
             new_msg_store_key);
         sandesha2_next_msg_bean_set_polling_mode(next_bean, env, polling_mode);

Modified: webservices/sandesha/trunk/c/src/polling/polling_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/polling/polling_mgr.c?view=diff&rev=498251&r1=498250&r2=498251
==============================================================================
--- webservices/sandesha/trunk/c/src/polling/polling_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/polling/polling_mgr.c Sat Jan 20 23:03:45 
2007
@@ -241,7 +241,9 @@
         axis2_endpoint_ref_t *to = NULL;
         axis2_property_t *property = NULL;
 
+        printf("came11\n");
         AXIS2_SLEEP(SANDESHA2_POLLING_MANAGER_WAIT_TIME);
+        printf("came12\n");
         next_msg_mgr = sandesha2_storage_mgr_get_next_msg_mgr(
                         storage_mgr, env);
          /* Geting the sequences to be polled. if schedule contains any 
requests, 
@@ -258,6 +260,7 @@
         }
         if(!seq_id)
         {
+            printf("came13\n");
             sandesha2_next_msg_bean_t *find_bean = 
                 sandesha2_next_msg_bean_create(env);
             int size = 0;
@@ -270,6 +273,7 @@
                     find_bean);
                 if(results)
                     size = AXIS2_ARRAY_LIST_SIZE(results, env);
+                printf("size:%d\n", size);
                 if(size > 0)
                 {
                     unsigned int rand_var = 
@@ -284,6 +288,7 @@
         }
         else
         {
+            printf("came14\n");
             sandesha2_next_msg_bean_t *find_bean = 
                 sandesha2_next_msg_bean_create(env);
             if(find_bean)
@@ -296,8 +301,10 @@
             }
         }
         /* If no valid entry is found, try again later */
+        printf("came15\n");
         if(!next_msg_bean)
             continue;
+        printf("came16\n");
         seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) 
             next_msg_bean, env);
         /* Create a MakeConnection message */
@@ -316,6 +323,7 @@
             ref_rm_msg_ctx, seq_id, wsrm_anon_reply_to_uri, storage_mgr);
         if(!make_conn_rm_msg_ctx)
         {
+            printf("came12\n");
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }

Modified: 
webservices/sandesha/trunk/c/src/storage/permanent/permanent_storage_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/permanent/permanent_storage_mgr.c?view=diff&rev=498251&r1=498250&r2=498251
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/permanent/permanent_storage_mgr.c 
(original)
+++ webservices/sandesha/trunk/c/src/storage/permanent/permanent_storage_mgr.c 
Sat Jan 20 23:03:45 2007
@@ -242,7 +242,9 @@
     storage_mgr_impl->SANDESHA2_MSG_MAP_KEY = 
AXIS2_STRDUP("Sandesha2MessageMap", 
         env);
     storage_mgr_impl->conf_ctx = conf_ctx;
+    axis2_allocator_switch_to_global_pool(env->allocator);
     storage_mgr_impl->transactions = axis2_hash_make(env);
+    axis2_allocator_switch_to_local_pool(env->allocator);
     storage_mgr_impl->bean_mgr = NULL;
     storage_mgr_impl->mutex = axis2_thread_mutex_create(env->allocator,
         AXIS2_THREAD_MUTEX_DEFAULT);
@@ -351,6 +353,7 @@
 
 
     axis2_thread_mutex_lock(storage_mgr_impl->mutex);
+    axis2_allocator_switch_to_global_pool(env->allocator);
     for (index = axis2_hash_first(storage_mgr_impl->transactions , env); 
index; 
         index = axis2_hash_next(env, index))
     {
@@ -376,6 +379,7 @@
         axis2_hash_set(storage_mgr_impl->transactions, thread_id_key, 
             AXIS2_HASH_KEY_STRING, transaction);
     }
+    axis2_allocator_switch_to_local_pool(env->allocator);
     axis2_thread_mutex_unlock(storage_mgr_impl->mutex);
     return transaction;
 }
@@ -387,7 +391,7 @@
     sandesha2_transaction_t *transaction)
 {
     sandesha2_permanent_storage_mgr_t *storage_mgr_impl = NULL;
-    unsigned long int thread_id = NULL;
+    unsigned long int thread_id = -1;
     axis2_char_t *thread_id_key = AXIS2_MALLOC(env->allocator, 128);
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
 
@@ -395,8 +399,10 @@
     thread_id = (unsigned long int) 
sandesha2_permanent_transaction_get_thread_id(
         transaction, env);
     sprintf(thread_id_key, "%lu", thread_id); 
+    axis2_allocator_switch_to_global_pool(env->allocator);
     axis2_hash_set(storage_mgr_impl->transactions, thread_id_key, 
         AXIS2_HASH_KEY_STRING, NULL);
+    axis2_allocator_switch_to_local_pool(env->allocator);
     axis2_thread_mutex_unlock(storage_mgr_impl->mutex);
 }
 
@@ -818,8 +824,12 @@
         return NULL;
     }
     AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, soap_envelope);
-    AXIS2_MSG_CTX_SET_MSG_ID(msg_ctx, env, sandesha2_msg_store_bean_get_msg_id(
-        msg_store_bean, env)); 
+    /* You cannot set the same message id to a new message context again. So 
generate
+     * a new message id and set it
+     * AXIS2_MSG_CTX_SET_MSG_ID(msg_ctx, env, 
sandesha2_msg_store_bean_get_msg_id(
+        msg_store_bean, env));*/
+    axis2_msg_ctx_set_msg_id(msg_ctx, env, axis2_uuid_gen(env));
+
     conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
     transport_out_str = sandesha2_msg_store_bean_get_transport_out(
         msg_store_bean, env);
@@ -940,7 +950,7 @@
             AXIS2_MSG_CTX_SET_OP_CTX(msg_ctx, env, op_ctx);
             /*AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx);*/
             msg_id = (axis2_char_t *) AXIS2_MSG_CTX_GET_MSG_ID(msg_ctx, env);
-            axis2_conf_ctx_register_op_ctx(conf_ctx, env, msg_id, op_ctx);
+            /*axis2_conf_ctx_register_op_ctx(conf_ctx, env, msg_id, op_ctx);*/
         }
         axis2_allocator_switch_to_local_pool(env->allocator);
     }
@@ -1133,8 +1143,10 @@
     storage_mgr_impl = SANDESHA2_INTF_TO_IMPL(storage_mgr);
     /*axis2_thread_mutex_lock(storage_mgr_impl->mutex);*/
     sprintf(thread_id_key, "%lu", thread_id);
+    axis2_allocator_switch_to_global_pool(env->allocator);
     transaction = (sandesha2_transaction_t *) axis2_hash_get(
         storage_mgr_impl->transactions, thread_id_key, AXIS2_HASH_KEY_STRING);
+    axis2_allocator_switch_to_local_pool(env->allocator);
     /*transaction = 
sandesha2_permanent_storage_mgr_get_transaction(storage_mgr, 
         env);*/
     if(transaction)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to