When a axis2c client executed all the modules in the client repository are 
initialized even when then client does not engage them 
----------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2C-832
                 URL: https://issues.apache.org/jira/browse/AXIS2C-832
             Project: Axis2-C
          Issue Type: Bug
          Components: core/clientapi
            Reporter: Damitha Kumarage


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);
+                            }



        

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to