You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/05/09 17:43:46 UTC

svn commit: r405453 - in /webservices/axis2/trunk/c: modules/core/clientapi/ samples/user_guide/clients/

Author: samisa
Date: Tue May  9 08:43:44 2006
New Revision: 405453

URL: http://svn.apache.org/viewcvs?rev=405453&view=rev
Log:
Fixed the threading problem related to the listner manager startup
AXIS2C-159

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c
    webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
    webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c
    webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c
    webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c?rev=405453&r1=405452&r2=405453&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c Tue May  9 08:43:44 2006
@@ -208,9 +208,12 @@
                             if(NULL == worker_thread)
                             {
                                 AXIS2_LOG_ERROR((*env)->log, AXIS2_LOG_SI, "Thread creation failed"
-                                                 "call invoke non blocking");
+                                                 "Invoke non blocking failed");
+                            }
+                            else
+                            {
+                                AXIS2_THREAD_POOL_THREAD_DETACH((*env)->thread_pool, worker_thread);
                             }
-                            AXIS2_THREAD_POOL_THREAD_DETACH((*env)->thread_pool, worker_thread);
                         }
                         else
                         {
@@ -218,7 +221,10 @@
                                                          " Cannot invoke call non blocking");
                         }
 #else
-                        axis2_listener_manager_worker_func(NULL, (void*)arg_list);
+                        /*axis2_listener_manager_worker_func(NULL, (void*)arg_list);*/
+                        AXIS2_LOG_ERROR((*env)->log, AXIS2_LOG_SI, "Threading not enabled."
+                                                         " Cannot start seperate listener");
+                        return AXIS2_FAILURE;
 #endif
                         
                         tl_state  = AXIS2_MALLOC( (*env)->allocator, 

Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?rev=405453&r1=405452&r2=405453&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Tue May  9 08:43:44 2006
@@ -737,6 +737,7 @@
     axis2_svc_client_impl_t *svc_client_impl = NULL;
     axis2_op_client_t *op_client = NULL;
     axis2_msg_ctx_t *msg_ctx = NULL;
+    axis2_char_t *transport_in_protocol = NULL;
 
 	svc_client_impl = AXIS2_INTF_TO_IMPL(svc_client);
 
@@ -757,7 +758,16 @@
     
     if (AXIS2_OPTIONS_IS_USE_SEPERATE_LISTENER(svc_client_impl->options, env))
     {
-        axis2_op_t *op = AXIS2_SVC_GET_OP_WITH_QNAME(svc_client_impl->svc, env, 
+        axis2_op_t *op = NULL;
+
+        transport_in_protocol = AXIS2_OPTIONS_GET_TRANSPORT_IN_PROTOCOL(
+            svc_client_impl->options, env);
+        if (!transport_in_protocol)
+            transport_in_protocol = AXIS2_TRANSPORT_HTTP;
+        AXIS2_LISTNER_MANAGER_MAKE_SURE_STARTED(svc_client_impl->listener_manager, env, 
+            transport_in_protocol, svc_client_impl->conf_ctx);
+
+        op = AXIS2_SVC_GET_OP_WITH_QNAME(svc_client_impl->svc, env, 
             op_qname);
         AXIS2_OP_SET_MSG_RECEIVER(op, env, 
             AXIS2_CALLBACK_RECV_GET_BASE(svc_client_impl->callback_recv, env));
@@ -901,7 +911,6 @@
                                     axis2_conf_ctx_t *conf_ctx,
 									axis2_char_t *client_home)
 {
-    axis2_char_t *transport_in_protocol = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
@@ -925,12 +934,6 @@
         return AXIS2_FALSE;
 	}
     
-    transport_in_protocol = AXIS2_OPTIONS_GET_TRANSPORT_IN_PROTOCOL(
-        svc_client_impl->options, env);
-    if (!transport_in_protocol)
-        transport_in_protocol = AXIS2_TRANSPORT_HTTP;
-    AXIS2_LISTNER_MANAGER_MAKE_SURE_STARTED(svc_client_impl->listener_manager, env, 
-        transport_in_protocol, svc_client_impl->conf_ctx);
 
 	return AXIS2_TRUE;
 }

Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c?rev=405453&r1=405452&r2=405453&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c Tue May  9 08:43:44 2006
@@ -31,7 +31,7 @@
     axis2_om_node_t *ret_node = NULL;
    
     /* Set up the envioronment */
-    env = axis2_env_create_all("echo_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+    env = axis2_env_create_all("echo_blocking_soap11.log", AXIS2_LOG_LEVEL_TRACE);
 
     /* Set end point reference of echo service */
     address = "http://localhost:9090/axis2/services/echo";

Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c?rev=405453&r1=405452&r2=405453&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c Tue May  9 08:43:44 2006
@@ -46,7 +46,7 @@
     int count = 0;
    
     /* Set up the envioronment */
-    env = axis2_env_create_all("echo_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+    env = axis2_env_create_all("echo_non_blocking.log", AXIS2_LOG_LEVEL_TRACE);
 
     /* Set end point reference of echo service */
     address = "http://localhost:9090/axis2/services/echo";

Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c?rev=405453&r1=405452&r2=405453&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking_dual.c Tue May  9 08:43:44 2006
@@ -47,7 +47,7 @@
     int count = 0;
    
     /* Set up the envioronment */
-    env = axis2_env_create_all("echo_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+    env = axis2_env_create_all("echo_non_blocking_dual.log", AXIS2_LOG_LEVEL_TRACE);
 
     /* Set end point reference of echo service */
     address = "http://localhost:9090/axis2/services/echo";