OSGi service definitions

Defines OSGi services exposed by DS components.

License

License

GroupId

GroupId

no.priv.bang.osgi.service
ArtifactId

ArtifactId

osgi.service
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

xml
Description

Description

OSGi service definitions
Defines OSGi services exposed by DS components.
Source Code Management

Source Code Management

https://github.com/steinarb/osgi-service

Download osgi.service

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • osgi.service.database

OSGi service definitions

This repository defines OSGi services I have found useful, and where I have defined similar services in more than once project.

There is no application in this project, only service definitions.

The service definitions have been deployed to maven central.

Status of the project

https://travis-ci.org/steinarb/osgi-service.svg?branch=master https://coveralls.io/repos/steinarb/osgi-service/badge.svg https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.osgiservice%3Aosgiservice&metric=alert_status#.svg https://maven-badges.herokuapp.com/maven-central/no.priv.bang.osgiservice/osgiservice/badge.svg https://www.javadoc.io/badge/no.priv.bang.osgiservice/osgiservice.svg

SonarCloud

https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.osgiservice%3Aosgiservice&metric=ncloc#.svg https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.osgiservice%3Aosgiservice&metric=bugs#.svg https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.osgiservice%3Aosgiservice&metric=vulnerabilities#.svg https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.osgiservice%3Aosgiservice&metric=code_smells#.svg https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.osgiservice%3Aosgiservice&metric=coverage#.svg

Services defined in this project

no.priv.bang.osgiservice.database.DatabaseService

The DatabaseService provides access to an actual JDBC database instance. The DS components implementing this service typically:

  1. Receives a DataSourceFactory service
  2. From that DataSourceFactory:
    1. Creates a DataSource (by e.g. connecting to a remote RDBMS like PostgreSQL or e.g. creating an in-memory derby database)
    2. Uses liquibase to create a schema and provide initial data for the database in the DataSource

To compile code using this OSGi service, add the following dependency to your maven POM:

<dependency>
    <groupId>no.priv.bang.osgiservice</groupId>
    <artifactId>osgiservice.database</artifactId>
    <version>1.5.0</version>
    <scope>provided</scope>
</dependency>

To get runtime access to this OSGi service in apache karaf, add the following to the karaf feature definition of the OSGi bundle(s) using the interface:

<repository>mvn:no.priv.bang.osgiservice/osgiservice/1.5.0/xml/features</repository>
<feature name="myfeature">
    <feature>sb-database-osgi-service</feature>
</feature>

Alternatively, when using the karaf-maven-plugin it’s possible to add a karaf runtime feature dependency when generating a feature for your own bundle:

<dependency>
    <groupId>no.priv.bang.osgiservice</groupId>
    <artifactId>osgiservice.database</artifactId>
    <version>1.5.0</version>
    <type>xml</type>
    <classifier>features</classifier>
</dependency>

no.priv.bang.osgiservice.users.UserManagementService

The UserManagementService provides access to management of users, roles and permissions.

To compile code using this OSGi service, add the following dependency to your maven POM:

<dependency>
    <groupId>no.priv.bang.osgiservice</groupId>
    <artifactId>osgiservice.users</artifactId>
    <version>1.5.0</version>
    <scope>provided</scope>
</dependency>

To get runtime access to this OSGi service in apache karaf, add the following to the karaf feature definition of the OSGi bundle(s) using the interface:

<repository>mvn:no.priv.bang.osgiservice/osgiservice/1.5.0/xml/features</repository>
<feature name="myfeature">
    <feature>sb-database-osgi-service</feature>
</feature>

Alternatively, when using the karaf-maven-plugin it’s possible to add a karaf runtime feature dependency when generating a feature for your own bundle:

<dependency>
    <groupId>no.priv.bang.osgiservice</groupId>
    <artifactId>osgiservice.users</artifactId>
    <version>1.5.0</version>
    <type>xml</type>
    <classifier>features</classifier>
</dependency>

Release history

Version Date Description
1.5.0 [2019-12-31] Let Immutable provide hashCode() and equals() implementation to user management beans
1.4.0 [2019-10-27] Add abstract class DatabaseServiceBase implementing getConnection() and method for creating JDBC connection properties
1.3.0 [2019-10-14] Update plugins and dependencies and fix issue #1
1.2.0 [2019-03-30] Add methods to UserManagementService
1.1.0 [2019-02-17] Working javadoc, first version of the UserManagementService
1.0.0 [2018-12-19] First version of the DatabaseService

License

This code is licensed under the Apache license v. 2. See the LICENSE file for details.

Versions

Version
1.0.0