{"id":28933982,"url":"https://github.com/chamikathereal/j2ee-timer","last_synced_at":"2026-03-01T14:01:53.261Z","repository":{"id":299239061,"uuid":"1002449049","full_name":"chamikathereal/J2EE-Timer","owner":"chamikathereal","description":"A simple Java EE project demonstrating EJB Timer Service for scheduling and managing automated tasks. Ideal for learning timer-based automation in enterprise applications.","archived":false,"fork":false,"pushed_at":"2025-06-21T18:35:39.000Z","size":4069,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-31T05:49:01.390Z","etag":null,"topics":["ejb","jakartaee","java","javaee","timer","timer-app","timer-service"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chamikathereal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-15T13:58:36.000Z","updated_at":"2025-07-10T17:59:38.000Z","dependencies_parsed_at":"2025-06-15T15:01:12.156Z","dependency_job_id":"7ea9add5-7e4c-4b2d-86dc-fb7a99411d63","html_url":"https://github.com/chamikathereal/J2EE-Timer","commit_stats":null,"previous_names":["chamikathereal/j2ee-timer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chamikathereal/J2EE-Timer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamikathereal%2FJ2EE-Timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamikathereal%2FJ2EE-Timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamikathereal%2FJ2EE-Timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamikathereal%2FJ2EE-Timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chamikathereal","download_url":"https://codeload.github.com/chamikathereal/J2EE-Timer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamikathereal%2FJ2EE-Timer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T13:32:00.443Z","status":"ssl_error","status_checked_at":"2026-03-01T13:32:00.084Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ejb","jakartaee","java","javaee","timer","timer-app","timer-service"],"created_at":"2025-06-22T18:39:20.144Z","updated_at":"2026-03-01T14:01:53.247Z","avatar_url":"https://github.com/chamikathereal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 J2EE-Timer\n\n## 📝 Project Overview\n\n**J2EE-Timer** is a simple Java EE project that demonstrates how to schedule and manage timed tasks using EJB Timer Service. This project showcases both programmatic and automatic timer creation, making it a practical reference for understanding scheduled background processing in enterprise Java applications. The implementation covers stateless session beans, timer callbacks, and integration with servlets for task management—all following best practices for reliability and scalability.\n\n---\n\n## 📽️ Demo Video\n[![J2EE-Timer Project Demo](https://github.com/chamikathereal/J2EE-Timer/blob/main/J2EE-Timer.png)](https://youtu.be/kAnNUfUK1kY)\n\n---\n\n## 🗂️ Project Structure\n\n```\nJ2EE-Timer/\n├── src/\n│   └── main/\n│       ├── java/\n│       │   └── lk.jlat.web.eetimer/\n│       │       ├── ejb/\n│       │       │   ├── remote/\n│       │       │   ├── AutoTimerSessionBean\n│       │       │   ├── TaskSessionBean\n│       │       │   └── TimerSessionBean\n│       │       ├── servlet/\n│       │       │   ├── Task2\n│       │       │   └── Test\n│       │       └── timer/\n│       │           └── Task\n│       ├── resources/\n│       └── webapp/\n│           └── index.jsp\n├── pom.xml\n```\n\n## **Modules \u0026 Key Files**\n\n#### 🟦 ejb\n- **AutoTimerSessionBean**  \n  Handles automatic scheduling using `@Schedule` annotation for recurring tasks.\n\n- **TaskSessionBean**  \n  Demonstrates asynchronous task execution using a managed executor service.\n\n- **TimerSessionBean**  \n  Manages programmatic timers, calendar-based scheduling, timer callbacks (`@Timeout`), and timer cancellation.\n\n##\n\n#### 🟦 servlet\n- **Test**  \n  Servlet to trigger and schedule a new timer task via `TimerSessionBean`.\n\n- **Task2**  \n  Servlet to cancel an existing timer by referencing the scheduled task.\n\n##\n\n#### 🟦 timer\n- **Task**  \n  Serializable class representing a scheduled task's identity and metadata.\n\n---\n\n## ⚙️ How It Works\n\n- ✅ **Automatic Timers:**  \n  Use `@Schedule` in `AutoTimerSessionBean` to run methods at fixed intervals without manual intervention.\n\n- ✅ **Programmatic Timers:**  \n  `TimerSessionBean` creates timers dynamically using `TimerService`, schedules tasks, and handles timeout events with `@Timeout` methods.\n\n- ✅ **Task Execution:**  \n  `TaskSessionBean` leverages Java EE's managed executor service for asynchronous operations.\n\n- ✅ **Servlet Integration:**  \n  The `Test` servlet triggers new timers and stores task info in the session, while `Task2` cancels the timer based on task ID.\n\n- ✅ **Persistence \u0026 Configuration:**  \n  Maven-based project setup with Java 11 and Jakarta EE 10 dependencies for modern, portable deployment.\n\n---\n\n## ✨ Key Features\n\n- ✅ Demonstrates both annotation-based and programmatic EJB timers\n- ✅ Showcases timer callbacks and cancellation\n- ✅ Integrates servlets for web-based task management\n- ✅ Clean, modular code for easy learning and extension\n\n---\n\n## 🛠️ Technologies Used\n\n- Java 11\n- Jakarta EE 10 (EJB, Servlet)\n- Maven\n\n---\n\n## 📚 Learning Outcomes\n\n- ✅ Understand EJB Timer Service for scheduled and recurring tasks\n- ✅ Learn to implement both automatic and programmatic timers\n- ✅ Explore asynchronous processing in Java EE\n- ✅ Gain hands-on experience with modular enterprise Java applications\n\n---\n\n## 🧑‍💻 Author\n\nChamika Gayashan  \nUndergraduate Software Engineer | Sri Lanka  \nLinkedin: @chamikathereal  \nCurrent date: Saturday, June 21, 2025, 11:47 PM +0530\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamikathereal%2Fj2ee-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchamikathereal%2Fj2ee-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamikathereal%2Fj2ee-timer/lists"}