You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/31 13:17:29 UTC
[48/51] [partial] applying patch related to JIRA STRATOS-12
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/faq.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/faq.xml b/products/cloud-controller/docs/xdoc/faq.xml
new file mode 100644
index 0000000..5af8bf2
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/faq.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ 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.
+ -->
+
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <title>
+ WSO2 MB - Frequently Asked Questions
+ </title>
+ <link href="css/mb-docs.css" rel="stylesheet"/>
+ <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" media="all"/>
+ </head>
+ <body xml:lang="en">
+ [
+ <a href="docs_index.html">Documentation Index</a>
+ ]
+ <h1>WSO2 Business Server (MB) Frequently Asked Questions</h1>
+ <h2>Contents</h2>
+ <div class="toc">
+ <ol>
+ <li>
+ <a href="#what-features">What are main features of WSO2 MB</a>
+ </li>
+ <li>
+ <a href="#how-to-monitor">How to monitor queues and topics using MB?</a>
+ </li>
+ <li>
+ <a href="#what-sqs">What is MessageBox(SQS)?
+ </a>
+ </li>
+ </ol>
+
+ <h3 id="what-features">
+ 1. What are main features of WSO2 MB?
+ </h3>
+ <p>The Message Broker is compliant with the latest WS-Eventing specification. It's
+ easy-to-use
+ Amazon SQS API provides a standard interface for your message queuing requirements.
+ </p>
+ <p>The underlying JMS engine handles WS-Eventing/JMS synchronisation that enables
+ exposing and
+ consuming your events using two different standard API's.
+ </p>
+ <h3 id="how-to-monitor">
+ 2. How to monitor queues and topics using MB?
+ </h3>
+ <p>All the topics, subscriptions and queue details can be monitored using MB Management
+ Console
+ </p>
+ <h3 id="what-sqs">
+ 3. What is MessageBox(SQS)?
+ </h3>
+ <p>Simple Queue Service(SQS) is a web service interface to do queue related operations.
+ Message box provides this service. Please find more details on how to use SQS in
+ <a href="samples_index.html">WSO2 MB Samples</a>.
+ </p>
+
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/index.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/index.xml b/products/cloud-controller/docs/xdoc/index.xml
new file mode 100644
index 0000000..b680178
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/index.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ ~ 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.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <title>Welcome to WSO2 MB v2.0.1</title>
+ <link href="css/mb-docs.css" rel="stylesheet" />
+ <link href="styles/dist-docs.css" rel="stylesheet" type="text/css"
+ media="all" />
+</head>
+
+<body xml:lang="en" lang="en">
+<h1>Welcome to WSO2 Message Broker v2.0.1</h1>
+
+<p>WSO2 Message Broker (WSO2 MB) is to be your Message Broker System.
+ Our ultimate goal is to provide you with the suitable message brokering
+ service. </p>
+
+<p>MB 2.0.1 supports publishing and receiving messages both online
+and on demand with the features Pub/Sub and Queues. Message broker compatible with
+JMS API and it implements AMQP 0.91 protocol.
+<p>WSO2 MB 2.0.1 is developed on top of the revolutionary <a
+href="http://wso2.org/projects/carbon">Carbon platform</a>
+, and is based on the OSGi framework to achieve the better modularity for
+your Service Oriented Architecture (SOA). This also contains a lots of new
+features and many other optional components to customize the behavior of the
+server. Further, if you do not want any of the built in features, you can
+uninstall those features without any trouble. In other words, MB can be
+customized to your SOA needs. </p>
+
+<p>You can download this distribution from <a
+href="http://wso2.org/downloads/message-broker">Project Download Page </a> and give it a
+try. </p>
+
+<h2>Getting Started</h2>
+
+<p>Getting your message broker project off the ground with the WSO2 MB is
+fairly simple.</p>
+<ol>
+ <li><a href="http://wso2.org/downloads/message-broker">Download</a> the WSO2 MB
+ 2.0.1</li>
+ <li>Read through the <a href="docs_index.html">Documentation Index</a></li>
+ <li>Visit our <a href="http://wso2.com/products/message-broker/">Official Web
+ site</a></li>
+ <li>Look at the <a href="release-notes.html">Release Notes</a> for the high
+ level features, or the <a
+ href="http://wso2.com/products/message-broker/#tabs">WSO2 MB Data
+ Sheet</a></li>
+</ol>
+</p>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/installation_guide.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/installation_guide.xml b/products/cloud-controller/docs/xdoc/installation_guide.xml
new file mode 100644
index 0000000..7f9cf72
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/installation_guide.xml
@@ -0,0 +1,414 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ 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.
+ -->
+
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <title>
+ WSO2 MB - Installation Guide
+ </title>
+ <link href="css/mb-docs.css" rel="stylesheet"/>
+ <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" media="all"/>
+ </head>
+ <body xml:lang="en">
+ [ <a href="docs_index.html"> Documentation Index </a> ]
+ <h1>
+ WSO2 Message Broker (MB) Installation Guide
+ </h1>
+ <p/>
+
+ <p>This installation guide provides information on,</p>
+ <ol>
+ <li>the prerequisites for WSO2 MB</li>
+ <li>installation instructions</li>
+ <li>starting up WSO2 MB, and</li>
+ <li>accessing the management console</li>
+ </ol>
+
+ <p>
+ This document describes the distribution packages available in WSO2 MB -
+ the binary distribution and the source distribution for more advanced
+ users. It is followed by simple instructions on how to install and run
+ WSO2 MB using the binary distribution and how to build WSO2 MB using the
+ source distribution.
+ </p>
+
+ <h2>Contents</h2>
+ <div class="toc">
+ <ul>
+ <li>
+ <a href="#Distribution">Distribution Packages</a>
+ </li>
+ <li>
+ <a href="#Installing">Installing and Running WSO2 MB using the
+ Binary Distribution
+ </a>
+ <ul>
+ <li>
+ <a href="#Prerequisites">Prerequisites</a>
+ </li>
+ <li>
+ <a href="#Installing2">Installing on Linux</a>
+ </li>
+ <li>
+ <a href="#Installing1">Installing on MS Windows</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#Building">Building WSO2 MB Using the Source Distribution</a>
+ <ul>
+ <li>
+ <a href="#Prerequisites">Prerequisites</a>
+ </li>
+ <li>
+ <a href="#Setting">Setting Up the Environment and Tools</a>
+ </li>
+ <li>
+ <a href="#Building1">Building WSO2 MB</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <h2 id="Distribution">
+ Distribution Packages
+ </h2>
+ <p>
+ The following distribution packages are available for <a
+ href="http://wso2.org/downloads/message-broker/">download</a>.
+ </p>
+ <p>
+ 1. Binary Distribution : Includes binary files for both MS Windows and
+ Linux operating systems, compressed into a single a zip file. Recommended
+ for normal users.
+ </p>
+ <p>
+ 2. Source Distribution : Includes the source code for both MS Windows and Linux
+ operating systems, compressed into a single zip file which can be used to build the binary files.
+ Recommended for more advanced users.
+ </p>
+ <h2 id="Installing">
+ Installing and Running WSO2 MB using the Binary Distribution
+ </h2>
+ <h3 id="Prerequisites">
+ Prerequisites
+ </h3>
+ <p/>
+ <table border="2">
+ <tbody>
+ <tr>
+ <td>
+ <a href="http://java.sun.com/javase/downloads/index.jsp">Java SE
+ Development Kit
+ </a>
+ </td>
+ <td>
+ 1.6.x (For instructions on setting up the JDK on different operating
+ systems, visit <a href="http://java.sun.com">http://java.sun.com</a>)
+ <p/>
+ <p>
+ To build WSO2 MB from the Source distribution, it is necessary
+ that you have JDK 1.6.x version and Maven 2.1.0 or later
+ </p>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <a href="http://maven.apache.org/">Apache Maven</a>- To
+ build MB from Source
+ </td>
+ <td>
+ To build the WSO2 MB from its source distribution, you will need
+ Maven 2.1.0 or later
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Web browser- To start the MB Management Console
+ </td>
+ <td>
+ Mozilla Firefox 3.0 at a resolution of 1024x768 is recommended. MS
+ Internet Explorer 7 may be used as well, with some minor limitations. Once
+ the WSO2 MB is started point the browser to
+ https://localhost:9443/carbon in order to access your Management Console.
+ See the
+ <a href="user_guide.html">WSO2 MB User Guide</a>
+ for more details.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Memory
+ </td>
+ <td>
+ No minimum requirement - A heap size of 256~512MB is generally
+ sufficient to process typical SOAP messages. Requirements may vary
+ with larger message size and on the number of messages processed
+ concurrently
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Disk
+ </td>
+ <td>
+ No minimum requirement. The installation will require ~125 MB
+ excluding space allocated for log files and Databases.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Operating System
+ </td>
+ <td>
+ Linux, Solaris, MS Windows - XP/ Vista (Not fully tested on Windows
+ Vista). Since WSO2 MB is a Java application, it will generally be
+ possible to run it on other operating systems with a JDK 1.6.x
+ runtime.
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p/>
+
+ <h2 id="Installing2">Installing on Linux/Unix</h2>
+ <p>
+ The following steps will take you through the binary distribution
+ installation on Unix/Linux systems.
+ </p>
+ <ol>
+ <li>
+ <a href="http://wso2.org/downloads/message-broker/">Download</a>
+ the WSO2 MB binary distribution.
+ </li>
+ <li>
+ Extract the zip archive where you want the WSO2 MB installed (e.g. into
+ /opt)
+ </li>
+ <li>
+ Set the <a href="setting_java_home.html">JAVA_HOME</a>
+ environment variable to your Java home using the
+ export command or by editing /etc/profile, and add the Java /bin
+ directory to your PATH
+ </li>
+ <li>
+ Execute the WSO2 MB start script or the daemon script from the bin
+ directory. e.g. ./stratos.sh OR ./daemon.sh start OR
+ ./stratos.sh --console
+ </li>
+ <li>
+ Check your WSO2 MB instance using the URL https://localhost:9443/carbon
+ which will take you to the WSO2 MB Management Console. (Note that server
+ start up may take time)
+ </li>
+ <li>
+ Login as "admin" using the default password "admin"
+ </li>
+ </ol>
+
+ <h2 id="Installing1">
+ <strong>Installing on MS Windows</strong>
+ </h2>
+ <p>
+ The following steps will take you through the installation for the MS
+ Windows operating system.
+ </p>
+ <ol>
+ <li>
+ <a href="http://wso2.org/downloads/message-broker/">Download</a>
+ the WSO2 MB binary distribution.
+ </li>
+ <li>
+ Extract the zip archive where you want the WSO2 MB installed
+ </li>
+ <li>
+ Set the
+ <a href="setting_java_home.html">JAVA_HOME</a>
+ environment variable to your Java installation, and the PATH environment
+ variable to the Java /bin directory.
+ </li>
+ <li>
+ Execute the WSO2 MB start script from the bin folder. e.g. stratos.bat
+ </li>
+ <li>
+ If you would like to install the WSO2 MB as a Windows service, use the
+ install.bat script
+ </li>
+ <li>
+ Check your WSO2 MB instance using the URL https://localhost:9443/carbon
+ which will take you to the WSO2 MB Management Console.
+ </li>
+ <li>
+ Login as "admin" using the default password "admin"
+ </li>
+ </ol>
+ <h2 id="Building">
+ Building WSO2 MB Using the Source Distribution
+ </h2>
+ <h3 id="Prerequisi1">
+ Prerequisites
+ </h3>
+ <p/>
+ <table border="2">
+ <tbody>
+ <tr>
+ <td>
+ <a href="http://java.sun.com/javase/downloads/index.jsp">Java SE
+ Development Kit
+ </a>
+ </td>
+ <td>
+ 1.6.x (For instructions on setting up the JDK in different operating
+ systems, visit <a href="http://java.sun.com">http://java.sun.com</a>)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="http://maven.apache.org/">Apache Maven</a>- To
+ build MB from Source
+ </td>
+ <td>
+ To build the WSO2 MB from its source distribution, you will need
+ Maven 2.1.0 or later
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Operating System
+ </td>
+ <td>
+ Linux, Solaris, MS Windows - XP/ Vista (Not fully tested on Windows
+ Vista)
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p/>
+ <h3 id="Setting">
+ Setting up the Environment and Tools
+ </h3>
+ <p/>
+ <p>
+ <strong>Maven:</strong>
+ </p>
+ <p>
+ The WSO2 MB build is based on <a href="http://maven.apache.org/">Apache
+ Maven 2</a>. Hence, it is a prerequisite to have Maven (version 2.1.0 or later)
+ and JDK (version 1.6.x) installed in order to build WSO2 MB from the
+ source distribution. Extensive instructions on using Maven 2 are available
+ on the Maven website.
+ </p>
+ <p>
+ Please refer to the
+ <a
+ href="http://maven.apache.org/guides/getting-started/index.html">Maven
+ Getting Started Guide
+ </a>
+ for more information on Maven
+ </p>
+ <ul>
+ <li>
+ Unix based OS (e.g., Linux)
+ </li>
+ </ul>
+ <ol>
+ <li>
+ Download Apache Maven tar ball or the zip archive.
+ </li>
+ <li>
+ Expand it to a directory of choice.
+ </li>
+ <li>
+ Set the environment variable M2_HOME and add M2_HOME/bin to the
+ path as well.
+ </li>
+ <li>
+ Run mvn --version to verify that it is correctly installed.
+ </li>
+ </ol>
+ <ul>
+ <li>
+ MS Windows
+ </li>
+ </ul>
+ <ol>
+ <li>
+ Download and run the Apache Maven Windows installer package.
+ </li>
+ <li>
+ Set the 'Environment Variables' (create the system variable M2_HOME
+ and edit the path. e.g., "C:\Program Files\Apache Software
+ Foundation\maven-2.0.6"; path %M2_HOME%\bin)
+ </li>
+ <li>
+ Make sure that the system variable
+ <a href="setting_java_home.html">JAVA_HOME</a>
+ is set to the location of your JDK, e.g., C:\Program Files\Java\jdk1.5
+ </li>
+ <li>
+ Run mvn --version to verify that it is correctly installed.
+ </li>
+ </ol>
+ <p>
+ Once Maven is properly installed, you can start building the WSO2 MB.
+ </p>
+ <h3 id="Building1">
+ Building WSO2 MB
+ </h3>
+ <ol>
+ <li>
+ <a href="http://wso2.org/downloads/message-broker/">Download</a>
+ the source distribution, which is available as a zip archive.
+ </li>
+ <li>
+ Expand the source archive to a directory of your choice.
+ </li>
+ <li>
+ All the necessary build scripts are included with the source
+ distribution.
+ </li>
+ <li>
+ You can run the following command inside that directory to build the
+ WSO2 MB. Note that you will require a connection to the Internet for the Maven build
+ to download dependencies required for the build.
+ <br/>
+ <p>
+ Command: <strong>mvn clean install</strong>
+ </p>
+ </li>
+ </ol>
+ <p>
+ This will create the complete release artifacts including the binary and
+ source distributions in the modules/distribution/target/ directory which can be installed using
+ the above instructions.
+ </p>
+ <p>
+ Note: The first time you run Maven it will automatically download the
+ dependent .jar files. Therefore, the first run will take more time.
+ </p>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/release-notes.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/release-notes.xml b/products/cloud-controller/docs/xdoc/release-notes.xml
new file mode 100644
index 0000000..5f16e20
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/release-notes.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ 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.
+ -->
+
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta content="text/html; charset=iso-8859-1" http-equiv="content-type"/>
+ <title>WSO2 Message Broker 2.0.1 Released!</title>
+ <link href="css/mb-docs.css" rel="stylesheet"/>
+ <link href="styles/dist-docs.css" rel="stylesheet" type="text/css"
+ media="all"/>
+ </head>
+ <body>
+ <div id="header">
+ </div>
+
+ <div id="main-content">
+ <h1>The WSO2 Message Broker (MB) 2.0.1 Released!</h1>
+
+ <p>
+ The WSO2 Message Broker team is pleased to announce the release of version 2.0.1 of
+ the Open Source Message Broker (MB).
+ </p>
+ <p>WSO2 Message Broker (WSO2 MB) 2.0.1 is fast, lightweight and user friendly open source
+ distributed message brokering system under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">
+ Apache Software License v2.0</a>. WSO2 MB allows system administrators and developers to
+ easily configure jms queues and topics which could be used in message routing, message stores,
+ message processors. It also supports transport ws eventing. WSO2 MB is compliant with Advanced
+ Message Queueing Protocol Version 0-91 and Java Message Service Specification version 1.1.
+ </p>
+ <p>
+ WSO2 MB 2.0.1 is developed on top of the revolutionary
+ <a href="http://wso2.org/projects/carbon">WSO2 Carbon platform</a> (Middleware a' la carte),
+ an OSGi based framework that provides seamless modularity to your SOA via
+ componentization. This release also contains many new features and a range of optional
+ components (add-ons) that can be installed to customize the behavior of the MB. Further, any
+ existing features of the MB which are not required to your environment can be easily
+ removed using the underlying provisioning framework of Carbon. In brief, WSO2 MB can
+ be fully customized and tailored to meet your exact SOA needs.
+ </p>
+
+ <p>
+ You can download this distribution from
+ <a href="http://wso2.org/downloads/message-broker">
+ http://wso2.org/downloads/message-broker
+ </a>
+
+ </p>
+
+ <h2>How to Run </h2>
+ <ol>
+ <li>Extract the downloaded zip</li>
+ <li>Go to the bin directory in the extracted folder</li>
+ <li>Run the stratos.sh or stratos.bat as appropriate</li>
+ <li>Point your browser to the URL https://localhost:9443/carbon</li>
+ <li>Use "admin", "admin" as the username and password to login as an admin</li>
+ <li>If you need to start the OSGi console with the server use the property
+ -DosgiConsole when starting the server. The INSTALL.txt file found on the
+ installation directory will give you a comprehensive set of options and
+ properties that can be passed into the startup script</li>
+
+ </ol>
+
+
+ <h2>New Features of WSO2 MB 2.0.1</h2>
+
+ <p>
+ The major newly introduced feature of this MB release is support for distributed message
+ brokering. This release is backed with newly invented Andes distributed message brokering
+ system which use cassandra as its storage.
+ </p>
+
+
+ <h2>Key Features of WSO2 Message Broker</h2>
+
+ <p>WSO2 Message Broker brings messaging and eventing capabilities into your SOA
+ framework. Message Broker contains all the previously available features except
+ SQS support. Those are :
+ </p>
+ <ul>
+ <li>JMS Queuing</li>
+ <li>JMS Pub/Sub </li>
+ <li>WS-Eventing</li>
+ </ul>
+
+
+ <p>The underlying JMS engine handles WS-Eventing/JMS synchronisation that enables
+ exposing and consuming your events using two different standard API's.
+ </p>
+
+ <h2>Project Resources</h2>
+
+ <ul>
+ <li>
+ <strong>Home page:</strong>
+ <a href="http://wso2.com/products/message-broker/">
+ http://wso2.com/products/message-broker/
+ </a>
+
+ </li>
+ <li>
+ <strong>Library:</strong>
+ <a href="http://www.wso2.org/library/mb">http://www.wso2.org/library/mb</a>
+
+ </li>
+ <li>
+ <strong>Wiki:</strong>
+ <a href="http://www.wso2.org/wiki/display/mb/java">
+ http://www.wso2.org/wiki/display/mb/java
+ </a>
+
+ </li>
+ <li>
+ <strong>JIRA-Issue Tracker:</strong>
+ <a href="https://wso2.org/jira/browse/MB">https://wso2.org/jira/browse/MB</a>
+
+ </li>
+ </ul>
+
+ <h2>Bugs Fixed in This Release</h2>
+ <p>
+ This release of WSO2 MB comes with a number of bug fixes, both in the base
+ framework and the MB specific components. All the issues which have been
+ fixed in MB 2.0.1 are recorded at following locations:
+ </p>
+ <ul>
+
+ <li><a href="https://wso2.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10787">
+ Fixed MB specific issues</a></li>
+
+ </ul>
+ <h2>Known Issues</h2>
+ <p>
+ All the open issues pertaining to WSO2 MB 2.0.1 are reported at following
+ locations:
+ </p>
+ <ul>
+ <li><a href="https://wso2.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10788">
+ WSO2 MB 2.0.1 component issues</a></li>
+ </ul>
+
+
+
+ <h2>How You Can Contribute</h2>
+ <h3>
+ Mailing Lists
+ </h3>
+ <p>
+ Join our mailing list and correspond with the developers directly.
+ </p>
+ <ul>
+ <li>
+ Developer List :
+ <a href="mailto:carbon-dev@wso2.org">carbon-dev@wso2.org</a>
+ |
+ <a href="mailto:carbon-dev-request@wso2.org?subject=subscribe">Subscribe</a>
+ |
+ <a href="http://wso2.org/mailarchive/carbon-dev/">Mail Archive</a>
+ </li>
+ <li>
+ User List :
+ <a href="mailto:mb-user@wso2.org">mb-user@wso2.org</a>
+ |
+ <a href="mailto:mb-user-request@wso2.org?subject=subscribe">Subscribe</a>
+ |
+ <a href="http://wso2.org/mailarchive/mb-user/">Mail Archive</a>
+ </li>
+ </ul>
+
+ <h3>
+ Reporting Issues
+ </h3>
+ <p>
+ WSO2 encourages you to report issues and your enhancement requests for the
+ WSO2 MB using the public<a
+ href="https://wso2.org/jira/browse/MB">JIRA</a>.
+ </p>
+ <p>
+ You can also watch how they are resolved, and comment on the progress..
+ </p>
+ <h3>
+ Discussion Forums
+ </h3>
+ <p>
+ Alternatively, questions could be raised using the forums available.
+ </p>
+ <p>
+ <a href="http://wso2.org/forum/1225">WSO2 MB Forum</a>
+ :
+ Discussion forum for WSO2 MB developers/users
+ </p>
+
+
+ <h2>Support</h2>
+ <p>We are committed to ensuring that your enterprise middleware deployment is completely
+ supported from evaluation to production. Our unique approach ensures that all
+ support leverages our open development methodology and is provided by the very same
+ engineers who build the technology.
+ </p>
+
+ <p>For more details and to take advantage of this unique opportunity please visit
+ <a href="http://wso2.com/support/">http://wso2.com/support/</a>
+ </p>
+
+ <p>For more information on WSO2 MB Please see<a
+ href="http://wso2.com/products/message-broker/">
+ http://wso2.com/products/message-broker/</a>, visit the WSO2 Oxygen Tank developer
+ portal for additional
+ resources.
+ </p>
+
+ <p>Thank you for your interest in WSO2 Message Broker.
+ </p>
+
+ <p>
+ <i>-- The WSO2 MB Team --</i>
+ </p>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/samples/jms_queue_sample.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/samples/jms_queue_sample.xml b/products/cloud-controller/docs/xdoc/samples/jms_queue_sample.xml
new file mode 100644
index 0000000..d9fcb84
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/samples/jms_queue_sample.xml
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ ~ 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.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <title>WSO2 MB Samples - JMS Queue Sample</title>
+ <link href="../css/mb-docs.css" rel="stylesheet"/>
+ <link href="../styles/dist-docs.css" rel="stylesheet" type="text/css"
+ media="all"/>
+ </head>
+
+ <body>
+ <p>[<a href="../docs_index.html">Documentation Index</a>] </p>
+ <h1>WSO2 MB - Samples :JMS Queue Sample</h1>
+
+ <p>This guide demonstrates how persistent queues can be created and used in Message
+ Broker using JMS API.
+ </p>
+
+ <h2>Contents</h2>
+
+ <div class="toc">
+ <ul>
+ <li>
+ <a href="#jms_queue_sample">JMS Queue Sample</a>
+ </li>
+ </ul>
+ </div>
+
+ <h2 id="jms_queue_sample">JMS Queue Sample</h2>
+
+ <p>Following JMS client is used to send messages to a known created queue in WSO2 Message Broker. Queue Receiver
+ can receive messages and message is printed in console.
+ </p>
+
+ <p>
+ First log into WSO2 Message Broker Management console and create a queue named 'testQueue'. Click on the
+ 'Add' menu item under the 'Queues' menu to create a queue. To create a queue , the only thing needed to
+ be provided is the name of the queue.
+ </p>
+
+ <p>
+ note: To run this code sample, you need to have dependencies located at
+ $CARBON_HOME/client-lib in class path. You need to run QueueReceiver class prior to QueueSender class
+ when testing this sample.
+ </p>
+ <p>
+ Using following QueueSender JMS client messages can be sent to 'testQueue'.
+ </p>
+ <pre xml:space="preserve">
+ package com.org.wso2.mb.jms.sample;
+ /**
+ * 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.
+ */
+
+ import javax.jms.JMSException;
+ import javax.jms.Queue;
+ import javax.jms.QueueConnection;
+ import javax.jms.QueueConnectionFactory;
+ import javax.jms.QueueSession;
+ import javax.jms.TextMessage;
+ import javax.naming.Context;
+ import javax.naming.InitialContext;
+ import javax.naming.NamingException;
+ import java.util.Properties;
+
+ public class QueueSender {
+ public static final String QPID_ICF = "org.wso2.andes.jndi.PropertiesFileInitialContextFactory";
+ private static final String CF_NAME_PREFIX = "connectionfactory.";
+ private static final String QUEUE_NAME_PREFIX = "queue.";
+ private static final String CF_NAME = "qpidConnectionfactory";
+ String userName = "admin";
+ String password = "admin";
+
+ private static String CARBON_CLIENT_ID = "carbon";
+ private static String CARBON_VIRTUAL_HOST_NAME = "carbon";
+ private static String CARBON_DEFAULT_HOSTNAME = "localhost";
+ private static String CARBON_DEFAULT_PORT = "5672";
+ String queueName = "testQueue";
+
+
+ public static void main(String[] args) throws NamingException, JMSException {
+ QueueSender queueSender = new QueueSender();
+ queueSender.sendMessages();
+ }
+
+ public void sendMessages() throws NamingException, JMSException {
+ Properties properties = new Properties();
+ properties.put(Context.INITIAL_CONTEXT_FACTORY, QPID_ICF);
+ properties.put(CF_NAME_PREFIX + CF_NAME, getTCPConnectionURL(userName, password));
+ properties.put(QUEUE_NAME_PREFIX + queueName, queueName);
+
+ System.out.println("getTCPConnectionURL(userName,password) = " + getTCPConnectionURL(userName, password));
+
+ InitialContext ctx = new InitialContext(properties);
+ // Lookup connection factory
+ QueueConnectionFactory connFactory = (QueueConnectionFactory) ctx.lookup(CF_NAME);
+ QueueConnection queueConnection = connFactory.createQueueConnection();
+ queueConnection.start();
+ QueueSession queueSession =
+ queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+ // Send message
+ Queue queue = (Queue)ctx.lookup(queueName);
+
+ // create the message to send
+ TextMessage textMessage = queueSession.createTextMessage("Test Message Content");
+
+ javax.jms.QueueSender queueSender = queueSession.createSender(queue);
+ queueSender.send(textMessage);
+
+ queueSender.close();
+ queueSession.close();
+ queueConnection.close();
+
+ }
+
+ public String getTCPConnectionURL(String username, String password) {
+ // amqp://{username}:{password}@carbon/carbon?brokerlist='tcp://{hostname}:{port}'
+ return new StringBuffer()
+ .append("amqp://").append(username).append(":").append(password)
+ .append("@").append(CARBON_CLIENT_ID)
+ .append("/").append(CARBON_VIRTUAL_HOST_NAME)
+ .append("?brokerlist='tcp://").append(CARBON_DEFAULT_HOSTNAME).append(":").append(CARBON_DEFAULT_PORT).append("'")
+ .toString();
+ }
+
+
+ }
+
+ </pre>
+ <p>
+ You can view created queue and its increased message count using Message Broker management console.
+ </p>
+ <p>
+ Now to receive the messages from the 'testQueue' following QueueReceiver class can be used. Message received gets printed on the
+ console.
+ </p>
+ <pre xml:space="preserve">
+ package com.org.wso2.mb.jms.sample;
+ /**
+ * 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.
+ */
+
+ import javax.jms.*;
+ import javax.naming.Context;
+ import javax.naming.InitialContext;
+ import javax.naming.NamingException;
+ import java.util.Properties;
+
+ public class QueueReceiver {
+
+ public static final String QPID_ICF = "org.wso2.andes.jndi.PropertiesFileInitialContextFactory";
+ private static final String CF_NAME_PREFIX = "connectionfactory.";
+ private static final String CF_NAME = "qpidConnectionfactory";
+ String userName = "admin";
+ String password = "admin";
+
+ private static String CARBON_CLIENT_ID = "carbon";
+ private static String CARBON_VIRTUAL_HOST_NAME = "carbon";
+ private static String CARBON_DEFAULT_HOSTNAME = "localhost";
+ private static String CARBON_DEFAULT_PORT = "5672";
+ String queueName = "testQueue";
+
+
+ public static void main(String[] args) throws NamingException, JMSException {
+ QueueReceiver queueReceiver = new QueueReceiver();
+ queueReceiver.receiveMessages();
+ }
+
+ public void receiveMessages() throws NamingException, JMSException {
+ Properties properties = new Properties();
+ properties.put(Context.INITIAL_CONTEXT_FACTORY, QPID_ICF);
+ properties.put(CF_NAME_PREFIX + CF_NAME, getTCPConnectionURL(userName, password));
+ properties.put("queue."+ queueName,queueName);
+
+ System.out.println("getTCPConnectionURL(userName,password) = " + getTCPConnectionURL(userName, password));
+
+ InitialContext ctx = new InitialContext(properties);
+ // Lookup connection factory
+ QueueConnectionFactory connFactory = (QueueConnectionFactory) ctx.lookup(CF_NAME);
+ QueueConnection queueConnection = connFactory.createQueueConnection();
+ queueConnection.start();
+ QueueSession queueSession =
+ queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+ //Receive message
+ Queue queue = (Queue) ctx.lookup(queueName);
+ MessageConsumer queueReceiver = queueSession.createConsumer(queue);
+ TextMessage message = (TextMessage) queueReceiver.receive();
+ System.out.println("Got message ==>" + message.getText());
+
+ queueReceiver.close();
+ queueSession.close();
+ queueConnection.stop();
+ queueConnection.close();
+
+ }
+
+ public String getTCPConnectionURL(String username, String password) {
+ // amqp://{username}:{password}@carbon/carbon?brokerlist='tcp://{hostname}:{port}'
+ return new StringBuffer()
+ .append("amqp://").append(username).append(":").append(password)
+ .append("@").append(CARBON_CLIENT_ID)
+ .append("/").append(CARBON_VIRTUAL_HOST_NAME)
+ .append("?brokerlist='tcp://").append(CARBON_DEFAULT_HOSTNAME).append(":").append(CARBON_DEFAULT_PORT).append("'")
+ .toString();
+ }
+
+
+ }
+
+ </pre>
+ <p>
+ Now you should be able to see message count gets decreased for 'testQueue' using Management Console.
+ </p>
+ </body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/samples/jms_topic_sample.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/samples/jms_topic_sample.xml b/products/cloud-controller/docs/xdoc/samples/jms_topic_sample.xml
new file mode 100644
index 0000000..bd05667
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/samples/jms_topic_sample.xml
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ ~ 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.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <title>WSO2 MB Samples - JMS Topic Sample</title>
+ <link href="../css/mb-docs.css" rel="stylesheet"/>
+ <link href="../styles/dist-docs.css" rel="stylesheet" type="text/css"
+ media="all"/>
+ </head>
+
+ <body>
+ <p>[<a href="../docs_index.html">Documentation Index</a>] </p>
+ <h1>WSO2 MB - Samples :JMS Topic Sample</h1>
+
+ <p>This guide demonstrates how topics can be created and used in Message
+ Broker using JMS API.
+ </p>
+
+ <h2>Contents</h2>
+
+ <div class="toc">
+ <ul>
+ <li>
+ <a href="#jms_queue_sample">JMS Topic Sample</a>
+ </li>
+ </ul>
+ </div>
+
+ <h2 id="jms_queue_sample">JMS Topic Sample</h2>
+
+ <p>Following code is used to create a topic, subscribe to it and publish messages. To
+ run this code sample, you need to have dependencies located at
+ $CARBON_HOME/client-lib in class path.
+ To try out following code fragment, Run the Topic Subscriber first and then run
+ Topic Publisher code. You should see, published message in Topic subscriber console.
+
+ You can see created topics in management console as well.
+ </p>
+
+ <p>Topic Publisher: This code is used to publish messages to a given topic.</p>
+
+ <pre xml:space="preserve">
+ package com.org.wso2.mb.jms.sample;
+
+ /**
+ * 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.
+ */
+
+ import javax.jms.JMSException;
+ import javax.jms.QueueSession;
+ import javax.jms.TextMessage;
+ import javax.jms.Topic;
+ import javax.jms.TopicConnection;
+ import javax.jms.TopicConnectionFactory;
+ import javax.jms.TopicSession;
+ import javax.naming.Context;
+ import javax.naming.InitialContext;
+ import javax.naming.NamingException;
+ import java.util.Properties;
+
+
+ public class TopicPublisher {
+ public static final String QPID_ICF = "org.wso2.andes.jndi.PropertiesFileInitialContextFactory";
+ private static final String CF_NAME_PREFIX = "connectionfactory.";
+ private static final String CF_NAME = "qpidConnectionfactory";
+ String userName = "admin";
+ String password = "admin";
+
+ private static String CARBON_CLIENT_ID = "carbon";
+ private static String CARBON_VIRTUAL_HOST_NAME = "carbon";
+ private static String CARBON_DEFAULT_HOSTNAME = "localhost";
+ private static String CARBON_DEFAULT_PORT = "5672";
+ String topicName = "MYTopic";
+
+
+ public static void main(String[] args) throws NamingException, JMSException {
+ TopicPublisher topicPublisher = new TopicPublisher();
+ topicPublisher.publishMessage();
+ }
+
+ public void publishMessage() throws NamingException, JMSException {
+ Properties properties = new Properties();
+ properties.put(Context.INITIAL_CONTEXT_FACTORY, QPID_ICF);
+ properties.put(CF_NAME_PREFIX + CF_NAME, getTCPConnectionURL(userName, password));
+
+ System.out.println("getTCPConnectionURL(userName,password) = " + getTCPConnectionURL(userName, password));
+
+ InitialContext ctx = new InitialContext(properties);
+ // Lookup connection factory
+ TopicConnectionFactory connFactory = (TopicConnectionFactory) ctx.lookup(CF_NAME);
+ TopicConnection topicConnection = connFactory.createTopicConnection();
+ topicConnection.start();
+ TopicSession topicSession =
+ topicConnection.createTopicSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+ // Send message
+ Topic topic = topicSession.createTopic(topicName);
+
+ // create the message to send
+ TextMessage textMessage = topicSession.createTextMessage("Test Message");
+
+ javax.jms.TopicPublisher topicPublisher = topicSession.createPublisher(topic);
+ topicPublisher.publish(textMessage);
+
+ topicSession.close();
+ topicConnection.close();
+ }
+
+ public String getTCPConnectionURL(String username, String password) {
+ // amqp://{username}:{password}@carbon/carbon?brokerlist='tcp://{hostname}:{port}'
+ return new StringBuffer()
+ .append("amqp://").append(username).append(":").append(password)
+ .append("@").append(CARBON_CLIENT_ID)
+ .append("/").append(CARBON_VIRTUAL_HOST_NAME)
+ .append("?brokerlist='tcp://").append(CARBON_DEFAULT_HOSTNAME).append(":").append(CARBON_DEFAULT_PORT).append("'")
+ .toString();
+ }
+
+ }
+
+
+ </pre>
+
+ <p>Topic Subscriber: This code is used to Subscribe for topics.
+ topicSubscriber.receive() will wait till a message is received and exit the main
+ thread.
+ </p>
+ <pre xml:space="preserve">
+ package com.org.wso2.mb.jms.sample;
+ /**
+ * 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.
+ */
+
+ import javax.jms.JMSException;
+ import javax.jms.Message;
+ import javax.jms.QueueSession;
+ import javax.jms.TextMessage;
+ import javax.jms.Topic;
+ import javax.jms.TopicConnection;
+ import javax.jms.TopicConnectionFactory;
+ import javax.jms.TopicSession;
+ import javax.naming.Context;
+ import javax.naming.InitialContext;
+ import javax.naming.NamingException;
+ import java.util.Properties;
+
+
+ public class TopicSubscriber {
+ public static final String QPID_ICF = "org.wso2.andes.jndi.PropertiesFileInitialContextFactory";
+ private static final String CF_NAME_PREFIX = "connectionfactory.";
+ private static final String CF_NAME = "qpidConnectionfactory";
+ String userName = "admin";
+ String password = "admin";
+
+ private static String CARBON_CLIENT_ID = "carbon";
+ private static String CARBON_VIRTUAL_HOST_NAME = "carbon";
+ private static String CARBON_DEFAULT_HOSTNAME = "localhost";
+ private static String CARBON_DEFAULT_PORT = "5672";
+ String topicName = "MYTopic";
+
+
+ public static void main(String[] args) throws NamingException, JMSException {
+ TopicSubscriber topicSubscriber = new TopicSubscriber();
+ topicSubscriber.subscribe();
+ }
+
+ public void subscribe() throws NamingException, JMSException {
+ Properties properties = new Properties();
+ properties.put(Context.INITIAL_CONTEXT_FACTORY, QPID_ICF);
+ properties.put(CF_NAME_PREFIX + CF_NAME, getTCPConnectionURL(userName, password));
+
+ System.out.println("getTCPConnectionURL(userName,password) = " + getTCPConnectionURL(userName, password));
+
+ InitialContext ctx = new InitialContext(properties);
+ // Lookup connection factory
+ TopicConnectionFactory connFactory = (TopicConnectionFactory) ctx.lookup(CF_NAME);
+ TopicConnection topicConnection = connFactory.createTopicConnection();
+ topicConnection.start();
+ TopicSession topicSession =
+ topicConnection.createTopicSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+ // Send message
+ Topic topic = topicSession.createTopic(topicName);
+ javax.jms.TopicSubscriber topicSubscriber = topicSession.createSubscriber(topic);
+ Message message = topicSubscriber.receive();
+ if (message instanceof TextMessage) {
+ TextMessage textMessage = (TextMessage) message;
+ System.out.println("textMessage.getText() = " + textMessage.getText());
+ }
+ topicSession.close();
+ topicConnection.close();
+ }
+
+ public String getTCPConnectionURL(String username, String password) {
+ // amqp://{username}:{password}@carbon/carbon?brokerlist='tcp://{hostname}:{port}'
+ return new StringBuffer()
+ .append("amqp://").append(username).append(":").append(password)
+ .append("@").append(CARBON_CLIENT_ID)
+ .append("/").append(CARBON_VIRTUAL_HOST_NAME)
+ .append("?brokerlist='tcp://").append(CARBON_DEFAULT_HOSTNAME).append(":").append(CARBON_DEFAULT_PORT).append("'")
+ .toString();
+ }
+
+ }
+
+
+ </pre>
+ <p>Also note that a MessageListener can be set to topicSubscriber to receive messages asynchronously.</p>
+ </body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ffe2e466/products/cloud-controller/docs/xdoc/samples/jms_transport_sample.xml
----------------------------------------------------------------------
diff --git a/products/cloud-controller/docs/xdoc/samples/jms_transport_sample.xml b/products/cloud-controller/docs/xdoc/samples/jms_transport_sample.xml
new file mode 100644
index 0000000..7978254
--- /dev/null
+++ b/products/cloud-controller/docs/xdoc/samples/jms_transport_sample.xml
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ ~ 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.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+ <title>WSO2 MB Samples - JMS Transport Sample</title>
+ <link href="../css/mb-docs.css" rel="stylesheet"/>
+ <link href="../styles/dist-docs.css" rel="stylesheet" type="text/css"
+ media="all"/>
+ </head>
+
+ <body>
+ <p>[<a href="../docs_index.html">Documentation Index</a>] </p>
+ <h1>WSO2 MB - Samples :JMS Transport Sample</h1>
+ <p>Apache AXIS2 support a JMS transport layer in addition to the existing HTTP transport. This allows Web
+ service clients and servers to communicate via JMS queues and topics instead of HTTP connections.
+ Both one-way and synchronous two-way requests are supported.</p>
+ <p>The benefits of using JMS as an alternative to HTTP include the following:</p>
+ <ul>
+ <li>
+ Request and response messages are sent by way of reliable messaging.
+ </li>
+ <li>One-way requests allow client and server to be more loosely-coupled (the server does not have to be
+ active when the client sends the one-way request).
+ </li>
+ <li>One-way requests can be sent to multiple servers simultaneously through the use of a topic.
+ </li>
+ </ul>
+ <p>If a web service is to be accessible on the JMS transport, then the corresponding WSDL document should include
+ a JMS binding and a SOAP address which specifies a JMS endpoint URL string. A JMS binding is simply
+ a <b>wsdl:binding </b> element which contains a <b
+ >wsdlsoap:binding</b> element whose transport attribute ends in soap/jms,
+ rather than the normal soap/http value. In addition to the JMS binding, a <b>wsdl:port</b> element which references
+ the JMS binding should be included in the <b>wsdl:service</b> element within the WSDL document. This <b>wsdl:port</b> element
+ should contain a <b>wsdlsoap:address</b> element whose location attribute specifies a JMS endpoint URL string.
+ </p>
+ <p>
+ You also need to decide on the names and types of JMS objects that your application will use. For example,
+ you must decide whether your web service will receive its requests from a queue or a topic. You also must
+ decide whether to use a secure destination (queue or topic). Finally, you will need to decide on the names
+ for your destination, connection factory, and listener port. The following list provides an example of the
+ names that might be used for the sample MessageReceiveService web service:
+ </p>
+ <table>
+ <tr>
+ <td>Queue</td> <td>MessageReceiveService, JNDI name: MessageReceiveService</td>
+ </tr>
+ <tr>
+ <td>QueueConnectionFactory</td> <td></td>
+ </tr>
+ </table>
+ <h2>Creating A Simple Service</h2>
+ <p>Following java class with its two operations are hosted in Axis2 server as a web service</p>
+ <pre xml:space="preserve">
+ /**
+ * 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.
+ */
+
+ public class MessageReceiveService {
+ public void receive(String message) {
+ System.out.println("Got the message ==> " + message);
+ }
+ public String echo(String message) {
+ System.out.println("Got the message ==> " + message);
+ return message;
+ }
+ }
+ </pre>
+ <p>As WSDL of the service following will be used. Note how JMS bindings are defined. receive operation is an
+ "in only" operation having only input message. But echo is "in-out" operation which is having an output
+ message as well as an input message.
+ </p>
+
+ <pre xml:space="preserve">
+ <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://transport.sample.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://transport.sample.org">
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://transport.sample.org">
+ <xs:element name="receive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="echo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="echoResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="echoRequest">
+ <wsdl:part name="parameters" element="ns:echo"/>
+ </wsdl:message>
+ <wsdl:message name="echoResponse">
+ <wsdl:part name="parameters" element="ns:echoResponse"/>
+ </wsdl:message>
+ <wsdl:message name="receiveRequest">
+ <wsdl:part name="parameters" element="ns:receive"/>
+ </wsdl:message>
+ <wsdl:portType name="MessageReceiveServicePortType">
+ <wsdl:operation name="echo">
+ <wsdl:input message="ns:echoRequest" wsaw:Action="urn:echo"/>
+ <wsdl:output message="ns:echoResponse" wsaw:Action="urn:echoResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="receive">
+ <wsdl:input message="ns:receiveRequest" wsaw:Action="urn:receive"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="MessageReceiveServiceSoap11Binding" type="ns:MessageReceiveServicePortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="urn:echo" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="receive">
+ <soap:operation soapAction="urn:receive" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="MessageReceiveServiceSoap12Binding" type="ns:MessageReceiveServicePortType">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="echo">
+ <soap12:operation soapAction="urn:echo" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="receive">
+ <soap12:operation soapAction="urn:receive" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="MessageReceiveService">
+ <wsdl:port name="MessageReceiveServiceJmsSoap11Endpoint" binding="ns:MessageReceiveServiceSoap11Binding">
+ <soap:address location="jms:/MessageReceiveService?transport.jms.DestinationType=queue&amp;transport.jms.ContentTypeProperty=Content-Type&amp;java.naming.provider.url=conf/jndi.properties&amp;java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&amp;transport.jms.ConnectionFactoryType=queue&amp;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory"/>
+ </wsdl:port>
+ <wsdl:port name="MessageReceiveServiceJmsSoap12Endpoint" binding="ns:MessageReceiveServiceSoap12Binding">
+ <soap12:address location="jms:/MessageReceiveService?transport.jms.DestinationType=queue&amp;transport.jms.ContentTypeProperty=Content-Type&amp;java.naming.provider.url=conf/jndi.properties&amp;java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&amp;transport.jms.ConnectionFactoryType=queue&amp;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory"/>
+ </wsdl:port>
+ </wsdl:service>
+ </wsdl:definitions>
+ </pre>
+
+ <h2>Axi2 Configurations</h2>
+ <p>axi2.xml file, which configures the axis2 server on which above service is hosted, should be enabled with JMS
+ transport.</p>
+ <pre xml:space="preserve">
+ <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+ <parameter name="default" locked="false">
+ <parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
+ <parameter name="java.naming.provider.url" locked="false">conf/jndi.properties</parameter>
+ <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
+ <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
+ </parameter>
+ </transportReceiver>
+ </pre>
+ <br></br>
+ <pre xml:space="preserve">
+ <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
+ </pre>
+
+ <h2>Message Broker Bindings</h2>
+ <p>conf/jndi.properties file is having all JMS bindings (Queue/QueueConnectionFactory) mentioned above.</p>
+
+ <pre xml:space="preserve">
+
+ connectionfactory.QueueConnectionFactory=amqp://admin:admin@clientid/carbon?brokerlist='tcp://localhost:5672'
+ queue.MessageReceiveService=MessageReceiveService
+ </pre>
+ <p>Note that WSO2 Message Broker should be running at localhost port 5672 as per this sample.</p>
+ <h2>Start Axis2 Server</h2>
+ <p>Axis2 server is started with above configurations, hosting the above MessageReceiveService service.</p>
+ <pre xml:space="preserve">
+
+ private AxisServer axisServer;
+ public void start(){
+ try {
+ ConfigurationContext configurationContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,"conf/axis2.xml");
+ this.axisServer = new AxisServer();
+ this.axisServer.setConfigurationContext(configurationContext);
+ this.axisServer.deployService(MessageReceiveService.class.getName());
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ }
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ </pre>
+
+ <h2>Send A Message To MessageReceiveService Service</h2>
+ <p>Now using axis2_client.xml as the config file a ConfigurationContext can be created and a message can be sent
+ to the service. Note that fist "in-only" message is sent and then "in-out" message is sent. Client stub is
+ generated from the above WSDL using WSDL-To-Java tool (when complied using build.xml at & MB_HOME &
+ /Samples/jmstransport using ant this will be done).
+ </p>
+ <p>Using WSO2 MB management console you can see how MessageReceiveService queue is created. See Message Broker
+ Queues - User Guide for more information.</p>
+ <pre xml:space="preserve">
+
+ public void sendMessage(){
+ try {
+
+ ConfigurationContext configurationContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, "conf/axis2_client.xml");
+ MessageReceiveServiceStub stub = new MessageReceiveServiceStub(configurationContext,"http://localhost:8080/axis2/services/MessageReceiveService.MessageReceiveServiceHttpSoap11Endpoint/");
+ //first send the in only message
+ stub.receive("Test message to receive ");
+ // inout message
+ String response = stub.echo("Test message to echo");
+ System.out.println("Response ==> " + response);
+
+ try {
+ Thread.sleep(10000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace();
+ } catch (java.rmi.RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+ </pre>
+ <p>
+ The complete sample code demonstrating the scenario will be as follows.
+ </p>
+ <pre xml:space="preserve">
+/**
+ * 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.
+ */
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.engine.AxisServer;
+import org.sample.transport.stub.MessageReceiveServiceStub;
+
+public class JMSTransportClient {
+ private AxisServer axisServer;
+ public void start(){
+ try {
+ ConfigurationContext configurationContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,"conf/axis2.xml");
+ this.axisServer = new AxisServer();
+ this.axisServer.setConfigurationContext(configurationContext);
+ this.axisServer.deployService(MessageReceiveService.class.getName());
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ }
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ public void stop(){
+ try {
+ this.axisServer.stop();
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace();
+ }
+ }
+ public void sendMessage(){
+ try {
+
+ ConfigurationContext configurationContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, "conf/axis2_client.xml");
+ MessageReceiveServiceStub stub = new MessageReceiveServiceStub(configurationContext,"http://localhost:8080/axis2/services/MessageReceiveService.MessageReceiveServiceHttpSoap11Endpoint/");
+ //first send the in only message
+ stub.receive("Test message to receive ");
+ // inout message
+ String response = stub.echo("Test message to echo");
+ System.out.println("Response ==> " + response);
+
+ try {
+ Thread.sleep(10000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace();
+ } catch (java.rmi.RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+ public static void main(String[] args) {
+
+ JMSTransportClient jmsTransportClient = new JMSTransportClient();
+ jmsTransportClient.start();
+ jmsTransportClient.sendMessage();
+ jmsTransportClient.stop();
+ }
+
+ }
+ </pre>
+ </body>
+</html>