Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
This is because when axis2c_client _create is called all the modules in the client repository are initialized inside the axis2_init_modules function. We can see that only after the svc_client is created and returned to the axis2 client it can engage modules tothe svc_cient.
But if we know the engaged modules at the stage of axis2_init_modules function we can avoid unneccessary module initializing. If the module engaging is done by adding an entry into the client axis2.xml then at that stage we know the modules engaged. So we can avoid unneccessary module initializing as following diff to the axis2_module_init function shows.
if (mod)
{
- AXIS2_MODULE_INIT(mod, env, conf_ctx, mod_desc);
+ axutil_qname_t *mod_qname = NULL;
+ axis2_char_t *mod_name = NULL;
+ mod_qname = (axutil_qname_t *)
+ axis2_module_desc_get_qname(mod_desc, env);
+ mod_name = axutil_qname_get_localpart(mod_qname,env);
+ if(axis2_conf_is_engaged(conf, env, mod_qname))
+ { + AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, + "Initializing module %s", mod_name); + AXIS2_MODULE_INIT(mod, env, conf_ctx, mod_desc); + }+ else
{ + AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, + "Module %s is not engaged to the "\ + "service %s. Therefore will not be "\ + "initialized", mod_name, svc_name); + }
+