This is a bootstrap project, to get you up and running with websockets application, storing information in MYSQL database using hibernate. This is a minimalistic project with small memory footprint and doesn't use spring or any other container.
The bootstrap application accepts messages from client via websockets and store those in database.
Following technologies are used -
- Jetty application server (No need to install, embedded)
- Maven required to build
- MySQL required to install
- Uses hibernate to store information in database
- Uses jetty for client/server communication
- Install mysql and create a database test.
- Run the script.sql in db folder
- Configure the database credentials in hibernate.cfg.xml
- Build the project
$ cd jetty-websocket-template
$ mvn clean install
- Run
$ mvn -Djetty.port=9999 jetty:run
- Check the magic on http://localhost:9999/
Working demo: http://ec2-52-35-143-86.us-west-2.compute.amazonaws.com:9999/jetty/