axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r671848 - in /webservices/axis2/trunk/c: include/ src/core/deployment/ src/core/description/ src/core/engine/ src/core/phaseresolver/
Date Thu, 26 Jun 2008 10:45:52 GMT
Author: damitha
Date: Thu Jun 26 03:45:52 2008
New Revision: 671848

URL: http://svn.apache.org/viewvc?rev=671848&view=rev
Log:
Adding useful comments into phase resolver

Modified:
    webservices/axis2/trunk/c/include/axis2_phase_resolver.h
    webservices/axis2/trunk/c/src/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/src/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/src/core/description/op.c
    webservices/axis2/trunk/c/src/core/description/svc.c
    webservices/axis2/trunk/c/src/core/description/svc_grp.c
    webservices/axis2/trunk/c/src/core/engine/conf.c
    webservices/axis2/trunk/c/src/core/phaseresolver/phase_resolver.c

Modified: webservices/axis2/trunk/c/include/axis2_phase_resolver.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_phase_resolver.h?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase_resolver.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase_resolver.h Thu Jun 26 03:45:52 2008
@@ -38,14 +38,22 @@
  * application client engage a module programmatically he can use axis2_op_client_engage_module()
  * function, or axis2_svc_client_engage_module() function. Engaging using configuration files
means
  * adding a module_ref parameter into services.xml or axis2.xml.
- * In whatever way engaging a module finally sums upto addding handlers into each operations
flows.
- * Here flows in operations are actually array lists of phases
- * (See op.c).
- * There are user defined phases and system defined phases(See axis2.xml). Handlers 
- * These handlers are taken from modules or  for system defined and defined by user defined.
- * Handlers for all user defined phases are taken from modules. when modules are built from
module.xml
- * these handlers are added into module flows(See moudule_desc.c).
+ * In whatever way engaging a module finally sums upto addding module handlers into each
operations flows
+ * in the order defined in module.xml. Here flows in operations are actually array lists
of user defined
+ * phases (See op.c).
  *
+ * Above functions in phase resolver add module handlers into operation flows as mentioned
above as well
+ * as add module handlers into system defined phases. User defined phases are added into
each operation
+ * at deployment time before handlers are added into them by phase resolver. System define
phase lists
+ * are added into axis2_conf_t structure and predefined handlers are added to them before
module handlers
+ * are added to them by phase resolver.
+ *
+ * In server side modules are engaged by call to axis2_conf_engage_module() function from
deployment engine
+ * which in turn call axis2_phase_resolver_engage_module_globally() function. In client side
modules are 
+ * engaged by call to axis2_phase_resolver_engage_module_to_svc() or axis2_phase_resolver_engage_module_to_op().
+ *
+ * Also building initial operation execution phases are done in phase resolver. The functions
are
+ * axis2_phase_resolver_build_execution_chains_for_svc().
  *
  * @{
  */
@@ -151,9 +159,7 @@
 
     /**
      * Builds the execution chains. Execution chains are collection of phases that are invoked
in
-     * the execution path. This will be moved into the implementation c file in the next
release. 
-     * Therefore this is marked as deprecated.
-     * @deprecated
+     * the execution path.
      * @param phase_resolver pointer to phase resolver
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE

Modified: webservices/axis2/trunk/c/src/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/dep_engine.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/dep_engine.c Thu Jun 26 03:45:52 2008
@@ -592,12 +592,12 @@
 axis2_dep_engine_get_module(
     const axis2_dep_engine_t * dep_engine,
     const axutil_env_t * env,
-    axutil_qname_t * module_name)
+    axutil_qname_t * module_qname)
 {
-    AXIS2_PARAM_CHECK(env->error, module_name, NULL);
+    AXIS2_PARAM_CHECK(env->error, module_qname, NULL);
     AXIS2_PARAM_CHECK (env->error, dep_engine, NULL);
 
-    return axis2_conf_get_module(dep_engine->conf, env, module_name);
+    return axis2_conf_get_module(dep_engine->conf, env, module_qname);
 }
 
 AXIS2_EXTERN struct axis2_arch_file_data *AXIS2_CALL

Modified: webservices/axis2/trunk/c/src/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/desc_builder.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/desc_builder.c Thu Jun 26 03:45:52 2008
@@ -946,8 +946,7 @@
 
     AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
 
-    while (module_refs &&
-           axiom_children_qname_iterator_has_next(module_refs, env))
+    while (module_refs && axiom_children_qname_iterator_has_next(module_refs, env))
     {
         axiom_node_t *moduleref_node = axiom_children_qname_iterator_next(module_refs, env);
         moduleref = (axiom_element_t *)axiom_node_get_data_element(moduleref_node, env);
@@ -963,34 +962,33 @@
 
             ref_name = axiom_attribute_get_value(module_ref_attrib, env);
             ref_qname = axutil_qname_create(env, ref_name, NULL, NULL);
-            module_desc = axis2_dep_engine_get_module(desc_builder->engine, env,
-                                                      ref_qname);
+            module_desc = axis2_dep_engine_get_module(desc_builder->engine, env, ref_qname);
             if (!module_desc)
             {
                 axutil_qname_free(ref_qname, env);
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
-                                AXIS2_FAILURE);
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                    "Module %s not found in the deployment engine", ref_name);
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND, AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Module %s not found in the deployment
engine", 
+                        ref_name);
+
                 return AXIS2_FAILURE;
             }
             else
             {
                 status = axis2_op_add_module_qname(op, env, ref_qname);
                 axutil_qname_free(ref_qname, env);
-                if (!status)
+                if (AXIS2_SUCCESS != status)
                 {
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
-                                    AXIS2_FAILURE);
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND, AXIS2_FAILURE);
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                        "Adding module ref %s to operation %s failed", ref_name, 
-                        axutil_qname_get_localpart(axis2_op_get_qname(op, env), 
-                            env));
+                            "Adding module ref %s to operation %s failed", ref_name, 
+                            axutil_qname_get_localpart(axis2_op_get_qname(op, env), env));
+
                     return AXIS2_FAILURE;
                 }
             }
         }
     }
+
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/src/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/op.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/op.c (original)
+++ webservices/axis2/trunk/c/src/core/description/op.c Thu Jun 26 03:45:52 2008
@@ -651,6 +651,7 @@
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
                 "Module %s already engaged to operation %s", modname, opname);
+
             need_to_add = AXIS2_FALSE;
             return AXIS2_FAILURE;
         }
@@ -662,15 +663,13 @@
         axis2_module_t *module = NULL;
         axis2_status_t status = AXIS2_FAILURE;
 
-        status = axis2_phase_resolver_engage_module_to_op(pr, env,
-                                                          op, moduleref);
+        status = axis2_phase_resolver_engage_module_to_op(pr, env, op, moduleref);
         if (AXIS2_SUCCESS != status)
         {
             /* Ignore the status */
             AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_SUCCESS);
             AXIS2_LOG_INFO(env->log, AXIS2_LOG_SI, 
-                "Engaging module %s to operaion %s failed. But ignore this.", 
-                    modname, opname);
+                "Engaging module %s to operaion %s failed. But ignore this.", modname, opname);
         }
         module = axis2_module_desc_get_module(moduleref, env);
 

Modified: webservices/axis2/trunk/c/src/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc.c Thu Jun 26 03:45:52 2008
@@ -969,18 +969,21 @@
     const axis2_char_t *svcname = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_svc_engage_module");
+
     AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
+
     svcname = axis2_svc_get_name(svc, env);
     phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
     if (!phase_resolver)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
             "Creating phase resolver failed for service %s", svcname);
+
         return AXIS2_FAILURE;
     }
-    status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, svc,
-                                                       module_desc);
+
+    status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, svc, module_desc);
     if (status)
     {
         const axutil_qname_t *qname = NULL;
@@ -988,12 +991,14 @@
         qname = axis2_module_desc_get_qname(module_desc, env);
         axis2_svc_add_module_qname(svc, env, qname);
     }
+
     if (phase_resolver)
     {
         axis2_phase_resolver_free(phase_resolver, env);
     }
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_svc_engage_module");
+
     return status;
 }
 

Modified: webservices/axis2/trunk/c/src/core/description/svc_grp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc_grp.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc_grp.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc_grp.c Thu Jun 26 03:45:52 2008
@@ -225,26 +225,24 @@
         svc_grp->svcs = axutil_hash_make(env);
         if (!svc_grp->svcs)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Creating services list failed");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating services list failed");
             return AXIS2_FAILURE;
         }
     }
+
     svc_qname = axis2_svc_get_qname(svc, env);
     svc_name = axutil_qname_to_string((axutil_qname_t *) svc_qname, env);
     axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, svc);
 
-    handler_resolver = axis2_phase_resolver_create_with_config_and_svc(env,
-                                                                       svc_grp->
-                                                                       parent,
-                                                                       svc);
+    handler_resolver = axis2_phase_resolver_create_with_config_and_svc(env, svc_grp->parent,
svc);
 
     if (!handler_resolver)
     {
         /* remove the previously added service */
         axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating phase resolver failed for service %s", svc_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating phase resolver failed for service
%s", 
+                svc_name);
+
         return AXIS2_FAILURE;
     }
 
@@ -255,19 +253,20 @@
         axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
         axis2_phase_resolver_free(handler_resolver, env);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Building chains failed within phase resolver for service %s", 
-                svc_name);
+            "Building chains failed within phase resolver for service %s", svc_name);
         return status;
     }
 
     status = axis2_svc_set_last_update(svc, env);
+
     if (AXIS2_SUCCESS != status)
     {
         /* remove the previously added service */
         axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
         axis2_phase_resolver_free(handler_resolver, env);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Setting last update failed for service %s", svc_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting last update failed for service
%s", 
+                svc_name);
+
         return status;
     }
 
@@ -277,12 +276,13 @@
         /* remove the previously added service */
         axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
         axis2_phase_resolver_free(handler_resolver, env);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Setting parent failed for service %s", svc_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting parent failed for service %s",
svc_name);
+
         return status;
     }
 
     axis2_phase_resolver_free(handler_resolver, env);
+
     return status;
 }
 

Modified: webservices/axis2/trunk/c/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/conf.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/conf.c Thu Jun 26 03:45:52 2008
@@ -588,11 +588,11 @@
         conf->all_svcs = axutil_hash_make(env);
         if (!conf->all_svcs)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Creating all services map failed");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating all services map failed");
             return AXIS2_FAILURE;
         }
     }
+
     k = axutil_hash_count(svcs);
     index_i = axutil_hash_first(svcs, env);
     while (index_i)
@@ -607,24 +607,25 @@
         svc_qname = axis2_svc_get_qname(desc, env);
         svc_name = axutil_qname_get_localpart(svc_qname, env);
 
-        temp_svc = axutil_hash_get(conf->all_svcs, svc_name,
-                                    AXIS2_HASH_KEY_STRING);
+        temp_svc = axutil_hash_get(conf->all_svcs, svc_name, AXIS2_HASH_KEY_STRING);
+
         /* No two service names deployed in the engine can be same */
         if (temp_svc)
         {
-            AXIS2_ERROR_SET(env->error,
-                            AXIS2_ERROR_TWO_SVCS_CANNOT_HAVE_SAME_NAME,
-                            AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_TWO_SVCS_CANNOT_HAVE_SAME_NAME, AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "There is already a service called %s in the all services "\
-                "list of axis2 configuration.", svc_name);
+                "There is already a service called %s in the all services list of axis2 configuration.",

+                svc_name);
+
             return AXIS2_FAILURE;
         }
+
         index_i = axutil_hash_next(env, index_i);
     }
 
     svcs = axis2_svc_grp_get_all_svcs(svc_grp, env);
     index_i = axutil_hash_first(svcs, env);
+
     while (index_i)
     {
         void *value = NULL;
@@ -632,8 +633,7 @@
 
         axutil_hash_this(index_i, NULL, NULL, &value);
         desc = (axis2_svc_t *) value;
-        svc_name =
-            axutil_qname_get_localpart(axis2_svc_get_qname(desc, env), env);
+        svc_name = axutil_qname_get_localpart(axis2_svc_get_qname(desc, env), env);
         axutil_hash_set(conf->all_svcs, svc_name, AXIS2_HASH_KEY_STRING, desc);
         index_i = axutil_hash_next(env, index_i);
     }
@@ -644,13 +644,12 @@
         conf->svc_grps = axutil_hash_make(env);
         if (!conf->svc_grps)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Creating service group map failed");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating service group map failed");
             return AXIS2_FAILURE;
         }
     }
-    axutil_hash_set(conf->svc_grps, svc_grp_name,
-                    AXIS2_HASH_KEY_STRING, svc_grp);
+
+    axutil_hash_set(conf->svc_grps, svc_grp_name, AXIS2_HASH_KEY_STRING, svc_grp);
 
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/src/core/phaseresolver/phase_resolver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/phaseresolver/phase_resolver.c?rev=671848&r1=671847&r2=671848&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/phaseresolver/phase_resolver.c (original)
+++ webservices/axis2/trunk/c/src/core/phaseresolver/phase_resolver.c Thu Jun 26 03:45:52
2008
@@ -379,34 +379,34 @@
     axis2_char_t *modname_d = NULL;
     const axis2_char_t *svcname = NULL;
 
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
-        "Entry:axis2_phase_resolver_engage_module_to_svc");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_phase_resolver_engage_module_to_svc");
+
     module_d_qname = axis2_module_desc_get_qname(module_desc, env);
     modname_d = axutil_qname_get_localpart(module_d_qname, env); 
     svcname = axis2_svc_get_name(svc, env);
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-        "Module %s will be engaged to %s", modname_d, svcname);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Module %s will be engaged to %s", modname_d,
svcname);
+
     ops = axis2_svc_get_all_ops(svc, env);
     if (!ops)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service %s has no operation", svcname);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service %s has no operation", svcname);
+
         return AXIS2_FAILURE;
     }
+
     /* Module operations are added to service and built execution chains */
-    status = axis2_svc_add_module_ops(svc, env, module_desc,
-                                      phase_resolver->axis2_config);
+    status = axis2_svc_add_module_ops(svc, env, module_desc, phase_resolver->axis2_config);
 
     if (AXIS2_SUCCESS != status)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Adding module operations from module %s into service %s failed",
-                modname_d, svcname);
+            "Adding module operations from module %s into service %s failed", modname_d,
svcname);
+
         return status;
     }
-    for (index_i = axutil_hash_first(ops, env); index_i; index_i =
-         axutil_hash_next(env, index_i))
+
+    for (index_i = axutil_hash_first(ops, env); index_i; index_i = axutil_hash_next(env,
index_i))
     {
         axutil_array_list_t *modules = NULL;
         axis2_op_t *op_desc = NULL;
@@ -418,13 +418,15 @@
 
         axutil_hash_this(index_i, NULL, NULL, &v);
         op_desc = (axis2_op_t *) v;
-        opname = axutil_qname_get_localpart(axis2_op_get_qname(op_desc, env), 
-            env),
+
+        opname = axutil_qname_get_localpart(axis2_op_get_qname(op_desc, env), env);
+
         modules = axis2_op_get_all_modules(op_desc, env);
         if (modules)
         {
             size = axutil_array_list_size(modules, env);
         }
+
         for (j = 0; j < size; j++)
         {
             axis2_module_desc_t *module_desc_l = NULL;
@@ -432,38 +434,38 @@
 
             module_desc_l = axutil_array_list_get(modules, env, j);
             module_d_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
-            if (axutil_qname_equals(module_d_qname, env,
-                                                  module_d_qname_l))
+            if (axutil_qname_equals(module_d_qname, env, module_d_qname_l))
             {
                 engaged = AXIS2_TRUE;
                 status = AXIS2_SUCCESS;
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                    "Module %s already engaged to operation %s of service %s", 
-                    modname_d, opname, svcname);
+                    "Module %s already engaged to operation %s of service %s", modname_d,
opname, 
+                    svcname);
+
                 break;
             }
         }
 
         if (!engaged)
         {
-            status =
-                axis2_phase_resolver_engage_module_to_op(phase_resolver, env,
-                                                         op_desc, module_desc);
+            status = axis2_phase_resolver_engage_module_to_op(phase_resolver, env, op_desc,

+                    module_desc);
+
             if (AXIS2_SUCCESS != status)
             {
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                    "Engaging module %s to operation %s failed.", modname_d, 
-                    opname);
+                    "Engaging module %s to operation %s failed.", modname_d, opname);
+
                 return status;
             }
 
-            status = axis2_op_add_to_engaged_module_list(op_desc, env,
-                                                         module_desc);
+            status = axis2_op_add_to_engaged_module_list(op_desc, env, module_desc);
         }
 
     }
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_phase_resolver_engage_module_to_svc");
+
     return status;
 }
 
@@ -571,12 +573,13 @@
                 handlername = axutil_string_get_buffer(handlersname, env);
                 phase_rule = axis2_handler_desc_get_rules(metadata, env);
                 phase_name = axis2_phase_rule_get_name(phase_rule, env);
+                
+                /* For user/operation specific phases */
                 if ((axutil_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name))
                     && (axutil_strcmp(AXIS2_PHASE_DISPATCH, phase_name)) &&
                     (axutil_strcmp(AXIS2_PHASE_POST_DISPATCH, phase_name))
                     && (axutil_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name)))
                 {
-                    /* For operation specific phases */
                     status = axis2_phase_holder_add_handler(phase_holder, env, metadata);
                     if (AXIS2_SUCCESS != status)
                     {
@@ -591,12 +594,13 @@
                     }
 
                 }
+
+                /* For System defined phases */
                 if ((!axutil_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name))
                     || (!axutil_strcmp(AXIS2_PHASE_DISPATCH, phase_name)) ||
                     (!axutil_strcmp(AXIS2_PHASE_POST_DISPATCH, phase_name))
                     || (!axutil_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name)))
                 {
-                    /* For global phases */
                     axutil_array_list_t *phase_list = NULL;
                     axis2_phase_holder_t *phase_holder = NULL;
 
@@ -618,8 +622,9 @@
                     if (AXIS2_SUCCESS != status)
                     {
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                            "Adding handler %s to phase %s within flow %s failed", 
-                            handlername, phase_name, flowname);
+                            "Adding handler %s to phase %s within flow %s failed", handlername,

+                            phase_name, flowname);
+
                         return status;
                     }
                 }
@@ -632,8 +637,9 @@
             phase_holder = NULL;
         }
     }
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
-        "Exit:axis2_phase_resolver_engage_module_to_op");
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_phase_resolver_engage_module_to_op");
+
     return AXIS2_SUCCESS;
 }
 
@@ -661,19 +667,19 @@
 
     ops = axis2_svc_get_all_ops(phase_resolver->svc, env);
 
-    for (index_i = axutil_hash_first(ops, env); index_i; index_i =
-         axutil_hash_next(env, index_i))
+    for (index_i = axutil_hash_first(ops, env); index_i; index_i = axutil_hash_next(env,
index_i))
     {
         void *v = NULL;
         int j = 0;
+
         axutil_hash_this(index_i, NULL, NULL, &v);
         op = (axis2_op_t *) v;
         for (j = 1; j < 5; j++)
         {
-            status = axis2_phase_resolver_build_execution_chains_for_op(phase_resolver,
-                                                                 env, j, op);
+            status = axis2_phase_resolver_build_execution_chains_for_op(phase_resolver, env,
j, op);
         }
     }
+
     return status;
 }
 
@@ -682,7 +688,7 @@
  * from the axis2 configuration and for each module get the all handlers to be 
  * add to the operation specific phases. Then for each operation specific phases 
  * add those handlers. It should be noted that by the time this function is called
- * the module handlers are already added to global chains. 
+ * the module handlers are already added to system specific phases. 
  * This function is called from axis2_phase_resolver_build_execution_chains_for_svc() function
and 
  * axis2_phase_resolver_build_execution_chains_for_module_op() function.
  */



Mime
View raw message