Skip to content

timothyjward/osgi.enroute.examples.jdbc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 82.8%
  • HTML 9.5%
  • JavaScript 4.9%
  • CSS 2.8%