Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rstoyanchev/spring-websocket-test
https://github.com/rstoyanchev/spring-websocket-test
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rstoyanchev/spring-websocket-test
- Owner: rstoyanchev
- Created: 2013-04-02T15:58:27.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-12-21T22:05:32.000Z (about 1 year ago)
- Last Synced: 2024-12-16T18:34:24.585Z (10 days ago)
- Language: Java
- Size: 151 KB
- Stars: 167
- Watchers: 29
- Forks: 132
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
Demonstrates Spring WebSocket and SockJS support in the Spring Framework. For a longer overview please see the [Spring Framework reference](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/web.html#websocket).
**IMPORTANT:** The `master` branch contains examples using Spring's `WebSocketHandler` including with SockJS fallback options. The `endpoint` branch contains examples of using JSR-356 `Endpoint` and `@ServerEndpoint`.
**NOTE:** Also check out the [Stock Portfolio](https://github.com/rstoyanchev/spring-websocket-portfolio) sample that demonstrates the use of a higher-level messaging over WebSocket.
### Tomcat
Set `TOMCAT_HOME` as an environment variable and use [deployTomcat.sh](https://github.com/rstoyanchev/spring-websocket-test/blob/master/deployTomcat.sh) and [shutdownTomcat.sh](https://github.com/rstoyanchev/spring-websocket-test/blob/master/shutdownTomcat.sh) in this directory.
Open a browser and go to
### Jetty
The easiest way to run on Jetty is with `mvn jetty:run`.
Open a browser and go to
**Note:** To deploy to a Jetty installation, add this to Jetty's `start.ini`:
OPTIONS=plus
etc/jetty-plus.xml
OPTIONS=annotations
etc/jetty-annotations.xml### WildFly 10+
Unzip the WildFly server.
Set `WILDFLY_HOME` as an environment variable and use [deployWildFly.sh](https://github.com/rstoyanchev/spring-websocket-test/blob/master/deployWildFly.sh) in this directory.
Open a browser and go to
### WebSphere Liberty 16+
Build and deploy with the following server configuration:
jsp-2.3
webSocket-1.1
### Glassfish
Glassfish 4 provides JSR-356 support.
Download Glassfish 4 and unzip the downloaded distribution.
Start the server:
cd /glassfish4
bin/asadmin start-domainDeploy the WAR file using the script in this directory.
Open a browser and go to
Watch the logs:
cd /glassfish4
less `glassfish/domains/domain1/logs/server.log`