jawi / http-multiple-services

Example project showing how to register JAXRS services to different HTTP services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

http-multiple-services

Example project showing how to register JAXRS services to different HTTP services

Usage

Run the local.bndrun as regular OSGi application.

There are two applications running: one on http://localhost:9090/admin and one on http://localhost:8080/user. The resources do not "bleed" to the other whiteboard contexts.

How it works

There are two HTTP services configured/registered, one listening on port 9090 and one on port 8080. There are also two ServletContextHelpers, one for each port, that separate the resources that are registered with them, see the HTTP_WHITEBOARD_TARGET property that accepts an OSGi filter clause to select which (target) HTTP service should be used for the registration.

About

Example project showing how to register JAXRS services to different HTTP services

License:Apache License 2.0


Languages

Language:Java 100.0%