Author: keith
Date: Mon Aug  4 02:12:45 2008
New Revision: 20343
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20343

Log:
Fix for Mashup-1053


Modified:
   
trunk/mashup/java/modules/patches/axis2/src/org/apache/axis2/transport/jms/JMSListener.java

Modified: 
trunk/mashup/java/modules/patches/axis2/src/org/apache/axis2/transport/jms/JMSListener.java
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/patches/axis2/src/org/apache/axis2/transport/jms/JMSListener.java?rev=20343&r1=20342&r2=20343&view=diff
==============================================================================
--- 
trunk/mashup/java/modules/patches/axis2/src/org/apache/axis2/transport/jms/JMSListener.java
 (original)
+++ 
trunk/mashup/java/modules/patches/axis2/src/org/apache/axis2/transport/jms/JMSListener.java
 Mon Aug  4 02:12:45 2008
@@ -126,17 +126,15 @@
                      "Will not listen for any JMS messages");
             return;
         }
+        // register to receive updates on services for lifetime management
+        axisConf.getAxisConfiguration().addObservers(new JMSAxisObserver());
 
         // iterate through deployed services and validate connection factory
         // names, and mark services as faulty where appropriate.
         HashMap map = axisConf.getAxisConfiguration().getServices();
 
-        // register to receive updates on services for lifetime management
-        axisConf.getAxisConfiguration().addObservers(new JMSAxisObserver());
-        
         HashMap clonedMap = (HashMap)map.clone();
-        Iterator services =
-                clonedMap.values().iterator();
+        Iterator services = clonedMap.values().iterator();
 
         while (services.hasNext()) {
             AxisService service = (AxisService) services.next();
@@ -144,6 +142,25 @@
                 processService(service);
             }
         }
+
+
+        // This is a hack to get through Mashup-1053. So we iterate through 
the service list twice
+        // to see weather we missed any services
+        map = axisConf.getAxisConfiguration().getServices();
+
+        clonedMap = (HashMap)map.clone();
+        services = clonedMap.values().iterator();
+
+        while (services.hasNext()) {
+            AxisService service = (AxisService) services.next();
+            if (JMSUtils.isJMSService(service)) {
+                String epr = (String) 
serviceNameToEprMap.get(service.getName());
+                if (epr == null) {
+                    processService(service);
+                }
+            }
+        }
+
         log.info("JMS Transport Receiver (Listener) initialized...");
     }
 

_______________________________________________
Mashup-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to