Skip to content

Commit f5be5fb

Browse files
author
ivanh
committed
Ivan's tweaks to Readme
1 parent d4099f9 commit f5be5fb

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
Demonstration of Declarative Services (DS) in OSGi JVM servers
33

44
## Preface
5-
This example shows how OSGi Declarative Services (DS) can be used in OSGi JVM servers to construct modular applications, with the ability to change implementations without loss of service.
5+
This example shows how OSGi Declarative Services (DS) can be used in an OSGi JVM server to perform application component refresh (change of, or fix to, implementations) without loss of service. Declarative Services removes the need for boilerplate tracking code such as ServiceTrackers, and by moving to a service component architecture from bundle-wiring (Import-Package) you gain all the dynamic refresh and look-up benefits of services. DS handles all the injection of components into your application, and ensures that if a service (or implementation) is removed it can seamlessly switch to a replacement (or updated) service.
66

7-
There are a number of projects in this simple sample (4 OSGi projects, each a corresponding CICS bundle project). However, even a complex application may still fit into this structure, depending on architecture.
7+
There are 8 projects in this simple sample (4 OSGi projects, and each has a corresponding CICS bundle project). This same architecture can be used for complex applications.
88

99
Below is a simple diagram which explains the relationships between these projects:
1010

1111
```
12-
Implementation +-----------+
13-
/------------------| In memory |
14-
+----------+ +-------------------+ / +-----------+
12+
Implementation 1 +-----------+
13+
/-------------------| In memory |
14+
+----------+ +-------------------+ / +-----------+
1515
| | Injection | |<--/
16-
| CICS App |<------------| Storage Interface |
16+
| CICS App |<------------| Storage Service |
1717
| | | |<--\
18-
+----------+ +-------------------+ \ +-----------+
19-
\------------------| TSQ |
20-
Implementation +-----------+
18+
+----------+ +-------------------+ \ +-----------+
19+
\-------------------| TSQ |
20+
Implementation 2 +-----------+
2121
```
2222

23-
The *CICS App* is the OSGi bundle which contains the CICS main class. It uses the interface provided by the *Storage Interface* to put data into storage and retrieve data from storage.
23+
The *CICS App* is the OSGi bundle which contains the CICS main class. It uses the interface, or service, provided by the *Storage Service* to put data into storage and retrieve data from storage.
2424

2525
In this example, we have two separate implementations of the storage service. Version 1.0.0 is a simple in-memory storage system, which uses Java objects to store data.
2626

@@ -30,6 +30,8 @@ In our example we follow the scenario that we have the base application running
3030

3131
When we first install the new bundle, the TSQ storage service will activate, but the CICS App will remain bound to the in-memory implementation. We can then disable the in-memory implementation. At which point OSGi declarative services will bind the new TSQ service and unbind the in-memory service (in that order). This means the CICS App is never left without a working implementation and therefore avoiding loss of service.
3232

33+
We have chosen to separate each component of the application into distinct CICS bundles to give ultimate flexibility.
34+
3335
## Supporting Files
3436
* [com.ibm.cicsdev.osgi.ds.cicsapp_1.0.0](projects/com.ibm.cicsdev.osgi.ds.cicsapp_1.0.0) - CICS application entry point
3537
* [com.ibm.cicsdev.osgi.ds.cicsapp.bundle_1.0.0](projects/com.ibm.cicsdev.osgi.ds.cicsapp.bundle_1.0.0) - CICS Bundle containing the application, program and transaction definitions.
@@ -41,18 +43,18 @@ When we first install the new bundle, the TSQ storage service will activate, but
4143
* [com.ibm.cicsdev.osgi.ds.storage.impl.bundle_1.1.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl.bundle_1.1.0) - CICS Bundle for the TSQ implementation
4244

4345
## Usage
44-
1. Deploy all found bundle projects to z/FS
46+
1. Deploy all the CICS bundle projects to z/FS
4547
2. Create an OSGi JVM server with the name `DFHOSGI`.
4648
3. Create CICS bundle definitions for these bundle projects. [Table 1](#table-1) shows the mapping of bundle to bundle name used.
47-
4. Install the bundles: `DS `, `DS-APP ` and `DS-IMP10`.
49+
4. Install the bundle definitions: `DS `, `DS-APP ` and `DS-IMP10`.
4850
5. Run the transaction `DSTS PUT INMEM`, this should display the message `Created entry 1`
4951
6. Run the transaction `DSTS GET 1`, this should display the message `INMEM`, which confirms the data was stored correctly in-memory
5052
7. Install the bundle `DS-IMP11`.
5153
8. Disable the bundle `DS-IMP10`.
5254
9. Run the transaction `DSTS GET 1`, this should ABEND because the entry was not found in the TSQ.
5355
10. Run the transaction `DSTS PUT TSQ`, this should display the message `Created entry 1`
5456
10. Run the transaction `DSTS GET 1`, this should display the message `TSQ`, which confirms the data was stored correctly in the TSQ (confirm by browsing on the TSQ `TSQS`, using the `CEBR` transaction for example).
55-
11. The standard out (STDOUT) file for the JVM server should display messages which indicate that the in-memory service (version 1.0.0) was first bound. Then later unbound when the bundle was disabled. Then that the TSQ service (1.1.0) was bound in it's place.
57+
11. The standard out (STDOUT) file for the JVM server should display messages that indicate the in-memory service (version 1.0.0) was first bound. Then later the service will be unbound when the bundle is disabled. You should also see that the TSQ service (1.1.0) is bound in it's place.
5658

5759

5860
### Table 1

0 commit comments

Comments
 (0)