You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Damitha Kumarage (JIRA)" <ji...@apache.org> on 2008/06/27 13:23:45 UTC

[jira] Closed: (AXIS2C-832) When a axis2c client executed all the modules in the client repository are initialized even when then client does not engage them

     [ https://issues.apache.org/jira/browse/AXIS2C-832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage closed AXIS2C-832.
-----------------------------------

    Resolution: Fixed

If the problem is fixed as explained by me then the problem arise when the unengaged modules are initialized when they are engaged. This need significant code changes.
Instead I suggest that we keep the code as it is. But make sure that there is no modules in the repository modules folder when we know for sure that no services will engage them.
Even if we keep unused modules in the repository it wont' affect the server start or functiioning of the server. Only it is a waste. There could be resource allocatiions in the
module initializing.

> 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
>            Assignee: 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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org