This J2SE console app communicates over WebSocket with a JMS server via Kaazing WebSocket Gateway. The app publishes text messages via Kaazing Gateway to a JMS server and listens for messages from the JMS server.
- Java 1.8
- Gradle 2.10 or higher
-
Install gradle: follow the steps here.
-
Build the application using gradle
cd <application root directory>
gradle installDist
- Run the application
build/install/java-jms-demo/bin/java-jms-demo
or
build\install\java-jms-demo\bin\java-jms-demo.bat
NOTE: The application can be run in the folowing ways:
- To connect to our defult URI:
/java-jms-demo
-To your own local Kaazing Gateway URI (ex: ws://localhost:8000/jms):
/java-jms-demo '{YOUR.GATEWAY.URI}'
- To use credentials with our default URI:
/java-jms-demo 'joe' 'welcome'
- If you have setup your gateway for authentification :
/java-jms-demo '{YOUR.GATEWAY.URI}' '{USERNAME}' '{PASSWORD}'
Documentation that explains how to create a Kaazing Java JMS application from scratch to send and receive messages over WebSocket can be found here.
API Documentation for Kaazing Java WebSocket JMS Client library is available: