You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/06/25 14:56:19 UTC

svn commit: r550477 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java

Author: saminda
Date: Mon Jun 25 05:56:18 2007
New Revision: 550477

URL: http://svn.apache.org/viewvc?view=rev&rev=550477
Log:
With the refactoring of getEngagedModules to return AxisModule; if a module is engaged in services.xml; now it will 
be selected properly 

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java?view=diff&rev=550477&r1=550476&r2=550477
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java Mon Jun 25 05:56:18 2007
@@ -84,22 +84,26 @@
         AxisConfiguration axisConfig = (AxisConfiguration) getParent();
 
         if (axisConfig != null) {
-            Iterator modules = getEngagedModules().iterator();
-
-            while (modules.hasNext()) {
-                String moduleName = (String) modules.next();
-                AxisModule axisModule = axisConfig.getModule(moduleName);
-
-                if (axisModule != null) {
-                    Module moduleImpl = axisModule.getModule();
-                    if (moduleImpl != null) {
-                        // notyfying module for service engagement
-                        moduleImpl.engageNotify(service);
+            for (Iterator iterator = getEngagedModules().iterator(); iterator.hasNext();) {
+                Object o = iterator.next();
+                AxisModule axisModule;
+                if (o instanceof AxisModule) {
+                    axisModule = (AxisModule) o;
+                } else if (o instanceof String) { //Should this be checked
+                    String moduleName = (String) o;
+                    axisModule = axisConfig.getModule(moduleName);
+                    if (axisModule == null) {
+                        throw new AxisFault(Messages.getMessage("modulenotavailble", moduleName));
                     }
-                    service.engageModule(axisModule);
                 } else {
-                    throw new AxisFault(Messages.getMessage("modulenotavailble", moduleName));
+                    throw new AxisFault(Messages.getMessage("modulenotavailble"));
                 }
+                Module moduleImpl = axisModule.getModule();
+                if (moduleImpl != null) {
+                    // notyfying module for service engagement
+                    moduleImpl.engageNotify(service);
+                }
+                service.engageModule(axisModule);
             }
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org