Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rstoyanchev/spring-websocket-test


https://github.com/rstoyanchev/spring-websocket-test

Last synced: 7 days ago
JSON representation

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-domain

Deploy 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`