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 su...@apache.org on 2008/06/30 06:25:24 UTC

svn commit: r672696 - /webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c

Author: supun
Date: Sun Jun 29 21:25:23 2008
New Revision: 672696

URL: http://svn.apache.org/viewvc?rev=672696&view=rev
Log:
Fixing issue 995. Now we are freeing the worker when the pool used to init the child get destroyed.

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c?rev=672696&r1=672695&r2=672696&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c Sun Jun 29 21:25:23 2008
@@ -88,6 +88,10 @@
 static int axis2_handler(
     request_rec * req);
 
+/* Shutdown Axis2 */
+apr_status_t 
+axis2_shutdown(void *tmp);
+
 void *AXIS2_CALL axis2_module_malloc(
     axutil_allocator_t * allocator,
     size_t size);
@@ -708,6 +712,8 @@
                      "[Axis2] Error creating mod_axis2 apache2 worker");
         exit(APEXIT_CHILDFATAL);
     }
+	/* If we are initialized we register a clean up as well */
+	apr_pool_cleanup_register(p, NULL, axis2_shutdown, apr_pool_cleanup_null);
 }
 
 static void
@@ -718,3 +724,13 @@
     ap_hook_handler(axis2_handler, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init(axis2_module_init, NULL, NULL, APR_HOOK_MIDDLE);
 }
+
+apr_status_t 
+axis2_shutdown(void *tmp)
+{
+	if (axis2_worker)
+	{
+		axis2_apache2_worker_free(axis2_worker, axutil_env);
+	}
+	return APR_SUCCESS;
+}
\ No newline at end of file