{"id":21984640,"url":"https://github.com/mrts/vaadin-javaee-clinic-patient-queue-example","last_synced_at":"2025-10-08T13:47:56.431Z","repository":{"id":19158907,"uuid":"86377715","full_name":"mrts/vaadin-javaee-clinic-patient-queue-example","owner":"mrts","description":"An example clinic patient queue application using server push, Vaadin 8 and Java EE 8","archived":false,"fork":false,"pushed_at":"2023-11-26T15:56:17.000Z","size":1271,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T07:36:18.213Z","etag":null,"topics":["cdi","jaas","javaee","jms","long-polling","message-driven-bean","server-push","vaadin","vaadin-cdi-addon","vaadin-loginform","vaadin-testbench"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-27T19:51:33.000Z","updated_at":"2023-11-26T16:11:34.000Z","dependencies_parsed_at":"2024-11-29T22:45:29.472Z","dependency_job_id":"20d8a80e-8a0f-4f11-a2c6-cf070006a78d","html_url":"https://github.com/mrts/vaadin-javaee-clinic-patient-queue-example","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mrts/vaadin-javaee-clinic-patient-queue-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrts%2Fvaadin-javaee-clinic-patient-queue-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrts%2Fvaadin-javaee-clinic-patient-queue-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrts%2Fvaadin-javaee-clinic-patient-queue-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrts%2Fvaadin-javaee-clinic-patient-queue-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrts","download_url":"https://codeload.github.com/mrts/vaadin-javaee-clinic-patient-queue-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrts%2Fvaadin-javaee-clinic-patient-queue-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956335,"owners_count":26075221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdi","jaas","javaee","jms","long-polling","message-driven-bean","server-push","vaadin","vaadin-cdi-addon","vaadin-loginform","vaadin-testbench"],"created_at":"2024-11-29T18:10:35.783Z","updated_at":"2025-10-08T13:47:56.406Z","avatar_url":"https://github.com/mrts.png","language":"Java","readme":"# vaadin-javaee-clinic-patient-queue-example\n\nAn example clinic patient queue application using Vaadin 8, Java EE 8 and\nVaadin CDI add-on.\n\nDemonstrates how to use Vaadin's server push and Java EE messaging APIs to send\nmessages to client browsers in real time. Uses JMS 2.0 API for sending\nmessages, message-driven beans for receiving them and a separate singleton\nbroadcaster to broadcast messages to Vaadin UIs (the broadcaster is recommended\nby Vaadin as a bridge for connecting message-driven beans and Vaadin UIs that\nhave different lifetimes).\n\nAlso demonstrates how to authenticate and authorize users using JAAS and Vaadin\nlogin form and view navigator.\n\nVaadin's server push uses a WebSocket connection by default which unfortunately\n[is not compatible](https://github.com/vaadin/cdi/issues/88)\n[with CDI](https://github.com/eclipse-ee4j/websocket-api/issues/196), so for the time\nbeing a mixed communication mode with WebSocket for server to client and\nXMLHttpRequest for client to server must be used with\n`@Push(transport = Transport.WEBSOCKET_XHR)`.\n\nTested with WildFly 18.0.1, but should work equally well with other Java EE 8\napplication servers.\n\nThe project consists of the following modules:\n\n- parent project: common metadata and configuration\n- `vaadin-javaee-clinic-patient-queue-example-ui`: main Vaadin application module\n- `vaadin-javaee-clinic-patient-queue-example-backend`: backend module, contains server side code and dependencies.\n\n## Building and running\n\nYou need Maven and Java 8 JDK to build and run the application.\n\nBuild the application WAR with `mvn package`, deploy it from\n`vaadin-javaee-clinic-patient-queue-example-ui/target/vaadin-javaee-clinic-patient-queue-example.war`\nto the application server.\n\n**Note that you need to run WildFly with full profile to enable JMS:**\n\n    bin/standalone.{bat,sh} -c standalone-full.xml\n\n## Overview\n\nThe project consists of three apps:\n\n- Registration kiosk app where patients can register to doctor's appointments\n- Doctor's office app for doctors to see when patients arrive and call them in\n- Infoscreen where patients are notified when doctor calls them in.\n\nIf you have Google Chrome installed, you can launch all the apps in parallel\nwith `launch-apps.sh`.\n\nThe following screencast shows the whole workflow in action:\n\n![screencast](doc/vaadin-javaee-clinic-patient-queue-screencast.gif)\n\n## Testing\n\n1. Open [doctor's office app](http://localhost:8080/vaadin-javaee-clinic-patient-queue-example/doctors-office) in first browser window\n2. Login as *user* with password *user* (see *Adding doctors* below), dr. Anu Võsu's office view opens\n3. Open [registration kiosk](http://localhost:8080/vaadin-javaee-clinic-patient-queue-example/registration-kiosk) in second browser window\n4. Enter your name and press *Register* under dr. Anu Võsu's name to register to her appointment\n5. The kiosk will output your call-in number\n6. Open [infoscreen](http://localhost:8080/vaadin-javaee-clinic-patient-queue-example/infoscreen) in third browser window\n7. Switch to doctor's office app and observe that your registration is visible on the page\n8. Select your registration and press *Call in*\n9. Switch to infoscreen and observe that your call in number is visible in the list\n\nA Vaadin TestBench test is also included, if you have a TestBench licence and\n[Chrome WebDriver](https://sites.google.com/a/chromium.org/chromedriver/downloads)\ninstalled, you can run it with\n\n    mvn -Dtest=ClinicPatientQueueAppIT -DfailIfNoTests=false test\n\nPrerequisite is that the application server is running the application in the background.\n\n## Adding doctors\n\nWildFly has a security realm called *ApplicationRealm* configured by default.\n\nTo add a new user to *ApplicationRealm* execute the `add-user.{bat,sh}` script\nwithin the `bin` folder of your WildFly installation and enter the requested\ninformation. Choose *b) Application user* and add the user to the group\n*users*.\n\nAdd user *user* with password *user* for the test to work.\n\n## References\n\n- [Server Push chapter in official Vaadin documentation](https://vaadin.com/docs/-/part/framework/advanced/advanced-push.html)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrts%2Fvaadin-javaee-clinic-patient-queue-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrts%2Fvaadin-javaee-clinic-patient-queue-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrts%2Fvaadin-javaee-clinic-patient-queue-example/lists"}