Name: sample.javaee7.websocket
Owner: WASdev
Description: Sample Java EE 7 WebSocket application (available pre-deployed to WAS classic V9 beta hosted in bluemix.net) #JavaEE7
Created: 2015-10-21 13:17:50.0
Updated: 2017-12-08 13:55:45.0
Pushed: 2017-10-24 21:14:53.0
Size: 107
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This project contains a simple WebSocket application which demonstrates the Java EE 7 technology.
These web sockets sample shows how to set up WebSocket Endpoints using annotations or programmatically.
These samples exercise different operations on a WebSocket connection:
Also shown is the use of encoders, decoders, the PathParam annotation, and Pong message processing.
Browse the code to see what it does, or build and run it yourself!
This project can be built with Apache Maven. The project uses Liberty Maven Plug-in to automatically download and install Liberty profile runtime from the Liberty repository. Liberty Maven Plug-in is also used to create, configure, and run the application on the Liberty server.
Use the following steps to run the application with Maven:
Execute full Maven build. This will cause Liberty Maven Plug-in to download and install Liberty profile server.
n clean install
To run the server with the WebSocket application execute:
n liberty:run-server
Once the server is running, the application will be available under http://localhost:9080/sample.javaee7.websocket/.
This project can also be built and run with Gradle. The provided build.gradle
file applies the Liberty Gradle Plug-in and is configured to automatically download and install the Liberty Java EE7 Web Profile 7 runtime from Maven Central. The Liberty Gradle Plug-in has built-in tasks that can be used to create, configure, and run the application on the Liberty server.
Use the following steps to run the application with Gradle:
Execute the full Gradle build. The Liberty Gradle Plug-in will download and install the Liberty server.
gradlew clean build
To start the server with the Servlet sample execute:
gradlew libertyStart
Alternatively, execute the run command:
gradlew libertyRun --no-daemon
Once the server has started, the application will be available under http://localhost:9080/sample.javaee7.websocket/.
gradlew libertyStop
Please refer to the ci.gradle repository for documentation about using the Liberty Gradle Plug-in.
Click the button below to deploy your own copy of this application to Bluemix.
Once the application is deployed and running in bluemix, it will be available under http://MYAPPNAME.mybluemix.net/sample.javaee7.websocket/.
© Copyright IBM Corporation 2015, 2017.
This information contains sample code provided in source code form. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample code is written.
Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN “AS IS” BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.