You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/05/01 17:08:07 UTC
svn commit: r534112 - in /webservices/axis2/tags/c/1.0.0:
include/axis2_const.h samples/server/axis2.xml
src/core/engine/ctx_handler.c src/core/transport/http/common/http_worker.c
util/include/axutil_error.h
Author: samisa
Date: Tue May 1 08:08:06 2007
New Revision: 534112
URL: http://svn.apache.org/viewvc?view=rev&rev=534112
Log:
Fixed some memory leaks and compiler errors
Modified:
webservices/axis2/tags/c/1.0.0/include/axis2_const.h
webservices/axis2/tags/c/1.0.0/samples/server/axis2.xml
webservices/axis2/tags/c/1.0.0/src/core/engine/ctx_handler.c
webservices/axis2/tags/c/1.0.0/src/core/transport/http/common/http_worker.c
webservices/axis2/tags/c/1.0.0/util/include/axutil_error.h
Modified: webservices/axis2/tags/c/1.0.0/include/axis2_const.h
URL: http://svn.apache.org/viewvc/webservices/axis2/tags/c/1.0.0/include/axis2_const.h?view=diff&rev=534112&r1=534111&r2=534112
==============================================================================
--- webservices/axis2/tags/c/1.0.0/include/axis2_const.h (original)
+++ webservices/axis2/tags/c/1.0.0/include/axis2_const.h Tue May 1 08:08:06 2007
@@ -317,6 +317,8 @@
#define AXIS2_ATTACHMENT_TEMP_DIR "attachmentDIR"
#define AXIS2_CACHE_ATTACHMENTS "cacheAttachments"
#define AXIS2_FILE_SIZE_THRESHOLD "sizeThreshold"
+/* op_ctx persistance */
+#define AXIS2_PERSIST_OP_CTX "persistOperationContext"
/******************************************************************************/
Modified: webservices/axis2/tags/c/1.0.0/samples/server/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/tags/c/1.0.0/samples/server/axis2.xml?view=diff&rev=534112&r1=534111&r2=534112
==============================================================================
--- webservices/axis2/tags/c/1.0.0/samples/server/axis2.xml (original)
+++ webservices/axis2/tags/c/1.0.0/samples/server/axis2.xml Tue May 1 08:08:06 2007
@@ -2,17 +2,12 @@
<!-- ================================================= -->
<!-- Parameters -->
<!-- ================================================= -->
- <parameter name="hotdeployment" locked="false">false</parameter>
- <parameter name="hotupdate" locked="false">false</parameter>
+ <!-- Uncomment following to enable MTOM support -->
<!--parameter name="enableMTOM" locked="false">true</parameter-->
- <!-- Uncomment this to enable REST support -->
<parameter name="enableREST" locked="false">true</parameter>
-
- <parameter name="userName" locked="false">admin</parameter>
- <parameter name="password" locked="false">axis2</parameter>
-
- <parameter name="seralizeLocation" locked="false">.</parameter>
+ <!-- Uncomment following to persist op_ctx, useful with RM -->
+ <!--parameter name="persistOperationContext" locked="false">true</parameter-->
<!--if you want to extract the service archive file and work with that please uncomment this-->
<!--else , it wont extract archive file or does not take into consideration if someone drop-->
Modified: webservices/axis2/tags/c/1.0.0/src/core/engine/ctx_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/tags/c/1.0.0/src/core/engine/ctx_handler.c?view=diff&rev=534112&r1=534111&r2=534112
==============================================================================
--- webservices/axis2/tags/c/1.0.0/src/core/engine/ctx_handler.c (original)
+++ webservices/axis2/tags/c/1.0.0/src/core/engine/ctx_handler.c Tue May 1 08:08:06 2007
@@ -145,24 +145,46 @@
else if (op) /* 2. if no op_ctx, create new op_ctx */
{
axis2_conf_ctx_t *conf_ctx = NULL;
- axutil_allocator_switch_to_global_pool(env->allocator);
+ axis2_bool_t use_pools = AXIS2_FALSE;
+ axutil_param_t *param = axis2_msg_ctx_get_parameter(msg_ctx, env,
+ AXIS2_PERSIST_OP_CTX);
+
+ use_pools = (param && 0 == axutil_strcmp(AXIS2_VALUE_TRUE,
+ axutil_param_get_value(param, env)));
+ if (use_pools)
+ {
+ axutil_allocator_switch_to_global_pool(env->allocator);
+ }
op_ctx = axis2_op_ctx_create(env, op, NULL);
if (!op_ctx)
{
return AXIS2_FAILURE;
}
- axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_ctx);
+ axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_ctx);
axis2_op_register_op_ctx(op, env, msg_ctx, op_ctx);
conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
if (conf_ctx)
{
+ if (!use_pools)
+ {
+ axutil_allocator_switch_to_global_pool(env->allocator);
+ }
+
svc_grp_ctx = axis2_conf_ctx_fill_ctxs(conf_ctx, env, msg_ctx);
- }
- axutil_allocator_switch_to_local_pool(env->allocator);
+ if (!use_pools)
+ {
+ axutil_allocator_switch_to_local_pool(env->allocator);
+ }
+ }
+
+ if (use_pools)
+ {
+ axutil_allocator_switch_to_local_pool(env->allocator);
+ }
}
if (!svc_grp_ctx && (axis2_msg_ctx_get_server_side(msg_ctx, env)))
Modified: webservices/axis2/tags/c/1.0.0/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/tags/c/1.0.0/src/core/transport/http/common/http_worker.c?view=diff&rev=534112&r1=534111&r2=534112
==============================================================================
--- webservices/axis2/tags/c/1.0.0/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/tags/c/1.0.0/src/core/transport/http/common/http_worker.c Tue May 1 08:08:06 2007
@@ -393,10 +393,9 @@
{
axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;
axis2_msg_ctx_t **msg_ctx_map = NULL;
-
+ axis2_char_t *msg_id = NULL;
+ axis2_conf_ctx_t *conf_ctx = NULL;
msg_ctx_map = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
- if(!axis2_op_ctx_is_in_use(op_ctx, env))
- axis2_op_ctx_destroy_mutex(op_ctx, env);
out_msg_ctx = msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT];
in_msg_ctx = msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_IN];
@@ -410,11 +409,24 @@
if (in_msg_ctx)
{
+ msg_id = axis2_msg_ctx_get_msg_id(in_msg_ctx, env);
+ conf_ctx = axis2_msg_ctx_get_conf_ctx(in_msg_ctx, env);
+
axis2_msg_ctx_free(in_msg_ctx, env);
in_msg_ctx = NULL;
msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_IN] = NULL;
}
+ if(!axis2_op_ctx_is_in_use(op_ctx, env))
+ {
+ axis2_op_ctx_destroy_mutex(op_ctx, env);
+ if (conf_ctx && msg_id)
+ {
+ axis2_conf_ctx_register_op_ctx(conf_ctx, env, msg_id, NULL);
+ }
+ axis2_op_ctx_free(op_ctx, env);
+ }
+
} /* Done freeing message contexts */
msg_ctx = NULL;
Modified: webservices/axis2/tags/c/1.0.0/util/include/axutil_error.h
URL: http://svn.apache.org/viewvc/webservices/axis2/tags/c/1.0.0/util/include/axutil_error.h?view=diff&rev=534112&r1=534111&r2=534112
==============================================================================
--- webservices/axis2/tags/c/1.0.0/util/include/axutil_error.h (original)
+++ webservices/axis2/tags/c/1.0.0/util/include/axutil_error.h Tue May 1 08:08:06 2007
@@ -557,8 +557,6 @@
*/
AXIS2_ERROR_LAST
};
- /* array to hold error messages */
- const axis2_char_t* axutil_error_messages[AXIS2_ERROR_LAST + 10000];
/**
* \brief Array to hold error messages
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org