airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [21/90] [abbrv] [partial] AIRAVATA-1124
Date Mon, 14 Apr 2014 18:30:23 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/messagebroker/src/test/java/org/apache/airavata/wsmg/util/TestUtilServer.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/messagebroker/src/test/java/org/apache/airavata/wsmg/util/TestUtilServer.java b/modules/ws-messenger/messagebroker/src/test/java/org/apache/airavata/wsmg/util/TestUtilServer.java
deleted file mode 100644
index 29fdbdf..0000000
--- a/modules/ws-messenger/messagebroker/src/test/java/org/apache/airavata/wsmg/util/TestUtilServer.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.wsmg.util;
-
-import javax.xml.namespace.QName;
-
-import org.apache.airavata.wsmg.broker.BrokerServiceLifeCycle;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.InOutAxisOperation;
-import org.apache.axis2.engine.MessageReceiver;
-import org.apache.axis2.engine.ServiceLifeCycle;
-import org.apache.axis2.transport.http.SimpleHTTPServer;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.nio.channels.ServerSocketChannel;
-
-public class TestUtilServer {
-    private static int count = 0;
-
-    private static SimpleHTTPServer receiver;
-
-    public static int TESTING_PORT = 5555;
-
-    public static final String FAILURE_MESSAGE = "Intentional Failure";
-
-    public static synchronized void deployService(AxisService service) throws AxisFault {
-        receiver.getConfigurationContext().getAxisConfiguration().addService(service);
-    }
-
-    public static synchronized void unDeployService(QName service) throws AxisFault {
-        receiver.getConfigurationContext().getAxisConfiguration().removeService(service.getLocalPart());
-    }
-
-    public static synchronized void unDeployClientService() throws AxisFault {
-        if (receiver.getConfigurationContext().getAxisConfiguration() != null) {
-            receiver.getConfigurationContext().getAxisConfiguration().removeService("AnonymousService");
-        }
-    }
-
-    public static synchronized void start(String repository, String axis2xml) throws Exception {
-        if (count == 0) {
-            ConfigurationContext er = getNewConfigurationContext(repository, axis2xml);
-            TESTING_PORT = getAvailablePort();
-            receiver = new SimpleHTTPServer(er, TESTING_PORT);
-
-            try {
-                receiver.start();
-                System.out.print("Server started on port " + TESTING_PORT + ".....");
-            } catch (Exception e) {
-                throw AxisFault.makeFault(e);
-            }
-
-            try {
-                Thread.sleep(2000);
-            } catch (InterruptedException e1) {
-                throw new AxisFault("Thread interuptted", e1);
-            }
-            startBroker();
-        }
-        count++;
-    }
-
-    public static void startBroker() throws Exception {
-
-        ServiceLifeCycle brokerLifeCycle = new BrokerServiceLifeCycle();
-
-        final String configFileParam = "configuration.file.name";
-        final String configFileValue = "airavata-server.properties";
-
-        AxisService notificationService = getNotificationService();
-        notificationService.addParameter(configFileParam, configFileValue);
-        notificationService.setServiceLifeCycle(brokerLifeCycle);
-        TestUtilServer.deployService(notificationService);
-        brokerLifeCycle.startUp(TestUtilServer.getConfigurationContext(), notificationService);
-
-        AxisService eventingService = getEventingService();
-        eventingService.addParameter(configFileParam, configFileValue);
-        eventingService.setServiceLifeCycle(brokerLifeCycle);
-        TestUtilServer.deployService(eventingService);
-        brokerLifeCycle.startUp(TestUtilServer.getConfigurationContext(), eventingService);
-
-    }
-
-    public static AxisService getEventingService() {
-
-        AxisService eventingService = new AxisService("EventingService");
-
-        createOperation(eventingService, "renew",
-                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew",
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse");
-        createOperation(eventingService, "getStatus",
-                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus",
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse");
-
-        createOperation(eventingService, "subscriptionEnd",
-                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscriptionEnd", null);
-
-        createOperation(eventingService, "subscribe",
-                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe",
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse");
-        createOperation(eventingService, "unsubscribe",
-                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe",
-                "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse");
-        createOperation(eventingService, "publish",
-                new org.apache.airavata.wsmg.broker.wseventing.WSEventingPublishMsgReceiver(),
-                "http://org.apache.airavata/WseNotification", null);
-
-        return eventingService;
-    }
-
-    public static AxisService getNotificationService() {
-
-        AxisService notificationService = new AxisService("NotificationService");
-
-        createOperation(notificationService, "notify",
-                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/Notify",
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/NotifyResponse");
-
-        createOperation(notificationService, "subscribe",
-                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/SubscribeRequest",
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/SubscribeRequestResponse");
-
-        createOperation(notificationService, "getCurrentMessage",
-                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/GetCurrentMessageRequest",
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/GetCurrentMessageResponse");
-
-        createOperation(notificationService, "pauseSubscription",
-                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/PauseSubsriptionRequest",
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/PauseSubscriptionResponse");
-
-        createOperation(notificationService, "resumeSubscription",
-                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/ResumeSubsriptionRequest",
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/ResumeSubscriptionResponse");
-
-        createOperation(notificationService, "unsubscribe",
-                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/UnsubsribeRequest",
-                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/UnsubscribeResponse");
-
-        return notificationService;
-
-    }
-
-    public static void createOperation(AxisService axisService, String name, MessageReceiver messageReceiver,
-            String inputAction, String outputAction) {
-        InOutAxisOperation operation1 = new InOutAxisOperation(new QName(name));
-        operation1.setMessageReceiver(messageReceiver);
-        operation1.setOutputAction(outputAction);
-        axisService.addOperation(operation1);
-        if (inputAction != null) {
-            axisService.mapActionToOperation(inputAction, operation1);
-        }
-    }
-
-    public static ConfigurationContext getNewConfigurationContext(String repository, String axis2xml) throws Exception {
-        return ConfigurationContextFactory.createConfigurationContextFromFileSystem(repository, axis2xml);
-    }
-
-    public static synchronized void stop() throws AxisFault {
-        if (count == 1) {
-            receiver.stop();
-            while (receiver.isRunning()) {
-                try {
-                    Thread.sleep(1000);
-                } catch (InterruptedException e1) {
-                    // nothing to do here
-                }
-            }
-            count = 0;
-            // tp.doStop();
-            System.out.print("Server stopped .....");
-        } else {
-            count--;
-        }
-        receiver.getConfigurationContext().terminate();
-    }
-
-    public static ConfigurationContext getConfigurationContext() {
-        return receiver.getConfigurationContext();
-    }
-
-    public static int getAvailablePort(){
-        ServerSocket serverSocket = null;
-        try {
-             serverSocket = new ServerSocket(0);
-             serverSocket.close();
-        } catch (IOException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        return serverSocket.getLocalPort();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/messagebroker/src/test/resources/unit_tests.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/messagebroker/src/test/resources/unit_tests.properties b/modules/ws-messenger/messagebroker/src/test/resources/unit_tests.properties
deleted file mode 100644
index 33b6161..0000000
--- a/modules/ws-messenger/messagebroker/src/test/resources/unit_tests.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-consumer.port=2222
-consumer.location=http://localhost:2222
-topic.simple=MySimpleTestTopic
-topic.xpath=MyXpathTextTopic

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/pom.xml b/modules/ws-messenger/pom.xml
index 7f4bc99..275e217 100644
--- a/modules/ws-messenger/pom.xml
+++ b/modules/ws-messenger/pom.xml
@@ -146,10 +146,7 @@
             <modules>
                 <module>commons</module>
                 <module>client</module>
-                <!--module>messagebox</module-->
-                <!--module>messagebroker</module-->
                 <module>message-monitor</module>
-                <!-- <module>distribution</module> -->
             </modules>
         </profile>
     </profiles>

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/README.txt
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/README.txt b/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/README.txt
deleted file mode 100644
index aaf1ec5..0000000
--- a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/README.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-wsmg-msgbox Quick Start Guide- Sample 1 
-=================================
-
-This sample demonstrate how create a message box, how to store a message and retrieve that message and ultimately how to destroy the created
-message box. 
-
-
-
-Pre-Requisites
-==============
-
-Apache Ant 1.7.1 or later
-Apache Axis2 1.5 or later
-
-
-
-Steps:
-======
-
-1) configure and run wsmg-msgbox. please refer wsmg-msgbox user guide to know how to run the wsmg-msgbox.
-
-2) configure 'build.properties' located in the sample directory.
-
-3) set configurations in './conf/configuration.properties' file.
-
-4) run following command:
-      ant run
-      

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.properties b/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.properties
deleted file mode 100644
index bbb4014..0000000
--- a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-
-axis2.home=../../../standalone-server/

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.xml b/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.xml
deleted file mode 100644
index 9925e14..0000000
--- a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/build.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="msgboxsamples" default="run" basedir=".">
-
-	<property file="build.properties" />
-	<property name="lib.path" value="../../../lib" />
-	<property name="dest.dir" value="bin" />
-	<property name="src.dir" value="src" />
-	<property name="conf.dir" location="conf" />
-
-	
-
-	<path id="msgbox.class.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-
-		<path location="${conf.dir}" />
-
-		<pathelement location="${dest.dir}" />
-
-	</path>
-
-
-	<target name="clean">
-		<delete dir="${dest.dir}" />
-	</target>
-
-	<target name="build" depends="makeDest">
-		<antcall target="compile" />
-	</target>
-
-	<target name="makeDest">
-		<mkdir dir="${dest.dir}" />
-	</target>
-
-
-	<target name="compile" depends="makeDest">
-		<javac debug="true" srcdir="${src.dir}" destdir="${dest.dir}">
-			<classpath refid="msgbox.class.path" />
-		</javac>
-	</target>
-
-
-	<target name="run" depends="build">
-
-		<java classname="org.apache.airavata.wsmg.samples.msgBox.SimpleMsgBoxExec" fork="true">
-			<classpath refid="msgbox.class.path" />
-		</java>
-
-	</target>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/conf/configuration.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/conf/configuration.properties b/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/conf/configuration.properties
deleted file mode 100644
index 875cdfe..0000000
--- a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/conf/configuration.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-axis2.repository=../../../standalone-server/
-msgbox.service.url=http://localhost:8080/axis2/services/MsgBoxService
-msgbox.id=67889-28837892-33457700-33-4889uu9688--4770333068

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/msgBox/SimpleMsgBoxExec.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/msgBox/SimpleMsgBoxExec.java b/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/msgBox/SimpleMsgBoxExec.java
deleted file mode 100644
index 5a6f83f..0000000
--- a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/msgBox/SimpleMsgBoxExec.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.msgBox;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.UUID;
-import javax.xml.stream.XMLStreamException;
-import org.apache.axiom.om.OMElement;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.airavata.wsmg.msgbox.client.MsgBoxClient;
-import org.apache.airavata.wsmg.msgbox.util.MsgBoxUtils;
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-import java.io.*;
-
-public class SimpleMsgBoxExec {
-
-	private static Properties getDefaults() {
-		Properties defaults = new Properties();
-		defaults.setProperty(ConfigKeys.MSGBOX_SERVICE_URL,
-				"http://localhost:8080/axis2/services/MsgBoxService");
-		return defaults;
-	}
-
-	public static void main(String[] args) throws IOException {
-
-		Properties configurations = new Properties(getDefaults());
-		try {
-			InputStream ioStream = new FileInputStream(ConfigKeys.CONFIG_FILE_NAME);
-			configurations.load(ioStream);
-		} catch (IOException ioe) {
-
-			System.out.println("unable to load configuration file, "
-					+ "default settings will be used");
-		}
-
-		String msgBoxId = UUID.randomUUID().toString();
-		MsgBoxClient client = new MsgBoxClient();
-
-		EndpointReference msgBoxEpr = client.createMessageBox(configurations
-				.getProperty(ConfigKeys.MSGBOX_SERVICE_URL), 500L);
-
-		try {
-			client.storeMessage(msgBoxEpr, 500L, MsgBoxUtils
-					.reader2OMElement(new StringReader(
-							"<test>A simple test message</test>")));
-		} catch (XMLStreamException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		Iterator<OMElement> iterator = client.takeMessagesFromMsgBox(msgBoxEpr,
-				500L);
-		int i = 0;
-		if (iterator != null)
-			while (iterator.hasNext()) {
-				i++;
-				System.out.println("Retrieved message :" + i);
-				try {
-					System.out.println(iterator.next().toStringWithConsume());
-				} catch (XMLStreamException e) {
-					e.printStackTrace();
-				}
-			}
-
-		/*
-		System.out.println("Delete message box response :  "
-				+ client.deleteMsgBox(msgBoxEpr, 500L));
-				*/
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java b/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
deleted file mode 100644
index 15962b4..0000000
--- a/modules/ws-messenger/samples/messagebox/messagebox-create-store-take-delete/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.util;
-
-public class ConfigKeys {
-	
-	public static final String AXIS2_REPO = "axis2.repository";
-	public static final String CONFIG_FILE_NAME = "configuration.properties";
-	public static final String MSGBOX_SERVICE_URL = "msgbox.service.url";
-	public static final String MSGBOX_ID = "msgbox.id";
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/README.txt
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/README.txt b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/README.txt
deleted file mode 100644
index ccd8103..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/README.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-OGCE-WS messenger Quick Start Guide- Sample 2
-=================================
-
-This sample demonstrates a scenarios where multiple producers publish messages under a topic, while a single consumer receive them.
-
-
-Pre-Requisites
-==============
-
-Apache Ant 1.7.1 or later
-Apache Axis2 1.5 or later
-
-
-
-Steps:
-======
-
-1) configure and run ws-messenger in any mode. please refer ws-messenger user guide to know how to run the ws-messenger.
-
-2) configure 'build.properties' located in the sample directory.
-
-3) set configurations in './conf/configuration.properties' file.
-
-4) run following command:
-      ant run
-
-5) Start the WS-Notification Viewer
-      Configure the Topic as 'topic'

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.properties b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.properties
deleted file mode 100644
index 3919fd5..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-axis2.home=../../../standalone-server/

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.xml b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.xml
deleted file mode 100644
index d56a079..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/build.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-
-
-<project name="wse-multi-topics-sample" default="run" basedir=".">
-
-	<property file="build.properties" />
-	<property name="lib.path" value="../../../lib" />
-	<property name="dest.dir" value="bin" />
-	<property name="src.dir" value="src" />
-	<property name="conf.dir" location="conf" />
-
-	<path id="broker.libs.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-	</path>
-
-
-	<path id="broker.class.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-		
-		<path location="${conf.dir}" />
-		
-		<pathelement location="${dest.dir}" />
-	</path>
-
-	<target name="clean">
-		<delete dir="${dest.dir}" />
-	</target>
-
-	<target name="build" depends="makeDest">
-		<antcall target="compile" />
-	</target>
-
-	<target name="makeDest">
-		<mkdir dir="${dest.dir}" />
-	</target>
-
-
-	<target name="compile" depends="makeDest">
-		<javac debug="true" srcdir="${src.dir}" destdir="${dest.dir}">
-			<classpath refid="broker.libs.path" />
-		</javac>
-	</target>
-
-
-	<target name="run" depends="build">
-
-		<java classname="org.apache.airavata.wsmg.samples.wse.MultipleProducersConsumersTopics" fork="true">
-			<classpath refid="broker.class.path" />
-		</java>
-
-	</target>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/conf/configurations.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/conf/configurations.properties b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/conf/configurations.properties
deleted file mode 100644
index 29f5242..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/conf/configurations.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-#broker.eventing.service.epr=http://localhost:8080/axis2/services/EventingService
-broker.notification.service.epr=http://localhost:8080/axis2/services/NotificationService
-consumer.port=6060
-topic.prefix=topic
-publish.time.interval=6
-producer.count.per.topic=2
-consumer.count.per.topic=3
-number.of.topics=1

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
deleted file mode 100644
index 3dcdff4..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.util;
-
-public interface ConfigKeys {
-
-	String CONFIG_FILE_NAME = "configurations.properties";
-
-	String BROKER_EVENTING_SERVICE_EPR = "broker.eventing.service.epr";
-	String BROKER_NOTIFICATIONS_SERVICE_EPR = "broker.notification.service.epr";
-
-	String CONSUMER_PORT_OFFSET = "consumer.port";
-	String TOPIC_PREFIX = "topic.prefix";
-	String PUBLISH_TIME_INTERVAL = "publish.time.interval";
-	String PRODUCER_COUNT_PER_TOPIC = "producer.count.per.topic";
-	String CONSUMER_COUNT_PER_TOPIC = "consumer.count.per.topic";
-	String NUMBER_OF_TOPICS = "number.of.topics";
-	String LOG_FILE_PATH = "logfile.path";
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java
deleted file mode 100644
index d390e0f..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-
-public class MsgUtil {
-
-	static final String TAG_MSG = "msg";
-	static final String TAG_SEQ = "seq";
-	static final String TAG_SRC = "src";
-	static final String TAG_UUID = "uuid";
-
-	public static OMElement createMsg(long seq, String src, String uuid) {
-
-		// "<msg><seq>%d</seq><src>%s</src><uuid>%s</uuid></msg>"
-
-		OMFactory factory = OMAbstractFactory.getOMFactory();
-
-		OMElement omMsg = factory.createOMElement(TAG_MSG, null);
-
-		OMElement omSeq = factory.createOMElement(TAG_SEQ, null, omMsg);
-		omSeq.setText("" + seq);
-
-		OMElement omSrc = factory.createOMElement(TAG_SRC, null, omMsg);
-		omSrc.setText(src);
-
-		OMElement omUUID = factory.createOMElement(TAG_UUID, null, omMsg);
-		omUUID.setText(uuid);
-
-		return omMsg;
-	}
-
-	public static String getSeq(OMElement msg) {
-
-		return msg.getFirstElement().getText();
-
-	}
-
-	public static void print(String msg, OMElement ele){
-		
-		try{
-			System.out.println(msg + "-" + ele.toStringWithConsume());
-		}catch(Exception e){
-			e.printStackTrace();
-		}
-		
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java
deleted file mode 100644
index c0bfd6e..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import java.io.*;
-import java.net.URL;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import java.io.FileInputStream;
-import java.io.InputStream;
-
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-
-public class MultipleProducersConsumersTopics {
-
-	static DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
-
-	private static Properties getDefaults() {
-
-		Properties defaults = new Properties();
-		defaults.setProperty(ConfigKeys.BROKER_EVENTING_SERVICE_EPR,
-				"http://localhost:8080/axis2/services/EventingService");
-		defaults.setProperty(ConfigKeys.CONSUMER_PORT_OFFSET, "2222");
-
-		defaults.setProperty(ConfigKeys.PUBLISH_TIME_INTERVAL, "5");
-		defaults.setProperty(ConfigKeys.PRODUCER_COUNT_PER_TOPIC, "2");
-		defaults.setProperty(ConfigKeys.CONSUMER_COUNT_PER_TOPIC, "3");
-		defaults.setProperty(ConfigKeys.NUMBER_OF_TOPICS, "5");
-		defaults.setProperty(ConfigKeys.TOPIC_PREFIX, "topic_prefix_");
-		defaults.setProperty(ConfigKeys.LOG_FILE_PATH, "stats.log");
-
-		return defaults;
-	}
-
-	public static void main(String[] args) throws InterruptedException {
-
-		Properties configurations = new Properties(getDefaults());
-		try {
-			InputStream ioStream = new FileInputStream(ConfigKeys.CONFIG_FILE_NAME);
-			configurations.load(ioStream);
-		} catch (IOException ioe) {
-
-			System.out.println("unable to load configuration file, "
-					+ "default settings will be used");
-		}
-
-		int numberOfProducers = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.PRODUCER_COUNT_PER_TOPIC));
-
-		int numberOfConsumers = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.CONSUMER_COUNT_PER_TOPIC));
-
-		int numberOfTopics = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.NUMBER_OF_TOPICS));
-
-		String topicPrefix = configurations
-				.getProperty(ConfigKeys.TOPIC_PREFIX);
-
-		int portOffset = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.CONSUMER_PORT_OFFSET));
-
-		//List<List<Consumer>> consumers = new ArrayList<List<Consumer>>();
-		List<List<Producer>> producers = new ArrayList<List<Producer>>();
-
-		for (int i = 0; i < numberOfTopics; i++) {
-
-			TimeUnit.SECONDS.sleep(1);
-
-			producers.add(createProducers(numberOfProducers, topicPrefix,
-					configurations));
-		}
-
-		PrintStream printStream = null;
-		try {
-			FileOutputStream outputStream = new FileOutputStream(configurations
-					.getProperty(ConfigKeys.LOG_FILE_PATH), true);
-
-			printStream = new PrintStream(outputStream, true);
-
-		} catch (FileNotFoundException e) {
-			System.out
-					.println("unable to open the file - stats will be printed to console");
-			printStream = System.out;
-		}
-	}
-
-	private static List<Producer> createProducers(int number, String topic,
-			Properties config) {
-
-		List<Producer> ret = new ArrayList<Producer>();
-
-		for (int i = 0; i < number; i++) {
-			Producer p = new Producer(
-					String.format("producer_%s_%d", topic, i), topic, config);
-			p.start();
-			ret.add(p);
-		}
-
-		return ret;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java b/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java
deleted file mode 100644
index 9a556be..0000000
--- a/modules/ws-messenger/samples/messagebroker/wnt-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.axiom.om.OMElement;
-
-import org.apache.airavata.wsmg.client.MsgBrokerClientException;
-import org.apache.airavata.wsmg.client.WsntMsgBrokerClient;
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-
-public class Producer extends Thread {
-
-	private Properties configurations;
-	private String topicExpression;
-
-	private Random random;
-
-	public Producer(String producerId, String topic, Properties config) {
-		super(producerId);
-		configurations = config;
-		topicExpression = topic;
-		random = new Random();
-	}
-
-	public void run() {
-
-		System.out.println(String
-				.format("producer [%s] starting...", getName()));
-
-		String brokerLocation = configurations
-				.getProperty(ConfigKeys.BROKER_NOTIFICATIONS_SERVICE_EPR);
-
-		int timeIntervalUpperLimit = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.PUBLISH_TIME_INTERVAL));
-
-		WsntMsgBrokerClient client = new WsntMsgBrokerClient();
-		client.init(brokerLocation);
-
-		try {
-
-			long count = 0;
-			while (true) {
-				UUID uuid = UUID.randomUUID();
-				count++;
-				OMElement omMsg = MsgUtil.createMsg(count, getName(), uuid
-						.toString());
-				//MsgUtil.print("seding msg", omMsg);
-				client.publish(topicExpression, omMsg);
-
-				TimeUnit.SECONDS
-						.sleep(getRandomSleepTime(timeIntervalUpperLimit));
-			}
-
-		} catch (InterruptedException e) {
-			e.printStackTrace();
-			System.out.println("interruped");
-		} catch (MsgBrokerClientException f) {
-			f.printStackTrace();
-			System.out.println("unable to publish messages - producer will stop.");
-		}
-	}
-
-	private int getRandomSleepTime(int upperLimit) {
-
-		int rnd = random.nextInt() % upperLimit;
-
-		return rnd < 2 ? 2 : rnd;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/README.txt
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/README.txt b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/README.txt
deleted file mode 100644
index 8c166bb..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/README.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-OGCE-WS messenger Quick Start Guide- Sample 1 
-=================================
-
-This sample demonstrates a scenarios where multiple producers publish messages under a topic, while multiple consumers receive them.
-
-
-Pre-Requisites
-==============
-
-Apache Ant 1.7.1 or later
-Apache Axis2 1.5 or later
-
-
-
-Steps:
-======
-
-1) configure and run ws-messenger in any mode. please refer ws-messenger user guide to know how to run the ws-messenger.
-
-2) configure 'build.properties' located in the sample directory.
-
-3) set configurations in './conf/configuration.properties' file.
-
-4) run following command:
-      ant run

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.properties b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.properties
deleted file mode 100644
index 3919fd5..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-axis2.home=../../../standalone-server/

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.xml b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.xml
deleted file mode 100644
index d56a079..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/build.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-
-
-<project name="wse-multi-topics-sample" default="run" basedir=".">
-
-	<property file="build.properties" />
-	<property name="lib.path" value="../../../lib" />
-	<property name="dest.dir" value="bin" />
-	<property name="src.dir" value="src" />
-	<property name="conf.dir" location="conf" />
-
-	<path id="broker.libs.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-	</path>
-
-
-	<path id="broker.class.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-		
-		<path location="${conf.dir}" />
-		
-		<pathelement location="${dest.dir}" />
-	</path>
-
-	<target name="clean">
-		<delete dir="${dest.dir}" />
-	</target>
-
-	<target name="build" depends="makeDest">
-		<antcall target="compile" />
-	</target>
-
-	<target name="makeDest">
-		<mkdir dir="${dest.dir}" />
-	</target>
-
-
-	<target name="compile" depends="makeDest">
-		<javac debug="true" srcdir="${src.dir}" destdir="${dest.dir}">
-			<classpath refid="broker.libs.path" />
-		</javac>
-	</target>
-
-
-	<target name="run" depends="build">
-
-		<java classname="org.apache.airavata.wsmg.samples.wse.MultipleProducersConsumersTopics" fork="true">
-			<classpath refid="broker.class.path" />
-		</java>
-
-	</target>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/conf/configurations.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/conf/configurations.properties b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/conf/configurations.properties
deleted file mode 100644
index b4c37dd..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/conf/configurations.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-broker.eventing.service.epr=http://localhost:8080/axis2/services/EventingService
-broker.notification.service.epr=http://localhost:8080/axis2/services/NotificationService
-consumer.port=6060
-topic.prefix=topic_prefix_
-publish.time.interval=6
-producer.count.per.topic=2
-consumer.count.per.topic=3
-number.of.topics=1

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
deleted file mode 100644
index 3dcdff4..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.util;
-
-public interface ConfigKeys {
-
-	String CONFIG_FILE_NAME = "configurations.properties";
-
-	String BROKER_EVENTING_SERVICE_EPR = "broker.eventing.service.epr";
-	String BROKER_NOTIFICATIONS_SERVICE_EPR = "broker.notification.service.epr";
-
-	String CONSUMER_PORT_OFFSET = "consumer.port";
-	String TOPIC_PREFIX = "topic.prefix";
-	String PUBLISH_TIME_INTERVAL = "publish.time.interval";
-	String PRODUCER_COUNT_PER_TOPIC = "producer.count.per.topic";
-	String CONSUMER_COUNT_PER_TOPIC = "consumer.count.per.topic";
-	String NUMBER_OF_TOPICS = "number.of.topics";
-	String LOG_FILE_PATH = "logfile.path";
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Consumer.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Consumer.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Consumer.java
deleted file mode 100644
index 07c8d83..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Consumer.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import java.util.Properties;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.SOAPEnvelope;
-
-import org.apache.airavata.wsmg.client.ConsumerNotificationHandler;
-import org.apache.airavata.wsmg.client.MsgBrokerClientException;
-import org.apache.airavata.wsmg.client.WseMsgBrokerClient;
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-
-public class Consumer extends Thread {
-
-	class NotificationMsgReciever implements ConsumerNotificationHandler {
-
-		private BlockingQueue<SOAPEnvelope> queue = new LinkedBlockingQueue<SOAPEnvelope>();
-
-		public void handleNotification(SOAPEnvelope msgEnvelope) {
-
-			queue.add(msgEnvelope);
-		}
-
-		public BlockingQueue<SOAPEnvelope> getQueue() {
-			return queue;
-		}
-
-	}
-
-	private Properties configurations;
-	private int consumerPort;
-	private String topic;
-
-	AtomicLong numberOfMsgRecieved;
-
-	public Consumer(String consumerName, int port, String topic,
-			Properties config) {
-		super(consumerName);
-		consumerPort = port;
-		configurations = config;
-		this.topic = topic;
-		numberOfMsgRecieved = new AtomicLong(0);
-	}
-
-	public void run() {
-
-		String brokerLocation = configurations
-				.getProperty(ConfigKeys.BROKER_EVENTING_SERVICE_EPR);
-
-		NotificationMsgReciever msgReciever = new NotificationMsgReciever();
-
-		String[] consumerEprs = null;
-
-		String subscriptionId = null;
-
-		WseMsgBrokerClient client = new WseMsgBrokerClient();
-		client.init(brokerLocation);
-		try {
-			consumerEprs = client.startConsumerService(consumerPort,
-					msgReciever);
-
-		} catch (MsgBrokerClientException e) {
-
-			e.printStackTrace();
-
-			System.out.println("unable to start consumer service, exiting");
-			return;
-		}
-
-		try {
-
-			subscriptionId = client.subscribe(consumerEprs[0], topic, null);
-			System.out.println(getName() + "got the subscription id :"
-					+ subscriptionId);
-
-		} catch (MsgBrokerClientException e) {
-
-			e.printStackTrace();
-
-			System.out
-					.println("unable to subscribe for the xpath consumer exiting");
-			return;
-		}
-
-		try {
-
-			do {
-				SOAPEnvelope env = msgReciever.getQueue().take();
-
-				try {
-					OMElement msg = env.getBody().getFirstElement();
-
-					numberOfMsgRecieved.incrementAndGet();
-
-					 System.out .println(String.format(
-					 "consumer [%s] recieved: %s", getName(),
-					 numberOfMsgRecieved));
-				} catch (Exception e) {
-					System.err.print("invalid msg recieved");
-				}
-
-			} while (true);
-
-		} catch (InterruptedException ie) {
-
-			try {
-				// unsubscribe from the topic.
-				client.unSubscribe(subscriptionId);
-
-			} catch (MsgBrokerClientException e) {
-
-				e.printStackTrace();
-				System.out.println("unable to unsubscribe, ignoring");
-			}
-
-			// shutdown the consumer service.
-			client.shutdownConsumerService();
-
-			System.out.println("interrupted");
-
-		}
-
-	}
-
-	public long getLatestSeq() {
-		return numberOfMsgRecieved.get();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java
deleted file mode 100644
index d390e0f..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MsgUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-
-public class MsgUtil {
-
-	static final String TAG_MSG = "msg";
-	static final String TAG_SEQ = "seq";
-	static final String TAG_SRC = "src";
-	static final String TAG_UUID = "uuid";
-
-	public static OMElement createMsg(long seq, String src, String uuid) {
-
-		// "<msg><seq>%d</seq><src>%s</src><uuid>%s</uuid></msg>"
-
-		OMFactory factory = OMAbstractFactory.getOMFactory();
-
-		OMElement omMsg = factory.createOMElement(TAG_MSG, null);
-
-		OMElement omSeq = factory.createOMElement(TAG_SEQ, null, omMsg);
-		omSeq.setText("" + seq);
-
-		OMElement omSrc = factory.createOMElement(TAG_SRC, null, omMsg);
-		omSrc.setText(src);
-
-		OMElement omUUID = factory.createOMElement(TAG_UUID, null, omMsg);
-		omUUID.setText(uuid);
-
-		return omMsg;
-	}
-
-	public static String getSeq(OMElement msg) {
-
-		return msg.getFirstElement().getText();
-
-	}
-
-	public static void print(String msg, OMElement ele){
-		
-		try{
-			System.out.println(msg + "-" + ele.toStringWithConsume());
-		}catch(Exception e){
-			e.printStackTrace();
-		}
-		
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java
deleted file mode 100644
index fbf12b0..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/MultipleProducersConsumersTopics.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import java.io.*;
-import java.net.URL;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import java.io.FileInputStream;
-import java.io.InputStream;
-
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-
-public class MultipleProducersConsumersTopics {
-
-	static DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
-
-	private static Properties getDefaults() {
-
-		Properties defaults = new Properties();
-		defaults.setProperty(ConfigKeys.BROKER_EVENTING_SERVICE_EPR,
-				"http://localhost:8080/axis2/services/EventingService");
-		defaults.setProperty(ConfigKeys.CONSUMER_PORT_OFFSET, "2222");
-
-		defaults.setProperty(ConfigKeys.PUBLISH_TIME_INTERVAL, "5");
-		defaults.setProperty(ConfigKeys.PRODUCER_COUNT_PER_TOPIC, "2");
-		defaults.setProperty(ConfigKeys.CONSUMER_COUNT_PER_TOPIC, "3");
-		defaults.setProperty(ConfigKeys.NUMBER_OF_TOPICS, "5");
-		defaults.setProperty(ConfigKeys.TOPIC_PREFIX, "topic_prefix_");
-		defaults.setProperty(ConfigKeys.LOG_FILE_PATH, "stats.log");
-
-		return defaults;
-	}
-
-	public static void main(String[] args) throws InterruptedException {
-
-		Properties configurations = new Properties(getDefaults());
-		try {
-			InputStream ioStream = new FileInputStream(ConfigKeys.CONFIG_FILE_NAME);
-			configurations.load(ioStream);
-		} catch (IOException ioe) {
-
-			System.out.println("unable to load configuration file, "
-					+ "default settings will be used");
-		}
-
-		int numberOfProducers = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.PRODUCER_COUNT_PER_TOPIC));
-
-		int numberOfConsumers = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.CONSUMER_COUNT_PER_TOPIC));
-
-		int numberOfTopics = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.NUMBER_OF_TOPICS));
-
-		String topicPrefix = configurations
-				.getProperty(ConfigKeys.TOPIC_PREFIX);
-
-		int portOffset = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.CONSUMER_PORT_OFFSET));
-
-		List<List<Consumer>> consumers = new ArrayList<List<Consumer>>();
-		List<List<Producer>> producers = new ArrayList<List<Producer>>();
-
-		for (int i = 0; i < numberOfTopics; i++) {
-			String topic = topicPrefix + i;
-			consumers.add(createConsumers(numberOfConsumers, portOffset
-					+ (i * numberOfConsumers), topic, configurations));
-
-			TimeUnit.SECONDS.sleep(1);
-
-			producers.add(createProducers(numberOfProducers, topic,
-					configurations));
-		}
-
-		PrintStream printStream = null;
-		try {
-			FileOutputStream outputStream = new FileOutputStream(configurations
-					.getProperty(ConfigKeys.LOG_FILE_PATH), true);
-
-			printStream = new PrintStream(outputStream, true);
-
-		} catch (FileNotFoundException e) {
-			System.out
-					.println("unable to open the file - stats will be printed to console");
-			printStream = System.out;
-		}
-
-		while (true) {
-
-			Date date = new Date();
-			printStream.println("---- statistics at : ["
-					+ dateFormat.format(date) + "]------");
-			for (List<Consumer> l : consumers) {
-
-				for (Consumer c : l) {
-					printStream.println(c.getName() + " latest seq: "
-							+ c.getLatestSeq());
-
-				}
-			}
-
-			TimeUnit.SECONDS.sleep(5);
-		}
-
-	}
-
-	private static List<Consumer> createConsumers(int number, int portOffset,
-			String topic, Properties config) {
-
-		List<Consumer> ret = new ArrayList<Consumer>();
-
-		for (int i = 0; i < number; i++) {
-
-			int port = portOffset + i;
-			Consumer c = new Consumer("consumer_" + port, port, topic, config);
-			c.start();
-			ret.add(c);
-		}
-
-		return ret;
-	}
-
-	private static List<Producer> createProducers(int number, String topic,
-			Properties config) {
-
-		List<Producer> ret = new ArrayList<Producer>();
-
-		for (int i = 0; i < number; i++) {
-			Producer p = new Producer(
-					String.format("producer_%s_%d", topic, i), topic, config);
-			p.start();
-			ret.add(p);
-		}
-
-		return ret;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java
deleted file mode 100644
index b8d773c..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-topics/src/org/apache/airavata/wsmg/samples/wse/Producer.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.axiom.om.OMElement;
-
-import org.apache.airavata.wsmg.client.MsgBrokerClientException;
-import org.apache.airavata.wsmg.client.WseMsgBrokerClient;
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-
-public class Producer extends Thread {
-
-	private Properties configurations;
-	private String topicExpression;
-
-	private Random random;
-
-	public Producer(String producerId, String topic, Properties config) {
-		super(producerId);
-		configurations = config;
-		topicExpression = topic;
-		random = new Random();
-	}
-
-	public void run() {
-
-		System.out.println(String
-				.format("producer [%s] starting...", getName()));
-
-		String brokerLocation = configurations
-				.getProperty(ConfigKeys.BROKER_EVENTING_SERVICE_EPR);
-
-		int timeIntervalUpperLimit = Integer.parseInt(configurations
-				.getProperty(ConfigKeys.PUBLISH_TIME_INTERVAL));
-
-		WseMsgBrokerClient client = new WseMsgBrokerClient();
-		client.init(brokerLocation);
-
-		try {
-
-			long count = 0;
-			while (true) {
-				UUID uuid = UUID.randomUUID();
-				count++;
-				OMElement omMsg = MsgUtil.createMsg(count, getName(), uuid
-						.toString());
-				//MsgUtil.print("seding msg", omMsg);
-				client.publish(topicExpression, omMsg);
-
-				TimeUnit.SECONDS
-						.sleep(getRandomSleepTime(timeIntervalUpperLimit));
-			}
-
-		} catch (InterruptedException e) {
-			e.printStackTrace();
-			System.out.println("interruped");
-		} catch (MsgBrokerClientException f) {
-			f.printStackTrace();
-			System.out.println("unable to publish messages - producer will stop.");
-		}
-	}
-
-	private int getRandomSleepTime(int upperLimit) {
-
-		int rnd = random.nextInt() % upperLimit;
-
-		return rnd < 2 ? 2 : rnd;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/README.txt
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/README.txt b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/README.txt
deleted file mode 100644
index 8c166bb..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/README.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-OGCE-WS messenger Quick Start Guide- Sample 1 
-=================================
-
-This sample demonstrates a scenarios where multiple producers publish messages under a topic, while multiple consumers receive them.
-
-
-Pre-Requisites
-==============
-
-Apache Ant 1.7.1 or later
-Apache Axis2 1.5 or later
-
-
-
-Steps:
-======
-
-1) configure and run ws-messenger in any mode. please refer ws-messenger user guide to know how to run the ws-messenger.
-
-2) configure 'build.properties' located in the sample directory.
-
-3) set configurations in './conf/configuration.properties' file.
-
-4) run following command:
-      ant run

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.properties b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.properties
deleted file mode 100644
index 3919fd5..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-axis2.home=../../../standalone-server/

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.xml b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.xml
deleted file mode 100644
index cdc9cc2..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/build.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-
-
-<project name="wse-multi-xpath-sample" default="run" basedir=".">
-
-	<property file="build.properties" />
-	<property name="lib.path" value="../../../lib" />
-	<property name="dest.dir" value="bin" />
-	<property name="src.dir" value="src" />
-	<property name="conf.dir" location="conf" />
-
-	<path id="broker.libs.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-	</path>
-
-
-	<path id="broker.class.path">
-		<fileset dir="${lib.path}">
-			<include name="*.jar" />
-		</fileset>
-
-		<fileset dir="${axis2.home}/lib">
-			<include name="*.jar" />
-		</fileset>
-		
-		<path location="${conf.dir}" />
-		
-		<pathelement location="${dest.dir}" />
-	</path>
-
-	<target name="clean">
-		<delete dir="${dest.dir}" />
-	</target>
-
-	<target name="build" depends="makeDest">
-		<antcall target="compile" />
-	</target>
-
-	<target name="makeDest">
-		<mkdir dir="${dest.dir}" />
-	</target>
-
-
-	<target name="compile" depends="makeDest">
-		<javac debug="true" srcdir="${src.dir}" destdir="${dest.dir}">
-			<classpath refid="broker.libs.path" />
-		</javac>
-	</target>
-
-
-	<target name="run" depends="build">
-
-		<java classname="org.apache.airavata.wsmg.samples.wse.MultipleProducersConsumers" fork="true">
-			<classpath refid="broker.class.path" />
-		</java>
-
-	</target>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/conf/configurations.properties
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/conf/configurations.properties b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/conf/configurations.properties
deleted file mode 100644
index cd2821b..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/conf/configurations.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-broker.eventing.service.epr=http://localhost:8080/axis2/services/EventingService
-broker.notification.service.epr=http://localhost:8080/axis2/services/NotificationService
-consumer.port=6060
-topic.xpath=/msg/src
-publish.time.interval=5
-producer.count=2
-consumer.count=3

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
deleted file mode 100644
index 4ed6566..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/util/ConfigKeys.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.util;
-
-public interface ConfigKeys {
-
-	String CONFIG_FILE_NAME = "configurations.properties";
-
-	String BROKER_EVENTING_SERVICE_EPR = "broker.eventing.service.epr";
-	String BROKER_NOTIFICATIONS_SERVICE_EPR = "broker.notification.service.epr";
-
-	String CONSUMER_EPR = "consumer.location";
-	String CONSUMER_PORT_OFFSET = "consumer.port";
-	String TOPIC_SIMPLE = "topic.simple";
-	String TOPIC_XPATH = "topic.xpath";
-	String AXIS2_REPO = "axis2.repo";
-	String PUBLISH_TIME_INTERVAL = "publish.time.interval";
-	String PRODUCER_COUNT = "producer.count";
-	String CONSUMER_COUNT = "consumer.count";
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0e2c10f5/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/wse/Consumer.java
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/wse/Consumer.java b/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/wse/Consumer.java
deleted file mode 100644
index 9462a8b..0000000
--- a/modules/ws-messenger/samples/messagebroker/wse-multiple-producers-consumers-xpath/src/org/apache/airavata/wsmg/samples/wse/Consumer.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.wsmg.samples.wse;
-
-import java.util.Properties;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axis2.AxisFault;
-
-import org.apache.airavata.wsmg.client.ConsumerNotificationHandler;
-import org.apache.airavata.wsmg.client.MsgBrokerClientException;
-import org.apache.airavata.wsmg.client.WseMsgBrokerClient;
-import org.apache.airavata.wsmg.samples.util.ConfigKeys;
-
-public class Consumer extends Thread {
-
-	class NotificationMsgReciever implements ConsumerNotificationHandler {
-
-		private BlockingQueue<SOAPEnvelope> queue = new LinkedBlockingQueue<SOAPEnvelope>();
-
-		public void handleNotification(SOAPEnvelope msgEnvelope) {
-
-			queue.add(msgEnvelope);
-		}
-
-		public BlockingQueue<SOAPEnvelope> getQueue() {
-			return queue;
-		}
-
-	}
-
-	private Properties configurations;
-	private int consumerPort;
-
-	public Consumer(String consumerName, int port, Properties config) {
-		super(consumerName);
-		consumerPort = port;
-		configurations = config;
-	}
-
-	public void run() {
-
-		String brokerLocation = configurations
-				.getProperty(ConfigKeys.BROKER_EVENTING_SERVICE_EPR);
-		String xpathExpression = configurations
-				.getProperty(ConfigKeys.TOPIC_XPATH);
-
-		WseMsgBrokerClient client = new WseMsgBrokerClient();
-		client.init(brokerLocation);
-
-		System.out.println("subscribing with xpath expression: "
-				+ xpathExpression);
-
-		NotificationMsgReciever msgReciever = new NotificationMsgReciever();
-
-		String[] consumerEprs = null;
-
-		String subscriptionId = null;
-
-		try {
-			consumerEprs = client.startConsumerService(consumerPort,
-					msgReciever);
-
-		} catch (MsgBrokerClientException e) {
-
-			e.printStackTrace();
-
-			System.out.println("unable to start consumer service, exiting");
-			return;
-		}
-
-		try {
-
-			subscriptionId = client.subscribe(consumerEprs[0], null,
-					xpathExpression);
-			System.out.println(getName() + "got the subscription id :"
-					+ subscriptionId);
-
-		} catch (MsgBrokerClientException e) {
-
-			e.printStackTrace();
-
-			System.out
-					.println("unable to subscribe for the xpath consumer exiting");
-			return;
-		}
-
-		try {
-
-			do {
-
-				SOAPEnvelope env = msgReciever.getQueue().take();
-
-				String msg;
-				try {
-					msg = env.getBody().getFirstElement().toStringWithConsume();
-					System.out.println(String.format(
-							"consumer [%s] recieved: %s", getName(), msg));
-
-				} catch (Exception e) {
-					System.err.print("invalid msg recieved");
-				}
-
-			} while (true);
-
-		} catch (InterruptedException ie) {
-
-			try {
-				// unsubscribe from the topic.
-				client.unSubscribe(subscriptionId);
-			} catch (MsgBrokerClientException e) {
-
-				e.printStackTrace();
-				System.out.println("unable to unsubscribe, ignoring");
-			}
-
-			// shutdown the consumer service.
-			client.shutdownConsumerService();
-
-			System.out.println("interrupted");
-
-		}
-
-	}
-
-}


Mime
View raw message