Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
© 2012 IBM Corporation
IBM
CICS and Java
OSGi within business critical mainframe environments
Java and OSGi Developer Edit...
© 2012 IBM Corporation
CICS and Java
2 Java and OSGi Developer EditionOctober 25, 2012
IBM
Standard
interfaces
Possible Ta...
© 2012 IBM Corporation
CICS and Java
3 Java and OSGi Developer EditionOctober 25, 2012
IBM
A Java Anology
© 2012 IBM Corporation
CICS and Java
4 Java and OSGi Developer EditionOctober 25, 2012
IBM
Agenda
Mainframe: What it is, w...
© 2012 IBM Corporation
CICS and Java
5 Java and OSGi Developer EditionOctober 25, 2012
IBM
Agenda
Mainframe: What it is, w...
© 2012 IBM Corporation
CICS and Java
6 Java and OSGi Developer EditionOctober 25, 2012
IBM
IBM System z
 System z is the ...
© 2012 IBM Corporation
CICS and Java
7 Java and OSGi Developer EditionOctober 25, 2012
IBM
Batch vs. Online
Batch job
Onli...
© 2012 IBM Corporation
CICS and Java
8 Java and OSGi Developer EditionOctober 25, 2012
IBM
Business Application Requiremen...
© 2012 IBM Corporation
CICS and Java
9 Java and OSGi Developer EditionOctober 25, 2012
IBM
CICS – An Application Server
Pr...
© 2012 IBM Corporation
CICS and Java
10 Java and OSGi Developer EditionOctober 25, 2012
IBM
Linking CICS Programs
Assemble...
© 2012 IBM Corporation
CICS and Java
11 Java and OSGi Developer EditionOctober 25, 2012
IBM
Transactions & Tasks
SELECT
TY...
© 2012 IBM Corporation
CICS and Java
12 Java and OSGi Developer EditionOctober 25, 2012
IBM
Transaction Flow
SELECT
TYPE: ...
© 2012 IBM Corporation
CICS and Java
13 Java and OSGi Developer EditionOctober 25, 2012
IBM
Communication Services
 VTAM ...
© 2012 IBM Corporation
CICS and Java
14 Java and OSGi Developer EditionOctober 25, 2012
IBM
Task Control
 Check if input ...
© 2012 IBM Corporation
CICS and Java
15 Java and OSGi Developer EditionOctober 25, 2012
IBM
Program Control
 Locate and i...
© 2012 IBM Corporation
CICS and Java
16 Java and OSGi Developer EditionOctober 25, 2012
IBM
User Application Program
Examp...
© 2012 IBM Corporation
CICS and Java
17 Java and OSGi Developer EditionOctober 25, 2012
IBM
Message Input
 Transform rece...
© 2012 IBM Corporation
CICS and Java
18 Java and OSGi Developer EditionOctober 25, 2012
IBM
File Access
 VSAM file must b...
© 2012 IBM Corporation
CICS and Java
19 Java and OSGi Developer EditionOctober 25, 2012
IBM
External Resource Manager
 Ex...
© 2012 IBM Corporation
CICS and Java
20 Java and OSGi Developer EditionOctober 25, 2012
IBM
Recovery Manager
SELECT
TYPE: ...
© 2012 IBM Corporation
CICS and Java
21 Java and OSGi Developer EditionOctober 25, 2012
IBM
Queues
SELECT
TYPE: 564-89712-...
© 2012 IBM Corporation
CICS and Java
22 Java and OSGi Developer EditionOctober 25, 2012
IBM
Trace
 Summary of all activit...
© 2012 IBM Corporation
CICS and Java
23 Java and OSGi Developer EditionOctober 25, 2012
IBM
Dumps
SELECT
TYPE: 564-89712-0...
© 2012 IBM Corporation
CICS and Java
24 Java and OSGi Developer EditionOctober 25, 2012
IBM
Message Output
SELECT
TYPE: 56...
© 2012 IBM Corporation
CICS and Java
25 Java and OSGi Developer EditionOctober 25, 2012
IBM
Ending the Transaction
SELECT
...
© 2012 IBM Corporation
CICS and Java
26 Java and OSGi Developer EditionOctober 25, 2012
IBM
Java is just another Language
...
© 2012 IBM Corporation
CICS and Java
28 Java and OSGi Developer EditionOctober 25, 2012
IBM
Java on Mainframes - what is d...
© 2012 IBM Corporation
CICS and Java
29 Java and OSGi Developer EditionOctober 25, 2012
IBM
IBM J9 2.6 Technology Enhancem...
© 2012 IBM Corporation
CICS and Java
30 Java and OSGi Developer EditionOctober 25, 2012
IBM
z Hardware: Java as a Workload...
© 2012 IBM Corporation
CICS and Java
31 Java and OSGi Developer EditionOctober 25, 2012
IBM
Java packaging and class hiera...
© 2012 IBM Corporation
CICS and Java
32 Java and OSGi Developer EditionOctober 25, 2012
IBM
The Classpath – What was calle...
© 2012 IBM Corporation
CICS and Java
33 Java and OSGi Developer EditionOctober 25, 2012
IBM
Dependencies between different...
© 2012 IBM Corporation
CICS and Java
34 Java and OSGi Developer EditionOctober 25, 2012
IBM
Agenda
Mainframe: What it is, ...
© 2012 IBM Corporation
CICS and Java
35 Java and OSGi Developer EditionOctober 25, 2012
IBM
OSGi – A dynamic module System...
© 2012 IBM Corporation
CICS and Java
36 Java and OSGi Developer EditionOctober 25, 2012
IBM
What is in OSGi for you?
 The...
© 2012 IBM Corporation
CICS and Java
37 Java and OSGi Developer EditionOctober 25, 2012
IBM
Bundle A
Each bundle has it's ...
© 2012 IBM Corporation
CICS and Java
38 Java and OSGi Developer EditionOctober 25, 2012
IBM
OSGi bundles
JAR file
Manifest...
© 2012 IBM Corporation
CICS and Java
39 Java and OSGi Developer EditionOctober 25, 2012
IBM
OSGi Class Loader Model
Bundle...
© 2012 IBM Corporation
CICS and Java
40 Java and OSGi Developer EditionOctober 25, 2012
IBM
Component
C
Component
B
Compon...
© 2012 IBM Corporation
CICS and Java
41 Java and OSGi Developer EditionOctober 25, 2012
IBM
Bundle-Lifecycle
Installed
Res...
© 2012 IBM Corporation
CICS and Java
42 Java and OSGi Developer EditionOctober 25, 2012
IBM
OSGI Enterprise Edition
 Exte...
© 2012 IBM Corporation
CICS and Java
46 Java and OSGi Developer EditionOctober 25, 2012
IBM
Small Quiz
○ Small Quiz:
♦ Why...
© 2012 IBM Corporation
CICS and Java
47 Java and OSGi Developer EditionOctober 25, 2012
IBM
Some best practices, when deve...
© 2012 IBM Corporation
CICS and Java
48 Java and OSGi Developer EditionOctober 25, 2012
IBM
Agenda
Mainframe: What it is, ...
© 2012 IBM Corporation
CICS and Java
49 Java and OSGi Developer EditionOctober 25, 2012
IBM
Flashback: CICS Pooled Server ...
© 2012 IBM Corporation
CICS and Java
50 Java and OSGi Developer EditionOctober 25, 2012
IBM
CICS zFS
SIT
RDO
USS
Directory...
© 2012 IBM Corporation
CICS and Java
51 Java and OSGi Developer EditionOctober 25, 2012
IBM
The JVM Server
© 2012 IBM Corporation
CICS and Java
52 Java and OSGi Developer EditionOctober 25, 2012
IBM
JVM servers
 CICS requests st...
© 2012 IBM Corporation
CICS and Java
53 Java and OSGi Developer EditionOctober 25, 2012
IBM
CICS zFS
SIT
RDO
Profile
Direc...
© 2012 IBM Corporation
CICS and Java
54 Java and OSGi Developer EditionOctober 25, 2012
IBM
How all the XML manifests belo...
© 2012 IBM Corporation
CICS and Java
55 Java and OSGi Developer EditionOctober 25, 2012
IBM
OSGi bundles within CICS
JAR f...
© 2012 IBM Corporation
CICS and Java
56 Java and OSGi Developer EditionOctober 25, 2012
IBM
How are the Java Resources Man...
© 2012 IBM Corporation
CICS and Java
57 Java and OSGi Developer EditionOctober 25, 2012
IBM
Agenda
Mainframe: What it is, ...
© 2012 IBM Corporation
CICS and Java
58 Java and OSGi Developer EditionOctober 25, 2012
IBM
Which tools did we discovered ...
© 2012 IBM Corporation
CICS and Java
59 Java and OSGi Developer EditionOctober 25, 2012
IBM
The application needs to be de...
© 2012 IBM Corporation
CICS and Java
60 Java and OSGi Developer EditionOctober 25, 2012
IBM
CICS
Online Controller
COBOL L...
© 2012 IBM Corporation
CICS and Java
61 Java and OSGi Developer EditionOctober 25, 2012
IBM
Batch Address Space
JVM
COBOL
...
© 2012 IBM Corporation
CICS and Java
62 Java and OSGi Developer EditionOctober 25, 2012
IBM
Batch Architecture in more det...
© 2012 IBM Corporation
CICS and Java
63 Java and OSGi Developer EditionOctober 25, 2012
IBM
JES2 – BatchCICS – Online
Batc...
© 2012 IBM Corporation
CICS and Java
64 Java and OSGi Developer EditionOctober 25, 2012
IBM
Agenda
Mainframe: What it is, ...
© 2012 IBM Corporation
CICS and Java
65 Java and OSGi Developer EditionOctober 25, 2012
IBM
Standard
interfaces
Possible T...
© 2012 IBM Corporation
CICS and Java
66 Java and OSGi Developer EditionOctober 25, 2012
IBM
Beispiel: Nutzung eines intern...
© 2012 IBM Corporation
CICS and Java
67 Java and OSGi Developer EditionOctober 25, 2012
IBM
Verbesserung durch doppel-Depl...
© 2012 IBM Corporation
CICS and Java
68 Java and OSGi Developer EditionOctober 25, 2012
IBM
Die entstandene Verbesserung l...
© 2012 IBM Corporation
CICS and Java
69 Java and OSGi Developer EditionOctober 25, 2012
IBM
What's next? The Liberty Profi...
© 2012 IBM Corporation
CICS and Java
70 Java and OSGi Developer EditionOctober 25, 2012
IBM
How does Liberty within CICS w...
© 2012 IBM Corporation
CICS and Java
71 IBM Confidential
IBM
Why implement it like that?
- Benefits of Hybrid Threads
 Ea...
© 2012 IBM Corporation
CICS and Java IBM
Vision for Applications, Platforms and Policies
"Hey Simon, I need to test my new...
© 2012 IBM Corporation
CICS and Java IBM
First-class applications
A collection of one or more CICS bundles
Life-cycle as a...
© 2012 IBM Corporation
CICS and Java IBM
First-class platforms
Set of one or more region types
Life-cycle as a single enti...
© 2012 IBM Corporation
CICS and Java
75 Java and OSGi Developer EditionOctober 25, 2012
IBM
If we have time: What does a p...
© 2012 IBM Corporation
CICS and Java
76 Java and OSGi Developer EditionOctober 25, 2012
IBM
Questions?
Please provide Feed...
Upcoming SlideShare
Loading in …5
×

CICS and Java - Within Business Critical Mainframe Environments - Tobias Leicher

709 views

Published on

OSGi Community Event 2012

Published in: Technology
  • Be the first to comment

CICS and Java - Within Business Critical Mainframe Environments - Tobias Leicher

  1. 1. © 2012 IBM Corporation IBM CICS and Java OSGi within business critical mainframe environments Java and OSGi Developer Edition Tobias Leicher, Technical Specialist for CICS
  2. 2. © 2012 IBM Corporation CICS and Java 2 Java and OSGi Developer EditionOctober 25, 2012 IBM Standard interfaces Possible Target Szenario Cobol-Modules New functions realised with Java DB2 Java-Modules System z Efficient programming model Reduced maintenance costs Stepwise integration Java Modul Big Picture: Where to go with the CICS Development Today (sample scenario) System z Cobol-Modules New functions How to implement? DB2 How to use services of other systems? Hard to maintance/change? App Server External Systems Java Modul Modernisation Target Architecture?
  3. 3. © 2012 IBM Corporation CICS and Java 3 Java and OSGi Developer EditionOctober 25, 2012 IBM A Java Anology
  4. 4. © 2012 IBM Corporation CICS and Java 4 Java and OSGi Developer EditionOctober 25, 2012 IBM Agenda Mainframe: What it is, what it is for and why should Java be used on it OSGI – A Service Oriented Approach for Java OSGI and CICS: How does the JVMSERVER change the way of Java in CICS Plattform independent development Conclusion and Outlook: Java, CICS and Cloudstyle deployment
  5. 5. © 2012 IBM Corporation CICS and Java 5 Java and OSGi Developer EditionOctober 25, 2012 IBM Agenda Mainframe: What it is, what it is for and why should Java be used on it OSGI – A Service Oriented Approach for Java OSGI and CICS: How does the JVMSERVER change the way of Java in CICS Plattform independent development Conclusion and Outlook: Java, CICS and Cloudstyle deployment
  6. 6. © 2012 IBM Corporation CICS and Java 6 Java and OSGi Developer EditionOctober 25, 2012 IBM IBM System z  System z is the flagship mainframe operating system  Mainframe can simultaneously run many OSs including Linux  Facts about the mainframe: – 2 power supply units (PSUs) – Used by top 50+ banks in the world – Record breaking 9445 transactions/sec  Specialty engines – zAAP – application assist processor (Java) – zIIP – integrated information processor (databases) – Cell processor - virtual worlds
  7. 7. © 2012 IBM Corporation CICS and Java 7 Java and OSGi Developer EditionOctober 25, 2012 IBM Batch vs. Online Batch job Online transaction Input Data Application program Process data to perform a particular task Output Data Application program Accesses shared Data on behalf of an online user Query Reply
  8. 8. © 2012 IBM Corporation CICS and Java 8 Java and OSGi Developer EditionOctober 25, 2012 IBM Business Application Requirements Communications Database Manager Operating System Hardware CICS Application Server Naming Locking Administration Exception Handling Recovery Performance End-to-End Integrity Multithreading Logging Scheduling Security Connectivity Queue Management Time Control ApplicationBusiness Logic
  9. 9. © 2012 IBM Corporation CICS and Java 9 Java and OSGi Developer EditionOctober 25, 2012 IBM CICS – An Application Server Programs Assembler COBOL PL/I C C++ Java Services InterfacesInterfaces Transactions WLM Monitoring Statistics Security 3270 CTG Web Web services CICS TS runs on System z…
  10. 10. © 2012 IBM Corporation CICS and Java 10 Java and OSGi Developer EditionOctober 25, 2012 IBM Linking CICS Programs Assembler COBOL PL/I CC++ Java CICS Data is passed using a Channel or COMMAREA
  11. 11. © 2012 IBM Corporation CICS and Java 11 Java and OSGi Developer EditionOctober 25, 2012 IBM Transactions & Tasks SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Task 1 Task 3 Task 2 EGUI Program DFH0XGUI ECFG Program DFH0XCFG Resource Definitions
  12. 12. © 2012 IBM Corporation CICS and Java 12 Java and OSGi Developer EditionOctober 25, 2012 IBM Transaction Flow SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Dump Control Dump File Message Adapter Trace Table Application Program Trace File Control Recovery Manager ERM: Database WMQ Queues Trace File Transient Data Temporary Storage Data Base VSAM Data Set Load Library Log Stream
  13. 13. © 2012 IBM Corporation CICS and Java 13 Java and OSGi Developer EditionOctober 25, 2012 IBM Communication Services  VTAM or TCPIP receives message & passes to protocol handler  Protocol handler copies message in buffer for later processing SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services
  14. 14. © 2012 IBM Corporation CICS and Java 14 Java and OSGi Developer EditionOctober 25, 2012 IBM Task Control  Check if input transaction ID valid  Create storage area called task control area (TCA) for task representation SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control
  15. 15. © 2012 IBM Corporation CICS and Java 15 Java and OSGi Developer EditionOctober 25, 2012 IBM Program Control  Locate and invoke first program for transaction  Program defined as PROGRAM resource in CICS and referenced by transaction  Load program from library if not already in memory SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Load Library
  16. 16. © 2012 IBM Corporation CICS and Java 16 Java and OSGi Developer EditionOctober 25, 2012 IBM User Application Program Example  Receive message  Perform some logic  Send message  Return to CICS SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Application Program Load Library
  17. 17. © 2012 IBM Corporation CICS and Java 17 Java and OSGi Developer EditionOctober 25, 2012 IBM Message Input  Transform received input data if necessary SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Message Adapter Application Program Load Library
  18. 18. © 2012 IBM Corporation CICS and Java 18 Java and OSGi Developer EditionOctober 25, 2012 IBM File Access  VSAM file must be defined in FILE definition in CICS  Perform create/ read/ update/ delete  CICS provides completion information SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Message Adapter Application Program File Control VSAM Data Set Load Library
  19. 19. © 2012 IBM Corporation CICS and Java 19 Java and OSGi Developer EditionOctober 25, 2012 IBM External Resource Manager  Extension of standard CICS resource set by External Resource Manager (ERM) like DB2 or WebSphere MQ or DBCTL ( IMS-DB) SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Message Adapter Application Program File Control Recovery Manager ERM: Database WMQ Data Base VSAM Data Set Load Library
  20. 20. © 2012 IBM Corporation CICS and Java 20 Java and OSGi Developer EditionOctober 25, 2012 IBM Recovery Manager SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Message Adapter Application Program File Control Recovery Manager ERM: Database WMQ Data Base VSAM Data Set Load Library Log Stream  Log stream (MVS Logger) used to store recovery information
  21. 21. © 2012 IBM Corporation CICS and Java 21 Java and OSGi Developer EditionOctober 25, 2012 IBM Queues SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Message Adapter Application Program File Control Recovery Manager ERM: Database WMQ Queues Transient Data Temporary Storage Data Base VSAM Data Set Load Library Log Stream  Temp to store information for later  Transient to pass data to other CICS task or batch job as sequential file  CICS uses TD (transient data) Queues for message logging
  22. 22. © 2012 IBM Corporation CICS and Java 22 Java and OSGi Developer EditionOctober 25, 2012 IBM Trace  Summary of all activities during execution  Trace written into trace table or sequential trace file SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Message Adapter Trace Table Application Program Trace File Control Recovery Manager ERM: Database WMQ Queues Trace File Transient Data Data Base VSAM Data Set Load Library Log Stream Temporary Storage
  23. 23. © 2012 IBM Corporation CICS and Java 23 Java and OSGi Developer EditionOctober 25, 2012 IBM Dumps SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Dump Control Dump File Message Adapter Trace Table Application Program Trace File Control Recovery Manager ERM: Database WMQ Queues Trace File Transient Data Data Base VSAM Data Set Load Library Log Stream Temporary Storage  Write dump if serious error or abnormal termination
  24. 24. © 2012 IBM Corporation CICS and Java 24 Java and OSGi Developer EditionOctober 25, 2012 IBM Message Output SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Program Control Dump Control Dump File Message Adapter Trace Table Application Program Trace File Control Recovery Manager ERM: Database WMQ Queues Trace File Transient Data Data Base VSAM Data Set Load Library Log Stream Temporary Storage  Send back reply to user
  25. 25. © 2012 IBM Corporation CICS and Java 25 Java and OSGi Developer EditionOctober 25, 2012 IBM Ending the Transaction SELECT TYPE: 564-89712-0 QUERY UPDATE EGUI Comms Services Task Control Task Control Area Working storage Other task related storage
  26. 26. © 2012 IBM Corporation CICS and Java 26 Java and OSGi Developer EditionOctober 25, 2012 IBM Java is just another Language which is running on the Mainframe
  27. 27. © 2012 IBM Corporation CICS and Java 28 Java and OSGi Developer EditionOctober 25, 2012 IBM Java on Mainframes - what is different and why here?  IBM uses its own implementation of a JVM on mainframes that uses the underlying platform architecture  The Java workload can be offloaded to a zAAP processor  The Java logic can be a bridge between the mainframe and the distributed world  Java is a common language on many platforms that can help to find a dialog between the departments  Java is a language that is well known by many new professionals and so a good common ground, when they start to develop for mainframe applications  The language encourages a good design and loose coupling of components IBM JDK for z/OS Standard JSE (JDK specification) zOS Extensions Just In Time Compiler (JIT) Exploitation of the Hardware Architecture z/OS Operating System and System z Hardware
  28. 28. © 2012 IBM Corporation CICS and Java 29 Java and OSGi Developer EditionOctober 25, 2012 IBM IBM J9 2.6 Technology Enhancements: System zEnterprise 196 and Java6.0.1/Java7
  29. 29. © 2012 IBM Corporation CICS and Java 30 Java and OSGi Developer EditionOctober 25, 2012 IBM z Hardware: Java as a Workload Optimized System
  30. 30. © 2012 IBM Corporation CICS and Java 31 Java and OSGi Developer EditionOctober 25, 2012 IBM Java packaging and class hierarchies  Java modularity: –Classes contain data and logic –Packages contain these classes and organize them • This is just a virtual form of organization –Jar files contain the classes and are the base for enterprise applications  Java visibility settings: –Private, protected, package private, public  At the runtime, there are just a lot of classes on a classpath jar file java packages class files There are some features missing: jar visibility, versioning, dependencies
  31. 31. © 2012 IBM Corporation CICS and Java 32 Java and OSGi Developer EditionOctober 25, 2012 IBM The Classpath – What was called a load lib concatenation before Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm jdom jenks jpos18 jython looks lucene mail mx4j naming jetty poi resolver rome serializer servlets tomcat velocity ws-commons xalan wsdl4j xerces xmlgraphics xmlrpc xmlapis .. geronimo bsh bsf guiapp hhfacility manufact. marketing minerva accounting assetmaint base bi catalina common oagis order ebay content datafile ecommerce entity googlebase ofbiz widget minilang party pos. product workeffort workflow … sunjce_prov. plugin jsse jce rt dnsns .. … Class Not Found Exception BeginBegin HereHere
  32. 32. © 2012 IBM Corporation CICS and Java 33 Java and OSGi Developer EditionOctober 25, 2012 IBM Dependencies between different Classes Class A Class B Class C System Class D Class H Class I Class J Class K Library X Library Y Library Z If you need a new Version of this library, this change always effects all referencing classes in the JVM!
  33. 33. © 2012 IBM Corporation CICS and Java 34 Java and OSGi Developer EditionOctober 25, 2012 IBM Agenda Mainframe: What it is, what it is for and why should Java be used on it OSGI – A Service Oriented Approach for Java OSGI and CICS: How does the JVMSERVER change the way of Java in CICS Plattform independent development Conclusion and Outlook: Java, CICS and Cloudstyle deployment
  34. 34. © 2012 IBM Corporation CICS and Java 35 Java and OSGi Developer EditionOctober 25, 2012 IBM OSGi – A dynamic module System for Java It provides a general-purpose, secure, and managed Java framework that supports the deployment of extensible and downloadable applications known as bundles. The OSGi Alliance, Core Specification Sounds familiar? Isn't that already possible with Java?
  35. 35. © 2012 IBM Corporation CICS and Java 36 Java and OSGi Developer EditionOctober 25, 2012 IBM What is in OSGi for you?  The OSGi Service Platform specifies a modular architecture for dynamic component based systems –Execution Environment –Module Layer –Life Cycle Layer –Service Layer –Security-Layer (optional)  Runs on a variety of standard Java profiles.  Introduces Bundles as modules
  36. 36. © 2012 IBM Corporation CICS and Java 37 Java and OSGi Developer EditionOctober 25, 2012 IBM Bundle A Each bundle has it's own class loader! Bundle B Export-Package: package.a Export-Package: package.b Bundle C Import-Package: package.a package.b Export-Package: package.c
  37. 37. © 2012 IBM Corporation CICS and Java 38 Java and OSGi Developer EditionOctober 25, 2012 IBM OSGi bundles JAR file Manifest.mf + entries = OSGi bundle (JAR file) + Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Hello Plug-in Bundle-SymbolicName: com.ibm.cics.server.examples.hello Bundle-Version: 1.0.0 Bundle-RequiredExecutionEnvironment: J2SE-1.4, J2SE-1.5, JavaSE-1.6 Import-Package: com.ibm.cics.server;version="[0.0.0,2.0.0)“ Export-Package: examples.hello OSGi Bundle – A jar containing:  Classes and resources.  OSGi Bundle manifest – Bundle-Version: Multiple versions of bundles can live concurrently. – Import-Package: What packages from other bundles does this bundle depend upon? – Export-Package: What packages from this bundle are visible and reusable outside of the bundle?
  38. 38. © 2012 IBM Corporation CICS and Java 39 Java and OSGi Developer EditionOctober 25, 2012 IBM OSGi Class Loader Model Bundle A Import-Package: package.b Package.c Export-Package: package.a package.a Bundle B Export-Package: package.b package.b Bundle C Export-Package: package.c package.c When bundles are installed into OSGi framework, the module layer 1. Processes metadata in the manifest file 2. reconciles declared external dependencies against exports & version information declared by other installed modules 3. works out all dependencies & calculates independent required class path for each bundle Ensure that • Each bundle provides visibility only to Java packages that it explicitly exports - exported at specific versions possible • Each bundle declares its package dependencies explicitly - import at specific / range of versions possible • Multiple versions of a package can be available concurrently to different clients
  39. 39. © 2012 IBM Corporation CICS and Java 40 Java and OSGi Developer EditionOctober 25, 2012 IBM Component C Component B Component A Old World and New World Class A Class B Class C System Class D Class H Class I Class J Class K Library X Library Y Library Z Class A Class B Class C System Class D Class H Class I Class J v 2.0 Class K Library X Library Z v 1.2 Class J v 1.0 Library Z v 1.5Library Y
  40. 40. © 2012 IBM Corporation CICS and Java 41 Java and OSGi Developer EditionOctober 25, 2012 IBM Bundle-Lifecycle Installed Resolved Starting Active StoppingUninstalled install resolverefresh update start uninstall uninstall stop refresh update Policy: eager/lazy
  41. 41. © 2012 IBM Corporation CICS and Java 42 Java and OSGi Developer EditionOctober 25, 2012 IBM OSGI Enterprise Edition  Extends the OSGi core specification with important features that are used within enterprises  Enabled OSGI for enterprise applications  Main focus is set on the existing JEE platforms  Within this enterprise extension, there are two methods to declare services –Declarative Services (DS) –Blueprint  The reference implementation is Apache Aries –Is based on eclipse equinox as underlying OSGi framework –The implementation of the OSGi EE stadnart itself is done within OSGi packages that are running within the equinox framework
  42. 42. © 2012 IBM Corporation CICS and Java 46 Java and OSGi Developer EditionOctober 25, 2012 IBM Small Quiz ○ Small Quiz: ♦ Why is the JCICS package numbered with: 1.0.0, 1.100.0, 1.201.0 and 1.300.0?
  43. 43. © 2012 IBM Corporation CICS and Java 47 Java and OSGi Developer EditionOctober 25, 2012 IBM Some best practices, when developing object oriented with OSGi  Always separate interface and implementation, design an API: –An API is the data exchange point within an application and is not just a Java Interface definition. It contains • Objects that are exchanged • Methods that are used • ... –Use a loose coupling between the OSGi bundles and always use/import the API (consequently never export any packages from the implementation bundles)  Use a declarative based service approach within applications: –Avoid the programming of service registration  Package 3rd party libraries also within OSGi bundles, to include them into the lifecycle  Use a semantic versioning to identify the bundles –First high level qualifier change is not compatible with earlier versions (API Change) –Second high level qualifier changes are backward compatible, but need the implementation to be changed on the provider side, to provide the new functionality for new clients –Third high level qualifier changes show fixes, that are transparent to users and API
  44. 44. © 2012 IBM Corporation CICS and Java 48 Java and OSGi Developer EditionOctober 25, 2012 IBM Agenda Mainframe: What it is, what it is for and why should Java be used on it OSGI – A Service Oriented Approach for Java OSGI and CICS: How does the JVMSERVER change the way of Java in CICS Plattform independent development Conclusion and Outlook: Java, CICS and Cloudstyle deployment
  45. 45. © 2012 IBM Corporation CICS and Java 49 Java and OSGi Developer EditionOctober 25, 2012 IBM Flashback: CICS Pooled Server Architecture
  46. 46. © 2012 IBM Corporation CICS and Java 50 Java and OSGi Developer EditionOctober 25, 2012 IBM CICS zFS SIT RDO USS Directory with Class Files ProgramTransaktion JVMJVMJVMJVM JVM Flashback II: Old pooled Architecture Profile
  47. 47. © 2012 IBM Corporation CICS and Java 51 Java and OSGi Developer EditionOctober 25, 2012 IBM The JVM Server
  48. 48. © 2012 IBM Corporation CICS and Java 52 Java and OSGi Developer EditionOctober 25, 2012 IBM JVM servers  CICS requests storage from MVS, sets up a Language Environment enclave, and launches the 64-bit JVM in the enclave.  IBM® 64-bit SDK for z/OS, Java Technology Edition, Version 6.0.1  Up to 256 parallel tasks/JVM & 1024/CICS  Applications – Must be threadsafe – deployed as OSGi bundles (in CICS bundles)  Dynamic updates without restart  No EJB support CICS TS v4.2 JVM LE enclave CICS Task PThread JVM thread CICS Task PThread JVM thread CICS Task PThread JVM thread Heap & Classes
  49. 49. © 2012 IBM Corporation CICS and Java 53 Java and OSGi Developer EditionOctober 25, 2012 IBM CICS zFS SIT RDO Profile Directory CICS Bundles Transaktion Program CICS Bundle com.test.messaging JVM OSGi Bundle com.test.billing com.test.helloworld New JVM-Server Architecture Bundle
  50. 50. © 2012 IBM Corporation CICS and Java 54 Java and OSGi Developer EditionOctober 25, 2012 IBM How all the XML manifests belong together hello.osgibundle <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <osgibundle symbolicname="com.ibm.cics.server.examples.hello" version="1.0.0" jvmserver="DFH$JVMS"/> cics.xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <manifest xmlns="http://www.ibm.com/xmlns/prod/cics/bundle" bundleVersion="1" bundleRelease="0" build="Not Found"> <meta_directives> <timestamp>2010-11-25T10:55:24.052Z</timestamp> </meta_directives> <define name="hello" type="http://www.ibm.com/xmlns/prod/cics/bundle/OSGIBUNDLE" path="hello.osgibundle"/> </manifest> Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Hello Plug-in Bundle-SymbolicName: com.ibm.cics.server.examples.hello Bundle-Version: 1.0.0 Bundle-RequiredExecutionEnvironment: J2SE-1.4,J2SE-1.5,JavaSE-1.6 Import-Package: com.ibm.cics.server;version="[0.0.0,2.0.0)" CICS-MainClass: examples.hello.HelloCICSWorld, examples.hello.HelloWorld
  51. 51. © 2012 IBM Corporation CICS and Java 55 Java and OSGi Developer EditionOctober 25, 2012 IBM OSGi bundles within CICS JAR file Manifest.mf + entries = OSGi bundle (JAR file) + Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Hello Plug-in Bundle-SymbolicName: com.ibm.cics.server.examples.hello Bundle-Version: 1.0.0 Bundle-RequiredExecutionEnvironment: J2SE-1.4, J2SE-1.5, JavaSE-1.6 Import-Package: com.ibm.cics.server;version="[0.0.0,2.0.0)“ Export-Package: examples.hello CICS-MainClass: examples.hello.HelloCICSWorld, examples.hello.HelloWorld Most Parts of the descriptor are the same, except the CICS-MainClass:  CICS needs to know, which Class can be called as a program  CICS processes the metafile before it is handed to the OSGi framework and the information is stored in the CICS repositories.  This information can be discovered using CICS Explorer, but not CEMT!
  52. 52. © 2012 IBM Corporation CICS and Java 56 Java and OSGi Developer EditionOctober 25, 2012 IBM How are the Java Resources Managed within CICS and zOS in general  With Java CICS leaves once again the traditional way of definitions within the CSD, like it does with the Event Bindings.  The reasons are manifold, but the biggest impact comes from the increased complex artifacts  So how are bundles managed? –Like the resources in the distributed world within zFS files: Playground Daily Business FTP CICS Manually define Resources Check In Build Distribute Define Resources
  53. 53. © 2012 IBM Corporation CICS and Java 57 Java and OSGi Developer EditionOctober 25, 2012 IBM Agenda Mainframe: What it is, what it is for and why should Java be used on it OSGI – A Service Oriented Approach for Java OSGI and CICS: How does the JVMSERVER change the way of Java in CICS Plattform independent development Conclusion and Outlook: Java, CICS and Cloudstyle deployment
  54. 54. © 2012 IBM Corporation CICS and Java 58 Java and OSGi Developer EditionOctober 25, 2012 IBM Which tools did we discovered yet?  Java: –Language that is able to run on the host –Object oriented approach  OSGi: –Service Oriented Approach –Exchange of modules that are in Service –Available in nearly all Java environments  So what is missing? » How is data accessed? » How are connections managed? » How is the output formatted? » How can other programs be integrated?  The following approach was developed by our service department led by Philipp Breitbach
  55. 55. © 2012 IBM Corporation CICS and Java 59 Java and OSGi Developer EditionOctober 25, 2012 IBM The application needs to be designed within a Framework Java Framework Service Control Layer Business Service Layer Data Access Layer ConnMgr LogMgr ErrorMgr ConfMgr CallMgr  The framework has to encapsulate the platform specific interfaces: –Database Access –Connection Management –Program calling which are provided by: –JEE –CICS –Batch  The business logic itself resides in plain java objects (POJO)  The framework needs to define specific a specific interface, that matches the requirements of the applications  The definition of that framework is sometimes already done by taking the JEE interface and design a testing framework for workstations
  56. 56. © 2012 IBM Corporation CICS and Java 60 Java and OSGi Developer EditionOctober 25, 2012 IBM CICS Online Controller COBOL Logic Java Framework Service Control Layer Business Service Layer Data Access Layer CICS LINK TxMgr Sessioning LicenseMgr ConnMgr TransportMgr LogMgr ErrorMgr ConfMgr CallMgr Online Architecture (CICS)
  57. 57. © 2012 IBM Corporation CICS and Java 61 Java and OSGi Developer EditionOctober 25, 2012 IBM Batch Address Space JVM COBOL JavaFramework Batch Job Step Business Service Data Service Batch Container BatchData Stream Checkpoint Algorithm JNI Batch Architecture
  58. 58. © 2012 IBM Corporation CICS and Java 62 Java and OSGi Developer EditionOctober 25, 2012 IBM Batch Architecture in more detail Batch Job Step Business Service Batch Container BatchData Stream  Batch Container initializes BatchDataStream (BDS) and Batch Job Step (BJS) » BDS can open cursors, files, … on init  Batch Container loops over BJS » BJS reads next input data from BDS on each iteration and calls one or more Business Services to do its Batch logic  Batch Container issues checkpoints (e.g. all 100 iterations, all 1000 rows written, …) depending on a Checkpoint Algorithm (CA) » BJS feeds CA with necessary data » BJS has a pre-checkpoint hook to facilitate e.g. JDBC Batch Updates init loop readNext call CheckpointAl gorithm feed init
  59. 59. © 2012 IBM Corporation CICS and Java 63 Java and OSGi Developer EditionOctober 25, 2012 IBM JES2 – BatchCICS – Online Batch Job Step Business Service Data Service Batch Container Service Control Online Controller (Java) JavaFramework Online and Batch Architecture together BDS CA
  60. 60. © 2012 IBM Corporation CICS and Java 64 Java and OSGi Developer EditionOctober 25, 2012 IBM Agenda Mainframe: What it is, what it is for and why should Java be used on it OSGI – A Service Oriented Approach for Java OSGI and CICS: How does the JVMSERVER change the way of Java in CICS Plattform independent development Conclusion and Outlook: Java, CICS and Cloudstyle deployment
  61. 61. © 2012 IBM Corporation CICS and Java 65 Java and OSGi Developer EditionOctober 25, 2012 IBM Standard interfaces Possible Target Szenario Cobol-Modules New functions realised with Java DB2 Java-Modules System z Efficient programming model Reduced maintenance costs Stepwise integration Java Modul Big Picture: Where to go with the CICS Development Today (sample scenario) System z Cobol-Modules New functions How to implement? DB2 How to use services of other systems? Hard to maintance/change? App Server External Systems Java Modul Modernisation
  62. 62. © 2012 IBM Corporation CICS and Java 66 Java and OSGi Developer EditionOctober 25, 2012 IBM Beispiel: Nutzung eines internen Web Services AIX AIX User Web Anwendung Web Service SOAP/ HTTP zOS CICS Secure Data Business Transaction CTG JDBC SOAP/HTTP
  63. 63. © 2012 IBM Corporation CICS and Java 67 Java and OSGi Developer EditionOctober 25, 2012 IBM Verbesserung durch doppel-Deployment AIX AIX User Web Anwendung Web Service SOAP/ HTTP zOS CICS Secure Data Business Transaction CTG JDBC CICS Link Web Service JDBC
  64. 64. © 2012 IBM Corporation CICS and Java 68 Java and OSGi Developer EditionOctober 25, 2012 IBM Die entstandene Verbesserung lässt sich messen  Performance Verbesserung durch den lokalen DB2 Zugriff  Auf Seiten des Hosts wesentlich einfacher zu warten  Die Verfügbarkeit wurde durch Plattform Konsolidierung erhöht
  65. 65. © 2012 IBM Corporation CICS and Java 69 Java and OSGi Developer EditionOctober 25, 2012 IBM What's next? The Liberty Profile in the CICS 5.1  Running Liberty within a JVM Server brings Servlets in CICS with just a few more Options within the profile file zFS zOS App App App CICS Liberty JVM server Use CICS Resources Enable
  66. 66. © 2012 IBM Corporation CICS and Java 70 Java and OSGi Developer EditionOctober 25, 2012 IBM How does Liberty within CICS work Liberty Code was NOT changed, just extended via extension Points JVM task T8 TCB Worker thread attach change-mode attachCurrentThread LE enclave CICS Task Same Task Context JDBC Link to COBOL Etc. Liberty – Web Feature (CICS)ExecutorService.execute (Runnable) HttpListener Thread Dispatcher (task generator) XMATURIMAP JVM task T8 TCB Worker thread attach change-mode attachCurrentThread LE enclave CICS Task Same Task Context JDBC Link to COBOL Etc. Liberty – Web Feature (CICS)ExecutorService.execute (Runnable) HttpListener Thread Dispatcher (task generator) XMATURIMAP
  67. 67. © 2012 IBM Corporation CICS and Java 71 IBM Confidential IBM Why implement it like that? - Benefits of Hybrid Threads  Each 'Invocation' (think Servlet Request) on a Hybrid Thread is also a CICS Transaction (Has a Tranid, Task Context etc).  This gives you »A single common Transaction (UOW) and CICS Managed JDBC »Which can cross between Java and Cobol »Full JCICS API Access »In particular, LINK and access to VSAM »WLM (CICS WLM, Performance Classes etc). »Monitoring / Statistics »CICS Transaction Tracking / Association Data
  68. 68. © 2012 IBM Corporation CICS and Java IBM Vision for Applications, Platforms and Policies "Hey Simon, I need to test my new version of the payroll application." "Sure Abigail, you should get the latest payroll test platform from the repository, I'll send you a link." "Thanks, I'll deploy my app onto that platform on the development plex later today." "That should be fine, just check with Oliver that the policies on the plex are going to be OK for your app's changes." FASTERFASTER SIMPLERSIMPLER
  69. 69. © 2012 IBM Corporation CICS and Java IBM First-class applications A collection of one or more CICS bundles Life-cycle as a single entity Measure and control resource usage Develop in Eclipse/Rational Share and promote through SCM Application Name - org.maw.banking.Loans Version - 1.2.1 Resources - LIBRARY, PROGRAM, TRANSACTION, URIMAP - (EVENTBINDING, OSGIBUNDLE, …) Dependencies - DB2CONNECTION, JVMSERVER, TCPIPSERVICE, … Entry points - operation: browse, update, … - resource: PROGRAM Application Lifecycle INSTALL ENABLE DISABLE DISCARD
  70. 70. © 2012 IBM Corporation CICS and Java IBM First-class platforms Set of one or more region types Life-cycle as a single entity Hides complexity of underlying topology Provides services for Applications Control Applications through Policy Platform Region Type Region Type Region Type Platform Lifecycle
  71. 71. © 2012 IBM Corporation CICS and Java 75 Java and OSGi Developer EditionOctober 25, 2012 IBM If we have time: What does a programmer in a new language first? The “Hello World” IVT :)  We will: –Create a new Eclipse Project • Code a hello world program that prints out something on the terminal –Create the CICS bundling for this class: • Create an CICS Bundle Project • Create a OSGi Bundle include for that –Define the CSD resources for that bundle: • Define a JVMServer definition (already installed) • Define a CICS Bundle and install those. Can be checked with CEMT INQ BUNDLE(*) or the CICS Explorer –Define the resources to call the class within the bundle: • Define a program that points to the class • Define a transaction that calls the previous defined Program –Test the Transaction –If there is still time and interest: • Debug the program with eclipse
  72. 72. © 2012 IBM Corporation CICS and Java 76 Java and OSGi Developer EditionOctober 25, 2012 IBM Questions? Please provide Feedback :) Tobias Leicher Client Technical Professional – CICS & CICS Tools IBM-Allee 1 D-71139 Ehningen Mobil: 0151 – 15 16 24 89 Mail: tobias.leicher@de.ibm.com Foto

×