SlideShare a Scribd company logo
© 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 Server
External Systems
Java Modul
Modernisation
Target Architecture?
© 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, 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
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
© 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
© 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
© 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
© 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
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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
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
© 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
© 2012 IBM Corporation
CICS and Java
30 Java and OSGi Developer EditionOctober 25, 2012
IBM
z Hardware: Java as a Workload Optimized System
© 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
© 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
© 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!
© 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
© 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?
© 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
© 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
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?
© 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
© 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
© 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
© 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
© 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?
© 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
© 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
© 2012 IBM Corporation
CICS and Java
49 Java and OSGi Developer EditionOctober 25, 2012
IBM
Flashback: CICS Pooled Server Architecture
© 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
© 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 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
© 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
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
© 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!
© 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
© 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
© 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
© 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
© 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
JavaFramework
Batch Job Step
Business Service
Data Service
Batch Container
BatchData
Stream
Checkpoint
Algorithm
JNI
Batch Architecture
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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

More Related Content

What's hot (20)

DOC
DB2 utilities
Udayakumar Suseendran
 
PPTX
ITSM-ISMS
AnhPT8320
 
PPT
Db2
yboren
 
PPTX
The Top Outages of 2022: Analysis and Takeaways
ThousandEyes
 
PPTX
사업소개) 데이터 거버넌스
wiseitech
 
PDF
DB2 Systems Programming Tools of the Trade NA07B03
Linda Hagedorn
 
PDF
Jcl
shivas
 
PDF
DFARS CMMC SPRS NIST 800-171 Explainer.pdf
ControlCase
 
PPTX
Ibm db2
aditi212
 
PPTX
Skillwise JCL
Skillwise Group
 
PPT
O Mundo Do Mainframe
lui_fp
 
PDF
Best practices for DB2 for z/OS log based recovery
Florence Dubois
 
PDF
Xdc command-to-print-job-output-and-syslog-from-sdsf
Maintec Technologies Inc.
 
PDF
Db2 and storage management (mullins)
Craig Mullins
 
PPT
CICS basics overview session-1
Srinimf-Slides
 
PPT
XFS.ppt
DmitryIg
 
PDF
AWS 기반 블록체인 (2부) - 블록체인 서비스 개발하기 (김준형 & 박천구, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Amazon Web Services Korea
 
PDF
Mainframe IPL Process.pdf
ssuseraa0df4
 
PPTX
All you wanted to know about iso 27000
Ramana K V
 
PDF
Cybersecurity roadmap : Global healthcare security architecture
Priyanka Aash
 
DB2 utilities
Udayakumar Suseendran
 
ITSM-ISMS
AnhPT8320
 
Db2
yboren
 
The Top Outages of 2022: Analysis and Takeaways
ThousandEyes
 
사업소개) 데이터 거버넌스
wiseitech
 
DB2 Systems Programming Tools of the Trade NA07B03
Linda Hagedorn
 
Jcl
shivas
 
DFARS CMMC SPRS NIST 800-171 Explainer.pdf
ControlCase
 
Ibm db2
aditi212
 
Skillwise JCL
Skillwise Group
 
O Mundo Do Mainframe
lui_fp
 
Best practices for DB2 for z/OS log based recovery
Florence Dubois
 
Xdc command-to-print-job-output-and-syslog-from-sdsf
Maintec Technologies Inc.
 
Db2 and storage management (mullins)
Craig Mullins
 
CICS basics overview session-1
Srinimf-Slides
 
XFS.ppt
DmitryIg
 
AWS 기반 블록체인 (2부) - 블록체인 서비스 개발하기 (김준형 & 박천구, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Amazon Web Services Korea
 
Mainframe IPL Process.pdf
ssuseraa0df4
 
All you wanted to know about iso 27000
Ramana K V
 
Cybersecurity roadmap : Global healthcare security architecture
Priyanka Aash
 

Similar to CICS and Java - Within Business Critical Mainframe Environments - Tobias Leicher (20)

PDF
CICS TS V4 and V5 recap, and the new V5.3 open beta
Mark Cocker
 
PDF
Cics ts v4 and v5 recap, and the new cics ts v5.3 open beta (1)
nick_garrod
 
PDF
Cics ts v5.4 continuous delivery and v5.5 what's new
Mark Cocker
 
ODP
IBM Impact session CICS & java a tale of liberty
nick_garrod
 
PPTX
Session 6638 - The One-Day CICS Transaction Server Upgrade: Migration Conside...
nick_garrod
 
PDF
CICS TS for z/VSE Update including CICS connectivity options
IBM
 
PPT
Cics Explorer April 2009
CICS ROADSHOW
 
ODP
2829 liberty
nick_garrod
 
PDF
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
Jeff Pearce
 
PPTX
Skillwise cics part 1
Skillwise Group
 
PPT
IBM Impact session CICS V52 overview
nick_garrod
 
PDF
Introduction to the IBM AS/400
tvlooy
 
PDF
CICS TS V5 Technical Overview
SAFowlkes
 
PPT
SDNSADNASDSANDSJADNJSADNJSADNSASASASAD SAD AS DSASASDSS
solomonrajuRD
 
PPTX
2802 cics @ interconnect v2.0 CICS Opening
nick_garrod
 
PPT
Share 2014 Pittsburgh CICS Technical Overview
nick_garrod
 
PPT
Cics Integration Approaches
nag.g
 
ODP
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
nick_garrod
 
PDF
Powering the digital economy with CICS and z/OS connect - at the "z Systems...
DevOps for Enterprise Systems
 
PPT
Java on z overview 20161107
Marcel Mitran
 
CICS TS V4 and V5 recap, and the new V5.3 open beta
Mark Cocker
 
Cics ts v4 and v5 recap, and the new cics ts v5.3 open beta (1)
nick_garrod
 
Cics ts v5.4 continuous delivery and v5.5 what's new
Mark Cocker
 
IBM Impact session CICS & java a tale of liberty
nick_garrod
 
Session 6638 - The One-Day CICS Transaction Server Upgrade: Migration Conside...
nick_garrod
 
CICS TS for z/VSE Update including CICS connectivity options
IBM
 
Cics Explorer April 2009
CICS ROADSHOW
 
2829 liberty
nick_garrod
 
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
Jeff Pearce
 
Skillwise cics part 1
Skillwise Group
 
IBM Impact session CICS V52 overview
nick_garrod
 
Introduction to the IBM AS/400
tvlooy
 
CICS TS V5 Technical Overview
SAFowlkes
 
SDNSADNASDSANDSJADNJSADNJSADNSASASASAD SAD AS DSASASDSS
solomonrajuRD
 
2802 cics @ interconnect v2.0 CICS Opening
nick_garrod
 
Share 2014 Pittsburgh CICS Technical Overview
nick_garrod
 
Cics Integration Approaches
nag.g
 
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
nick_garrod
 
Powering the digital economy with CICS and z/OS connect - at the "z Systems...
DevOps for Enterprise Systems
 
Java on z overview 20161107
Marcel Mitran
 
Ad

More from mfrancis (20)

PDF
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis
 
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
PDF
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis
 
PDF
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis
 
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
PDF
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis
 
PDF
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
PDF
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
PDF
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis
 
PDF
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
PDF
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis
 
PDF
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis
 
PDF
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis
 
PDF
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis
 
PDF
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis
 
PDF
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis
 
PDF
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 
PDF
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis
 
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis
 
Ad

Recently uploaded (20)

PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
July Patch Tuesday
Ivanti
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Python basic programing language for automation
DanialHabibi2
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 

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

  • 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. © 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. © 2012 IBM Corporation CICS and Java 3 Java and OSGi Developer EditionOctober 25, 2012 IBM A Java Anology
  • 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 2012 IBM Corporation CICS and Java 30 Java and OSGi Developer EditionOctober 25, 2012 IBM z Hardware: Java as a Workload Optimized System
  • 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 2012 IBM Corporation CICS and Java 49 Java and OSGi Developer EditionOctober 25, 2012 IBM Flashback: CICS Pooled Server Architecture
  • 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. © 2012 IBM Corporation CICS and Java 51 Java and OSGi Developer EditionOctober 25, 2012 IBM The JVM Server
  • 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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. © 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: [email protected] Foto