Skip to content

Commit f1db266

Browse files
SoftlySplinterGitHub Enterprise
authored andcommitted
Update README.md
1 parent afcfb1a commit f1db266

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

README.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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 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.
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 OSGi 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

77
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

@@ -28,38 +28,44 @@ The second implementation, version 1.1.0, uses a CICS TSQ to store data, using t
2828

2929
In our example we follow the scenario that we have the base application running using the in-memory storage service and we now want to upgrade to the new TSQ storage service.
3030

31-
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.
31+
When we first install the new CICS 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

3333
We have chosen to separate each component of the application into distinct CICS bundles to give ultimate flexibility.
3434

35+
## Prerequisites
36+
* CICS TS for z/OS 5.1 or above
37+
* Java SE 7.1 or above
38+
3539
## Supporting Files
36-
* [com.ibm.cicsdev.osgi.ds.cicsapp_1.0.0](projects/com.ibm.cicsdev.osgi.ds.cicsapp_1.0.0) - CICS application entry point
37-
* [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.
38-
* [com.ibm.cicsdev.osgi.ds.storage_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage_1.0.0) - Interfaces for the storage service
39-
* [com.ibm.cicsdev.osgi.ds.storage.bundle_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage.bundle_1.0.0) - CICS Bundle for the storage service interface
40-
* [com.ibm.cicsdev.osgi.ds.storage.impl_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl_1.0.0) - In-memory implementation of the storage service
41-
* [com.ibm.cicsdev.osgi.ds.storage.impl.bundle_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl.bundle_1.0.0) - CICS Bundle for the base in-memory implementation
42-
* [com.ibm.cicsdev.osgi.ds.storage.impl_1.1.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl_1.1.0) - TSQ implementation of the storage service
43-
* [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
40+
* [com.ibm.cicsdev.osgi.ds.cicsapp_1.0.0](projects/com.ibm.cicsdev.osgi.ds.cicsapp_1.0.0) - OSGi bundle project containing the CICS application entry point
41+
* [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.
42+
* [com.ibm.cicsdev.osgi.ds.storage_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage_1.0.0) - OSGi bundle project containing interfaces for the storage service
43+
* [com.ibm.cicsdev.osgi.ds.storage.bundle_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage.bundle_1.0.0) - CICS bundle for the storage service interface
44+
* [com.ibm.cicsdev.osgi.ds.storage.impl_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl_1.0.0) - OSGi bundle project containing the in-memory implementation of the storage service
45+
* [com.ibm.cicsdev.osgi.ds.storage.impl.bundle_1.0.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl.bundle_1.0.0) - CICS bundle for the base in-memory implementation
46+
* [com.ibm.cicsdev.osgi.ds.storage.impl_1.1.0](projects/com.ibm.cicsdev.osgi.ds.storage.impl_1.1.0) - OSGi bundle project containing the TSQ implementation of the storage service
47+
* [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
4448

4549
## Usage
46-
1. Deploy all the CICS bundle projects to z/FS
47-
2. Create an OSGi JVM server with the name `DFHOSGI`.
48-
3. Create CICS bundle definitions for these bundle projects. [Table 1](#table-1) shows the mapping of bundle to bundle name used.
49-
4. Install the bundle definitions: `DS `, `DS-APP ` and `DS-IMP10`.
50-
5. Run the transaction `DSTS PUT INMEM`, this should display the message `Created entry 1`
51-
6. Run the transaction `DSTS GET 1`, this should display the message `INMEM`, which confirms the data was stored correctly in-memory
52-
7. Install the bundle `DS-IMP11`.
53-
8. Disable the bundle `DS-IMP10`.
54-
9. Run the transaction `DSTS GET 1`, this should ABEND because the entry was not found in the TSQ.
55-
10. Run the transaction `DSTS PUT TSQ`, this should display the message `Created entry 1`
56-
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).
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.
50+
1. Clone or download this repository onto a local workstation
51+
2. Import the projects into CICS Explorer
52+
3. Deploy all the CICS bundle projects to zFS
53+
4. Create an OSGi JVM server with the name `DFHOSGI`.
54+
5. Create CICS bundle definitions for these OSGi bundle projects. [Table 1](#table-1) shows the mapping of bundle to bundle name used.
55+
6. Install the CICS bundle definitions: `DS `, `DS-APP ` and `DS-IMP10`.
56+
7. Run the transaction `DSTS PUT INMEM`, this should display the message `Created entry 1`
57+
8. Run the transaction `DSTS GET 1`, this should display the message `INMEM`, which confirms the data was stored correctly in-memory
58+
9. Install the CICS bundle `DS-IMP11`.
59+
10. Disable the CICS bundle `DS-IMP10`.
60+
11. Run the transaction `DSTS GET 1`, this should abend because the entry was not found in the TSQ.
61+
12. Run the transaction `DSTS PUT TSQ`, this should display the message `Created entry 1`
62+
13. 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).
63+
14. 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 OSGi bundle is disabled. You should also see that the TSQ service (1.1.0) is bound in it's place.
5864

5965

6066
### Table 1
6167

62-
| CICS Bundle Name | Bundle Project |
68+
| CICS Bundle Name | OSGi Bundle Project |
6369
| ---------------- | ---------------------------------------- |
6470
| `DS ` | com.ibm.cicsdev.osgi.ds.bundle_1.0.0 |
6571
| `DS-APP ` | com.ibm.cicsdev.osgi.ds.app.bundle_1.0.0 |

0 commit comments

Comments
 (0)