Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

A project used to develop the way OSGi enRoute could use persistence

License

Notifications You must be signed in to change notification settings

osgi/osgi.enroute.examples.jdbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OSGi enRoute JDBC Example

This repository represents a JDBC example workspace for bndtools, it demonstrates on how to use JDBC with Aries Tx-Control. The application uses the PAX-JDBC bundle for defining the datasources.

If you want to get started with enRoute, then follow the steps in the quick-start guide.

Example

This example builds simple address book application which stores a Person with one or more email addresses

Database Entities

The example uses two DB entities Person and Example as shown in the diagram below

enRoute JDBC Example ERD

Application

The application is available over the url http://localhost:8080/osgi.enroute.examples.jdbc.addressbook/index.html

The following table shows the list of resources available to be consumed,

HTTP Method URL Use Transaction
GET http://localhost:8080/rest/person/{personId} Get person by personId Not Required, Supports
GET http://localhost:8080/rest/person Get all persons from the database Not Required, Supports
PUT http://localhost:8080/rest/person Save person along with addresses Required
POST http://localhost:8080/rest/person Update person along with addresses Required
DELETE http://localhost:8080/rest/person/{personId} Delete person by personId Required

The example application and datasource is configured using the configuration.json

About

A project used to develop the way OSGi enRoute could use persistence

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published