Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added readme's Signed-off-by: Mark Hoffmann <m.hoffmann@data-in-motion.biz>
- Loading branch information
Showing
60 changed files
with
481 additions
and
577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+205 Bytes
(110%)
org.gecko.playground.exchange.impl/bin/org/gecko/playground/exchange/impl/Subscriber.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# `org.gecko.playground.http.jersey` | ||
|
||
This project is just a companion bundle that shows OSGi *@Requirement* annotations in *@RequireJersey* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# `org.gecko.playground.httpwhiteboard` | ||
|
||
This project shows how to use Jakarta Servlets in OSGi using the Servlet whiteboard. | ||
|
||
It contains a Servlets, registered as services and static resource configurations. | ||
|
||
The URLs are like this: | ||
|
||
* *HelloWorldServlet* - [http://localhost:8080/hello](http://localhost:8080/hello) | ||
* *ResourceService* for static resources: | ||
* [http://localhost:8080/myapp/index.html](http://localhost:8080/myapp/index.html) or | ||
* [http://localhost:8080/myapp/d3-demo2.html](http://localhost:8080/myapp/d3-demo2.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# `org.gecko.playground.jaxb` | ||
|
||
This project show an OSGi setup for JAXB. The important thing is to make JAXB find its implementation in an post Java 8 setup. | ||
|
||
For this we use the HK2-OSGi-ResourceLocator, that is called as part of the JAXB API implementation finding search order. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# `org.gecko.playground.logging` | ||
|
||
This project is a multi bundle project in bndtools. This means on project can generate multiple bundles. This is a simple bridge to log various logging API's: | ||
|
||
* slf4j | ||
* Java Util Logging | ||
* log4j | ||
* OSGi Log | ||
|
||
into one Log4j2 backend. | ||
|
||
The corresponding log4j2 configuration is located in *config/log4j2.xml* and you will find the resulting log file *gecko.log* in *cnf/logs/gecko.log* | ||
|
||
``` | ||
2023.09.02 14:46:33,784 INFO [Start Level: Equinox Container: b11aaa01-5f0e-4d8b-89f7-f771e0ba2703] org.gecko.playground.logging.test.LoggingComponent: Activate with Log4J | ||
2023.09.02 14:46:33,785 INFO [Start Level: Equinox Container: b11aaa01-5f0e-4d8b-89f7-f771e0ba2703] org.gecko.playground.logging.test.LoggingComponent: Activate with SLF4J | ||
2023.09.02 14:46:33,785 INFO [Start Level: Equinox Container: b11aaa01-5f0e-4d8b-89f7-f771e0ba2703] org.gecko.playground.logging.test.LoggingComponent: Activate with OSGi Logging | ||
``` | ||
|
||
These log entries come out of *LoggingComponent*, that test logging with different log API's. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# `org.gecko.playground.mongo` | ||
|
||
This project shows how to use a mongo-backed service to store and retrieve persons from an EMF model *org.gecko.playground.model*. | ||
|
||
The console *help* shows the commands: | ||
|
||
* `persistence:getPerson` | ||
* `persistence:savePerson` | ||
|
||
Here is an example: | ||
|
||
``` | ||
g! savePerson Emil Tester | ||
Sept. 02, 2023 12:31:33 PM com.mongodb.diagnostics.logging.JULLogger log | ||
INFORMATION: Opened connection [connectionId{localValue:2, serverValue:13}] to mongodb:27017 | ||
Saved Person in db with id 64f30f04f4bcc54824b1b8e5 | ||
g! getPerson 64f30f04f4bcc54824b1b8e5 | ||
Retrieved Person with id 64f30f04f4bcc54824b1b8e5 from db: Emil Tester | ||
``` | ||
|
||
This service is also used by the *playground.e4.rcp* example and the *playground.vaadin* applications as part of a more complex, re-usable part. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# `org.gecko.playground.promise` | ||
|
||
This project shows how to use asynchronous programming with OSGi Promises. The example shows how to use a `Deferred`, to hook in external frameworks and use their callbacks to trigger resolving of promises. This is a more advanced example, than the usual promises stuff. | ||
|
||
When starting the programm, you will see: | ||
|
||
``` | ||
g! Scheduling database connection (main) | ||
Finished activation (main) | ||
``` | ||
|
||
After 15 seconds the database is connected and sends the resolved state: | ||
|
||
``` | ||
Try connecting to database ... (pool-4-thread-1) | ||
Database seems available: Doing sthg with the database ... | ||
Database ID: CONID-b152b893-8961-4da7-8a80-11bf800a844a | ||
``` | ||
|
||
The `list` command shows you two components: | ||
|
||
``` | ||
g! list | ||
org.gecko.playground.promise.DatabaseDriverComponent in bundle 3 (org.gecko.playground.promise:1.0.0.202309021036-SNAPSHOT) enabled, 1 instance. | ||
Id: 1, State:ACTIVE | ||
org.gecko.playground.promise.DatabaseAvailableChecker in bundle 3 (org.gecko.playground.promise:1.0.0.202309021036-SNAPSHOT) enabled, 1 instance. | ||
Id: 0, State:ACTIVE | ||
``` | ||
|
||
|
||
|
||
If you e.g. stop the *DatabaseDriverComponent* with: | ||
|
||
``` | ||
g! disable org.gecko.playground.promise.DatabaseDriverComponent | ||
``` | ||
|
||
you will see, that the promise informs, that the database will be disconnected gracefully: | ||
|
||
``` | ||
Disconnected Database with ID: b152b893-8961-4da7-8a80-11bf800a844a | ||
true | ||
Database has gone! Stop working with database! | ||
``` | ||
|
||
|
||
|
Oops, something went wrong.