cics and java - within business critical mainframe environments - tobias leicher
TRANSCRIPT
© 2012 IBM Corporation
IBM
CICS and Java OSGi within business critical mainframe environments
Java and OSGi Developer Edition
Tobias Leicher, Technical Specialist for CICS
© 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 ServerExternal Systems
Java Modul
Modernisation
Target Architecture?
© 2012 IBM Corporation
CICS and Java
3 Java and OSGi Developer EditionOctober 25, 2012
IBMA Java Anology
© 2012 IBM Corporation
CICS and Java
4 Java and OSGi Developer EditionOctober 25, 2012
IBMAgenda
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
© 2012 IBM Corporation
CICS and Java
5 Java and OSGi Developer EditionOctober 25, 2012
IBMAgenda
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
© 2012 IBM Corporation
CICS and Java
6 Java and OSGi Developer EditionOctober 25, 2012
IBMIBM 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
© 2012 IBM Corporation
CICS and Java
7 Java and OSGi Developer EditionOctober 25, 2012
IBMBatch vs. Online
Batch job
Online transaction
InputData
Applicationprogram
Process data to perform a particular task
OutputData
Applicationprogram
Accesses shared Data onbehalf of an online user
Query
Reply
© 2012 IBM Corporation
CICS and Java
8 Java and OSGi Developer EditionOctober 25, 2012
IBMBusiness Application Requirements
Communications Database Manager
Operating System
Hardware
CICSApplication Server
NamingLockingAdministrationException HandlingRecoveryPerformance
End-to-End Integrity
MultithreadingLogging
SchedulingSecurity
ConnectivityQueue Management
Time Control
ApplicationBusiness Logic
© 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…
© 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
© 2012 IBM Corporation
CICS and Java
11 Java and OSGi Developer EditionOctober 25, 2012
IBMTransactions & Tasks
SELECT
TYPE: 564-89712-0
QUERY UPDATE
EGUI
Task 1
Task 3
Task 2
EGUI Program DFH0XGUI
ECFG Program DFH0XCFG
Resource Definitions
© 2012 IBM Corporation
CICS and Java
12 Java and OSGi Developer EditionOctober 25, 2012
IBMTransaction 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
© 2012 IBM Corporation
CICS and Java
13 Java and OSGi Developer EditionOctober 25, 2012
IBMCommunication 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
© 2012 IBM Corporation
CICS and Java
14 Java and OSGi Developer EditionOctober 25, 2012
IBMTask 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
© 2012 IBM Corporation
CICS and Java
15 Java and OSGi Developer EditionOctober 25, 2012
IBMProgram 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
© 2012 IBM Corporation
CICS and Java
16 Java and OSGi Developer EditionOctober 25, 2012
IBMUser 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
© 2012 IBM Corporation
CICS and Java
17 Java and OSGi Developer EditionOctober 25, 2012
IBMMessage 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
© 2012 IBM Corporation
CICS and Java
18 Java and OSGi Developer EditionOctober 25, 2012
IBMFile 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
© 2012 IBM Corporation
CICS and Java
19 Java and OSGi Developer EditionOctober 25, 2012
IBMExternal 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
WMQData Base
VSAM Data Set
Load Library
© 2012 IBM Corporation
CICS and Java
20 Java and OSGi Developer EditionOctober 25, 2012
IBMRecovery 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
WMQData Base
VSAM Data Set
Load Library
Log Stream
Log stream (MVS Logger) used to store recovery information
© 2012 IBM Corporation
CICS and Java
21 Java and OSGi Developer EditionOctober 25, 2012
IBMQueues
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
© 2012 IBM Corporation
CICS and Java
22 Java and OSGi Developer EditionOctober 25, 2012
IBMTrace
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
© 2012 IBM Corporation
CICS and Java
23 Java and OSGi Developer EditionOctober 25, 2012
IBMDumps
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
© 2012 IBM Corporation
CICS and Java
24 Java and OSGi Developer EditionOctober 25, 2012
IBMMessage 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
© 2012 IBM Corporation
CICS and Java
25 Java and OSGi Developer EditionOctober 25, 2012
IBMEnding the Transaction
SELECT
TYPE: 564-89712-0
QUERY UPDATE
EGUI Comms Services
Task Control
Task Control
Area
Working storage
Other task related storage
© 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
© 2012 IBM Corporation
CICS and Java
28 Java and OSGi Developer EditionOctober 25, 2012
IBMJava 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
© 2012 IBM Corporation
CICS and Java
29 Java and OSGi Developer EditionOctober 25, 2012
IBMIBM J9 2.6 Technology Enhancements: System zEnterprise 196 and Java6.0.1/Java7
© 2012 IBM Corporation
CICS and Java
30 Java and OSGi Developer EditionOctober 25, 2012
IBMz Hardware: Java as a Workload Optimized System
© 2012 IBM Corporation
CICS and Java
31 Java and OSGi Developer EditionOctober 25, 2012
IBMJava 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
© 2012 IBM Corporation
CICS and Java
32 Java and OSGi Developer EditionOctober 25, 2012
IBMThe 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
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
..
…
ClassNot
FoundException
BeginBeginHereHere
© 2012 IBM Corporation
CICS and Java
33 Java and OSGi Developer EditionOctober 25, 2012
IBMDependencies 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!
© 2012 IBM Corporation
CICS and Java
34 Java and OSGi Developer EditionOctober 25, 2012
IBMAgenda
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
© 2012 IBM Corporation
CICS and Java
35 Java and OSGi Developer EditionOctober 25, 2012
IBMOSGi – 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?
© 2012 IBM Corporation
CICS and Java
36 Java and OSGi Developer EditionOctober 25, 2012
IBMWhat 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
© 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
© 2012 IBM Corporation
CICS and Java
38 Java and OSGi Developer EditionOctober 25, 2012
IBMOSGi bundles
JAR fileManifest.mf
+ entries =OSGi bundle
(JAR file)+
Manifest-Version: 1.0Bundle-ManifestVersion: 2Bundle-Name: Hello Plug-inBundle-SymbolicName: com.ibm.cics.server.examples.helloBundle-Version: 1.0.0Bundle-RequiredExecutionEnvironment: J2SE-1.4, J2SE-1.5, JavaSE-1.6Import-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?
© 2012 IBM Corporation
CICS and Java
39 Java and OSGi Developer EditionOctober 25, 2012
IBMOSGi Class Loader Model
Bundle AImport-Package: package.b
Package.cExport-Package: package.a
package.a
Bundle BExport-Package: package.b
package.b
Bundle CExport-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
© 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 Jv 2.0
Class K
Library XLibrary Z
v 1.2
Class Jv 1.0
Library Zv 1.5Library Y
© 2012 IBM Corporation
CICS and Java
41 Java and OSGi Developer EditionOctober 25, 2012
IBMBundle-Lifecycle
Installed
Resolved
Starting
Active
StoppingUninstalled
install
resolverefreshupdate start
uninstall
uninstall
stop
refreshupdate
Policy: eager/lazy
© 2012 IBM Corporation
CICS and Java
42 Java and OSGi Developer EditionOctober 25, 2012
IBMOSGI 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
© 2012 IBM Corporation
CICS and Java
46 Java and OSGi Developer EditionOctober 25, 2012
IBMSmall Quiz
○ Small Quiz: ♦ Why is the JCICS package numbered with: 1.0.0, 1.100.0, 1.201.0 and 1.300.0?
© 2012 IBM Corporation
CICS and Java
47 Java and OSGi Developer EditionOctober 25, 2012
IBMSome 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
© 2012 IBM Corporation
CICS and Java
48 Java and OSGi Developer EditionOctober 25, 2012
IBMAgenda
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
© 2012 IBM Corporation
CICS and Java
49 Java and OSGi Developer EditionOctober 25, 2012
IBMFlashback: CICS Pooled Server Architecture
© 2012 IBM Corporation
CICS and Java
50 Java and OSGi Developer EditionOctober 25, 2012
IBM
CICS zFS
SIT
RDO
USSDirectory
with ClassFiles
ProgramTransaktion
JVMJVMJVMJVM JVM
Flashback II: Old pooled Architecture
Profile
© 2012 IBM Corporation
CICS and Java
51 Java and OSGi Developer EditionOctober 25, 2012
IBMThe JVM Server
© 2012 IBM Corporation
CICS and Java
52 Java and OSGi Developer EditionOctober 25, 2012
IBMJVM 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
JVMLE enclave
CICSTask PThread
JVMthread
CICSTask PThread
JVMthread
CICSTask PThread
JVMthread
Heap &Classes
© 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
© 2012 IBM Corporation
CICS and Java
54 Java and OSGi Developer EditionOctober 25, 2012
IBMHow 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.0Bundle-ManifestVersion: 2Bundle-Name: Hello Plug-inBundle-SymbolicName: com.ibm.cics.server.examples.helloBundle-Version: 1.0.0Bundle-RequiredExecutionEnvironment: J2SE-1.4,J2SE-1.5,JavaSE-1.6Import-Package: com.ibm.cics.server;version="[0.0.0,2.0.0)"CICS-MainClass: examples.hello.HelloCICSWorld,
examples.hello.HelloWorld
© 2012 IBM Corporation
CICS and Java
55 Java and OSGi Developer EditionOctober 25, 2012
IBMOSGi bundles within CICS
JAR fileManifest.mf
+ entries =OSGi bundle
(JAR file)+
Manifest-Version: 1.0Bundle-ManifestVersion: 2Bundle-Name: Hello Plug-inBundle-SymbolicName: com.ibm.cics.server.examples.helloBundle-Version: 1.0.0Bundle-RequiredExecutionEnvironment: J2SE-1.4, J2SE-1.5, JavaSE-1.6Import-Package: com.ibm.cics.server;version="[0.0.0,2.0.0)“Export-Package: examples.helloCICS-MainClass: examples.hello.HelloCICSWorld, examples.hello.HelloWorld
Most Parts of the descriptor are the same, except the CICS-MainClass:
CICS needs to know, which Classcan 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!
© 2012 IBM Corporation
CICS and Java
56 Java and OSGi Developer EditionOctober 25, 2012
IBMHow 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
DailyBusiness
FTP
CICS
Manually defineResources
Check In
Build
Distribute
Define Resources
© 2012 IBM Corporation
CICS and Java
57 Java and OSGi Developer EditionOctober 25, 2012
IBMAgenda
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
© 2012 IBM Corporation
CICS and Java
58 Java and OSGi Developer EditionOctober 25, 2012
IBMWhich 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
© 2012 IBM Corporation
CICS and Java
59 Java and OSGi Developer EditionOctober 25, 2012
IBMThe application needs to be designed within a Framework
Java Framework
Service Control Layer
Business Service Layer
Data Access LayerConnMgr
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
© 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)
© 2012 IBM Corporation
CICS and Java
61 Java and OSGi Developer EditionOctober 25, 2012
IBM
Batch Address Space
JVM
COBOL
Java
Fram
ework
Batch Job Step
Business Service
Data Service
Batch Container
BatchDataStream
CheckpointAlgorithm
JNI
Batch Architecture
© 2012 IBM Corporation
CICS and Java
62 Java and OSGi Developer EditionOctober 25, 2012
IBMBatch Architecture in more detail
Batch Job Step
Business Service
Batch Container
BatchDataStream
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
CheckpointAlgorithm
feed
init
© 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)
Java
Fra
mew
ork
Online and Batch Architecture together
BDS
CA
© 2012 IBM Corporation
CICS and Java
64 Java and OSGi Developer EditionOctober 25, 2012
IBMAgenda
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
© 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 ServerExternal Systems
Java Modul
Modernisation
© 2012 IBM Corporation
CICS and Java
66 Java and OSGi Developer EditionOctober 25, 2012
IBMBeispiel: Nutzung eines internen Web Services
AIX
AIX
User
Web Anwendung
Web Service
SOAP/HTTP
zOS
CICS
Secure Data
BusinessTransaction
CTG
JDBC
SOAP/HTTP
© 2012 IBM Corporation
CICS and Java
67 Java and OSGi Developer EditionOctober 25, 2012
IBMVerbesserung durch doppel-Deployment
AIX
AIX
User
Web Anwendung
Web Service
SOAP/HTTP
zOS
CICS
Secure Data
BusinessTransaction
CTG
JDBC
CICS Link
Web Service
JDBC
© 2012 IBM Corporation
CICS and Java
68 Java and OSGi Developer EditionOctober 25, 2012
IBMDie 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
© 2012 IBM Corporation
CICS and Java
69 Java and OSGi Developer EditionOctober 25, 2012
IBMWhat's next? The Liberty Profile in the CICS 5.1
Running Liberty within a JVM Server bringsServlets in CICS with just a few more Optionswithin the profile file
zFS
zOS
AppApp
App
CICS
Liberty
JVM server
Use
CICSResources
Ena
ble
© 2012 IBM Corporation
CICS and Java
70 Java and OSGi Developer EditionOctober 25, 2012
IBMHow 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
TaskSame Task Context
JDBCLink to COBOLEtc.
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
TaskSame Task Context
JDBCLink to COBOLEtc.
Liberty – Web Feature
(CICS)ExecutorService.execute(Runnable)
HttpListener
Thread Dispatcher(task generator)
XMATURIMAP
© 2012 IBM Corporation
CICS and Java
71 IBM Confidential
IBMWhy 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
© 2012 IBM Corporation
CICS and Java IBMVision 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
© 2012 IBM Corporation
CICS and Java IBM
First-class applications
A collection of one or more CICS bundlesLife-cycle as a single entityMeasure and control resource usageDevelop in Eclipse/RationalShare and promote through SCM
ApplicationName
- org.maw.banking.LoansVersion
- 1.2.1Resources - LIBRARY, PROGRAM, TRANSACTION, URIMAP - (EVENTBINDING, OSGIBUNDLE, …)Dependencies - DB2CONNECTION, JVMSERVER, TCPIPSERVICE, …Entry points - operation: browse, update, … - resource: PROGRAM
Application LifecycleINSTALLENABLEDISABLEDISCARD
© 2012 IBM Corporation
CICS and Java IBM
First-class platforms
Set of one or more region typesLife-cycle as a single entityHides complexity of underlying topologyProvides services for ApplicationsControl Applications through Policy
Platform
Region Type
Region Type
Region Type
Platform Lifecycle
© 2012 IBM Corporation
CICS and Java
75 Java and OSGi Developer EditionOctober 25, 2012
IBMIf 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
© 2012 IBM Corporation
CICS and Java
76 Java and OSGi Developer EditionOctober 25, 2012
IBMQuestions?
Please provide Feedback :)
Tobias Leicher
Client Technical Professional
– CICS & CICS Tools
IBM-Allee 1D-71139 Ehningen
Mobil: 0151 – 15 16 24 89Mail: [email protected]
Foto