Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
cars
README.adoc

README.adoc

Datasource-Definitions and Self-Contained Java EE applications

This is a simple playground to experiment with @DatasourceDefinition and variable-replacement in annotations. You can read the details on my blog.

Usage

Payara

$ cd cars
$ ./gradlew build
$ docker-compose -f docker-compose.payara.yml up

Wildfly

To run this on Wildfly, edit DatasourceProducer.java. You need to comment in the annotation for Wildfly. And comment out the annotation for Payara.

$ cd cars
$ ./gradlew build
$ docker-compose -f docker-compose.wildfly.yml up

In a different shell you can now fire a request if the application is working and accessing the database.

$ curl -i -X POST -d '{"model": "tesla"}' -H "Content-Type: application/json" http://localhost:8080/cars/resources/cars