https://github.com/abhirockzz/javaee-cdi-concurrency-utils
Example of using CDI beans as tasks managed by Java EE Concurrency Utilities
https://github.com/abhirockzz/javaee-cdi-concurrency-utils
cdi concurrency javaee-concurrency-utilities javaee7
Last synced: 6 months ago
JSON representation
Example of using CDI beans as tasks managed by Java EE Concurrency Utilities
- Host: GitHub
- URL: https://github.com/abhirockzz/javaee-cdi-concurrency-utils
- Owner: abhirockzz
- License: mit
- Created: 2017-04-15T11:29:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-20T12:18:12.000Z (over 8 years ago)
- Last Synced: 2025-03-24T00:24:44.628Z (7 months ago)
- Topics: cdi, concurrency, javaee-concurrency-utilities, javaee7
- Language: Java
- Homepage: https://abhirockzz.wordpress.com/2017/04/15/using-cdi-with-java-ee-concurrency-utilities
- Size: 8.79 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## To run on Docker
- Shortcut
- `docker pull abhirockzz/javaee-cdi-concurrency-utils`
- `docker run -it -p 8080:8080 abhirockzz/javaee-cdi-concurrency-utils`- Build it yourself using the [`Dockerfile`](https://github.com/abhirockzz/javaee-cdi-concurrency-utils/blob/master/Dockerfile) in the project (it [uses this Payara image](https://hub.docker.com/r/airhacks/payara/) as the base)
- `docker build -t .`
- `docker run -it -p 8080:8080 `## To run
- `git clone` the project and execute `mvn clean install`
- Deploy `javaee-cdi-concurrency-utils.war` in `target` directory to any of the [Java EE 7 containers](http://www.oracle.com/technetwork/java/javaee/overview/compatibility-jsp-136984.html)## To check
- execute a HTTP `POST` to `http://localhost:8080/javaee-cdi-concurrency-utils/tasks/` - [this initiates a task](https://github.com/abhirockzz/javaee-cdi-concurrency-utils/blob/master/src/main/java/com/wordpress/abhirockzz/cdi/concutils/TasksResource.java#L27) and returns the task ID

- execute a HTTP `GET` to `http://localhost:8080/javaee-cdi-concurrency-utils/tasks/` - [it will give you a JSON payload](https://github.com/abhirockzz/javaee-cdi-concurrency-utils/blob/master/src/main/java/com/wordpress/abhirockzz/cdi/concutils/TasksResource.java#L40) with the task details

- `POST` a few more tasks....
- execute a HTTP `GET` to `http://localhost:8080/javaee-cdi-concurrency-utils/tasks/all` [to get a JSON payload of all the tasks](https://github.com/abhirockzz/javaee-cdi-concurrency-utils/blob/master/src/main/java/com/wordpress/abhirockzz/cdi/concutils/TasksResource.java#L50)