SlideShare a Scribd company logo
1 of 43
CICS Java – Beauty and the Beast
Ian Burnett
CICS - S109
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
• The information contained in this publication is provided for informational purposes only. While efforts were made to verify the
completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind,
express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change
by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this
publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any
warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license
agreement governing the use of IBM software.
• References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in
which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole
discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature
availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any
activities undertaken by you will result in any specific sales, revenue growth or other results.
• Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual
throughput or performance that any user will experience will vary depending upon many factors, including considerations such as
the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload
processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
• IBM, the IBM logo, and WebSphere are trademarks of International Business Machines Corporation in the United States, other
countries, or both.
• Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Legal Disclaimer
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Agenda
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Java: An Overview
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
A Brief History of Programming Languages
FORTRAN
COBOL
PL/I
C
C++
Oak Java
Smalltalk
Lisp
ALGOL
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
What is Java and what makes it different?
Java is What makes Java different
 Java is NOT compiled to executable code, it is
compiled to bytecode that runs in a virtual machine
 The virtual machine uses the just-in-time compiler
(JIT) to execute the code
 Java is not based on programs, it is based on classes
 Java uses a garbage collector, that removes unused
objects from the storage
 Java development is often based on existing
programming patterns (Design Patterns)
 Encourages loose coupling between components
 Most of the build in funtionality of Java is based of
class libraries, that are build in the Java Runtime
(JRE)
 Java contains a library for user interface development
 Java has the ability to reflect about the runtime with
several methods
 Java has type-safe variable declaration
 Uses JNI for native system calls and JDBC for
database calls
Java is
 Object-oriented
 Platform-independent
 Broadly-supported and prevalent
 A state-of-the-art language
 [and an island in Indonesia]
 Something YOU should care about
Java is not
 Something new and unreliable
 An error-prone language
 The only solution for good code
 Independent on its own
 Something that only the distributed world should
care about
 Easy to write or fully-performant out of the box
 A composable workbox full of libraries
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Traditional Applications
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Executing a COBOL Program in CICS
• Load the program into storage from DASD
• Initialise a new Language Environment enclave
o ... ?
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Language Environment (LE)
• Prior to LE, all languages brought their own runtime
libraries
• Why now LE?
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Executing a COBOL Program in CICS
• Load the program into storage from DASD
• Initialise a new Language Environment enclave
• Control is given to the application code
• Once the application ends it 'returns' to LE
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Enclave Structure Within CICS
= CICS Region
= CICS initial transaction
= Main Transaction Program
or EC LINKed Program
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Storage in LE
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Dispatching a Program in CICS
CICSA/S
z/OS
Dispatcher
WEB WEB WEB WEB
Global
SRB
TCB
ASCB
TCB
OTE
TCB
OTE
WEB
TCB
QR
CICS
Dispatcher
DFHSIP
LE Enclave
Application code
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Anatomy of a Java Application
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
jar file
Java package
Java packaging and hierarchy
• Classes contain data and logic
• Packages contain these classes
and organize them
• Jar files contain the classes and
are the base for applications and
libraries
• At the runtime, there are just a lot
of classes on a classpath
Java package
class files
Java package
class files
class files
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
The Java Virtual Machine
• Java Virtual Machine (JVM)
• Run time data management is performed by the JVM
• The JVM will only stop if the last non-daemon thread
finishes
• Platform-independence means that:
o Java is never compiled to machine instructions upfront
o Everything in Java is abstracted (including data types)
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Java Runtime
JVM
OS and Hardware
Nativecode
Runtime Libraries
Java Application
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Bytecode and the JIT Compiler
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Java Bytecode
• Developer writes application in Java
• Compiler converts to bytecode
• Bytecode is stored in jar files on disk
• JVM loads bytecode from disk
• ... ?
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Loading a Java Class
• Loading
• Linking
o Verifying
o Preparing
o Resolving
• Initialising
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Classpath and OSGi
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
Begin
Here
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Comparing Java and bytecode
public int sum(int a,
int b)
{
int result = 0;
result = a + b;
return result;
}
public int sum(int,
int);
Code:
0: iconst_0
1: istore_3
2: iload_1
3: iload_2
4: iadd
5: istore_3
6: iload_3
7: ireturn
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Executing Bytecode
• The JVM constructs for each Thread an execution
engine
• In this engine the application now needs to be
executed
• Interpreting bytecode is slow
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Just In Time Compiler (JIT)
Java Application
JVM
JIT
Compiler
J9
Interpreter
OS and Hardware
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
JIT Operation
• Sampling process
• Multiple levels of optimisation
• Transparent to application and to CICS region
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Java on z/OS
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Differences on z/OS
IBM JDK for z/OS
Standard JSE
(JDK specification)
z/OS
Extensions
Just In Time Compiler (JIT)
Exploitation of the Hardware Architecture
z/OS Operating System
and System z Hardware
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
An LE Enclave With Java
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Recap: Dispatching a Program in CICS
CICSA/S
z/OS
Dispatcher
WEB WEB WEB WEB
Global
SRB
TCB
ASCB
TCB
OTE
TCB
OTE
WEB
TCB
QR
CICS
Dispatcher
DFHSIP
LE Enclave
Application code
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Dispatching a Java Program in CICS
CICSA/S
z/OS
Dispatcher
WEB WEB WEB WEB
Global
SRB
TCB
ASCB
T8 TCB T8 TCB
Enclave
WEB
TCB
QR
CICS
Dispatcher
DFHSIP
LE Enclave
Application code
pthread
pthread
GC
JIT
JVM server
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Garbage Collection
• All memory management is responsibility of JVM
• Periodically performs garbage collection
o Many approaches
o Recommend using -Xgcpolicy:gencon for OLTP
• New objects created in the nursery area
• As objects age they are moved to the tenured area
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Shared Classes
• Faster JVM start
• Faster application start
• Reduced memory consumption for multiple JVMs
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Compressed References
• -Xcompressedrefs
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Comparing COBOL and Java
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Comparing COBOL to Java
Develop a COBOL program
 Cobol does not know complex data types or objects
 Data elements are usually shared, not hidden
 The compile is performed done after coding (no
online syntax checking)
 Compiler performs fewer static tests
 Debugging is performed in multiuser environments
 Pointers to storage locations
Runtime Behaviour of Cobol
 LE does not check whether the loaded program is
corrupt
 The runtime can not check whether the data is
assigned correctly and Problems can arise
 Handlers get control if something went wrong
 Memory is defined upfront
Develop a Java program
 Data is structured in complex objects
 Variables are not shared, they are addressed by
methods of the object
 Compiles are executed every time a class is saved
(while ongoing syntax check is performed)
 Compiler performs a lot of static testing
 Debugging is usually performed locally
 Memory can NEVER be addressed directly
Runtime Behaviour of Java
 The JVM checks the bytecode after loading the
class
 Classes are checked during compilation and in
runtime data is only assigned if types match
 Classes and methods can throw exceptions if a
problem occurs
 New objects can be generated dynamically
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Updating Programs – COBOL and Java
Update a COBOL Program in CICS
 COBOL program is compiled/linked into a PDSe that
is concatenated into the RPL upfront of the existing
load library or to replace the existing version
 In CICS issue a NEWCOPY or PHASEIN to let CICS
reload the program from the dataset
 Use the new program
Update a Java Program in CICS
 In Java you can't replace runtime code
 Frameworks like OSGi enables the exchange of
bundles
 You need to decouple the application design (using
micro services in OSGi or accept a small outage
Problems with this Approach
 Compatibility is a contract that is not checked until
runtime
 The connection is something the compiler is not
aware of
Problems with this Approach
 The simple PHASEIN or NEWCOPY is not possible
 A complex build infrastructure is necessary
 Only bundles/services, not classes can be “phased
in”
 A change in application development architecture is
necessary
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Specialty Engines
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
zAAP
• IBM System z Application Assist Processor
• Provides dedicated environment for execution of Java
workloads and parsing of XML
• Available on:
o zEnterprise EC12 / BC12
o zEnterprise 196 / 114
o System z10
o System z9
• Superseded by zIIP on IBM z13
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
zIIP
• IBM System z Integrated Information Processor
• Many IBM products exploit zIIP engines
• No IBM software charges on zAAP / zIIP capacity
• Available on all System z machines since System z9
• From z/OS 1.11: zAAP-on-zIIP
• Specialty engines always run full speed
o Even on subcapacity machines
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Moving Eligible Work to a zIIP
Eligible
work
Eligible
work
Eligible
work
Eligible
work
Eligible
work
Eligible
work
GCP zIIPGCP
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Specialty Engines and the z/OS Dispatcher
GCP zAAP
CICS
Start Java application
JVM
Mark as zAAP-eligible
z/OS Dispatcher
Suspend TCB on GCP
z/OS Dispatcher
Dispatch TCB on zAAP
JVM
Execution of byte code
JVM
Mark as zAAP-ineligible
z/OS Dispatcher
Suspend TCB on zAAP
z/OS Dispatcher
Dispatch TCB on GCP
JVM
Return to CICS
CICS
Subsystem code
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109
Questions?
© 2015 IBM CorporationCICS Java – Beauty and the Beast – S109

More Related Content

What's hot

Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
mfrancis
 
Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2
roialdaag
 
Pervasive content management
Pervasive content managementPervasive content management
Pervasive content management
Alfresco Software
 
Adobe Flex体系架构深度剖析
Adobe Flex体系架构深度剖析Adobe Flex体系架构深度剖析
Adobe Flex体系架构深度剖析
George Ang
 
[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版
[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版
[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版
gavin shaw
 
Klm AirFrance deployment automation customer case
Klm AirFrance deployment automation   customer caseKlm AirFrance deployment automation   customer case
Klm AirFrance deployment automation customer case
XebiaLabs
 

What's hot (20)

A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...
 
Chicago JUG / GOTO Meetup
Chicago JUG / GOTO MeetupChicago JUG / GOTO Meetup
Chicago JUG / GOTO Meetup
 
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
 
IBM Impact Session 2351 hybrid apps
IBM Impact Session 2351 hybrid appsIBM Impact Session 2351 hybrid apps
IBM Impact Session 2351 hybrid apps
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
 
Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
 
Pervasive content management
Pervasive content managementPervasive content management
Pervasive content management
 
Continuous Deployment & Delivery + Culture Hacks @ QCON 2012
Continuous Deployment & Delivery + Culture Hacks @ QCON 2012Continuous Deployment & Delivery + Culture Hacks @ QCON 2012
Continuous Deployment & Delivery + Culture Hacks @ QCON 2012
 
Adobe Flex体系架构深度剖析
Adobe Flex体系架构深度剖析Adobe Flex体系架构深度剖析
Adobe Flex体系架构深度剖析
 
Virtualization aware Java VM
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VM
 
The Introduction of Ruby x Agile
The Introduction of Ruby x AgileThe Introduction of Ruby x Agile
The Introduction of Ruby x Agile
 
[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版
[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版
[MySQL.Cookbook(第2版)].(美)迪布瓦.中文版.扫描版
 
Akamai 如何幫您的客戶用網站賺錢 how to monetize your site
Akamai 如何幫您的客戶用網站賺錢 how to monetize your siteAkamai 如何幫您的客戶用網站賺錢 how to monetize your site
Akamai 如何幫您的客戶用網站賺錢 how to monetize your site
 
Klm AirFrance deployment automation customer case
Klm AirFrance deployment automation   customer caseKlm AirFrance deployment automation   customer case
Klm AirFrance deployment automation customer case
 
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
 
[Python参考手册(第4版)].(美)比兹利.扫描版
[Python参考手册(第4版)].(美)比兹利.扫描版[Python参考手册(第4版)].(美)比兹利.扫描版
[Python参考手册(第4版)].(美)比兹利.扫描版
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source Software
 
10 reasons why Nuxeo is using GlassFish
10 reasons why Nuxeo is using GlassFish10 reasons why Nuxeo is using GlassFish
10 reasons why Nuxeo is using GlassFish
 

Viewers also liked

Ensayodecortedirecto 130826121403-phpapp01-1
Ensayodecortedirecto 130826121403-phpapp01-1Ensayodecortedirecto 130826121403-phpapp01-1
Ensayodecortedirecto 130826121403-phpapp01-1
Yordi Dipas Ganboa
 
Oumh1303 20130712 155801
Oumh1303 20130712 155801Oumh1303 20130712 155801
Oumh1303 20130712 155801
kuok kuoklin
 

Viewers also liked (20)

S104 twist and cloud
S104 twist and cloudS104 twist and cloud
S104 twist and cloud
 
Cics ts v4 and v5 recap, and the new cics ts v5.3 open beta (1)
Cics ts v4 and v5 recap, and the new cics ts v5.3 open beta (1)Cics ts v4 and v5 recap, and the new cics ts v5.3 open beta (1)
Cics ts v4 and v5 recap, and the new cics ts v5.3 open beta (1)
 
Ensayodecortedirecto 130826121403-phpapp01-1
Ensayodecortedirecto 130826121403-phpapp01-1Ensayodecortedirecto 130826121403-phpapp01-1
Ensayodecortedirecto 130826121403-phpapp01-1
 
SHARE 2014 Pittsburgh, Managing multi version applications in cics
SHARE 2014 Pittsburgh, Managing multi version applications in cicsSHARE 2014 Pittsburgh, Managing multi version applications in cics
SHARE 2014 Pittsburgh, Managing multi version applications in cics
 
Scala.js - yet another what..?
Scala.js - yet another what..?Scala.js - yet another what..?
Scala.js - yet another what..?
 
Lühiportfolio projekti : Uushorisont . detailides*
Lühiportfolio projekti : Uushorisont . detailides*Lühiportfolio projekti : Uushorisont . detailides*
Lühiportfolio projekti : Uushorisont . detailides*
 
SHARE 2014, Pittsburgh CICS Connectivity amd Networking
SHARE 2014, Pittsburgh CICS Connectivity amd NetworkingSHARE 2014, Pittsburgh CICS Connectivity amd Networking
SHARE 2014, Pittsburgh CICS Connectivity amd Networking
 
SHARE 2014 Pittsburgh, Modernizing cics for cloud
SHARE 2014 Pittsburgh, Modernizing cics for cloudSHARE 2014 Pittsburgh, Modernizing cics for cloud
SHARE 2014 Pittsburgh, Modernizing cics for cloud
 
"Не угаснет свет его таланта"
"Не угаснет свет его таланта""Не угаснет свет его таланта"
"Не угаснет свет его таланта"
 
Oumh1303 20130712 155801
Oumh1303 20130712 155801Oumh1303 20130712 155801
Oumh1303 20130712 155801
 
Share seattle liberty
Share seattle libertyShare seattle liberty
Share seattle liberty
 
S105 performance
S105 performanceS105 performance
S105 performance
 
Anz cics ts v5 technical update seminar intro (half day event)
Anz cics ts v5 technical update seminar intro (half day event)Anz cics ts v5 technical update seminar intro (half day event)
Anz cics ts v5 technical update seminar intro (half day event)
 
2844 inter connect cics policy (2844)
2844  inter connect cics policy (2844)2844  inter connect cics policy (2844)
2844 inter connect cics policy (2844)
 
S111 cics connectivity in devops
S111   cics connectivity in devopsS111   cics connectivity in devops
S111 cics connectivity in devops
 
16370 cics project opening and project update f
16370  cics project opening and project update f16370  cics project opening and project update f
16370 cics project opening and project update f
 
SHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applicationsSHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applications
 
S107 5 compelling reasons for using cics in the cloud
S107 5 compelling reasons for using cics in the cloudS107 5 compelling reasons for using cics in the cloud
S107 5 compelling reasons for using cics in the cloud
 
Impact 2014 Best practices for_cics_soa_co
Impact 2014 Best practices for_cics_soa_coImpact 2014 Best practices for_cics_soa_co
Impact 2014 Best practices for_cics_soa_co
 
Reactive Streams Condensed
Reactive Streams CondensedReactive Streams Condensed
Reactive Streams Condensed
 

Similar to S109 cics-java

Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)
Michael Elder
 
IBM Pulse session 2727: Continuous delivery -accelerated with DevOps
IBM Pulse session 2727: Continuous delivery -accelerated with DevOpsIBM Pulse session 2727: Continuous delivery -accelerated with DevOps
IBM Pulse session 2727: Continuous delivery -accelerated with DevOps
Sanjeev Sharma
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352
sflynn073
 

Similar to S109 cics-java (20)

Lightweight Java in the Cloud
Lightweight Java in the CloudLightweight Java in the Cloud
Lightweight Java in the Cloud
 
(java2days) Is the Future of Java Cloudy?
(java2days) Is the Future of Java Cloudy?(java2days) Is the Future of Java Cloudy?
(java2days) Is the Future of Java Cloudy?
 
Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...
 
z/VM and OpenStack
z/VM and OpenStackz/VM and OpenStack
z/VM and OpenStack
 
RDZ for Cobol Programmers slides 7 14 Debugger deep dive final2
RDZ for Cobol Programmers slides 7 14 Debugger deep dive final2RDZ for Cobol Programmers slides 7 14 Debugger deep dive final2
RDZ for Cobol Programmers slides 7 14 Debugger deep dive final2
 
1812 icap-v1.3 0430
1812 icap-v1.3 04301812 icap-v1.3 0430
1812 icap-v1.3 0430
 
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCodeContinuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
 
Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)
 
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
 
IBM Pulse session 2727: Continuous delivery -accelerated with DevOps
IBM Pulse session 2727: Continuous delivery -accelerated with DevOpsIBM Pulse session 2727: Continuous delivery -accelerated with DevOps
IBM Pulse session 2727: Continuous delivery -accelerated with DevOps
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352
 
CampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
CampDevOps keynote - DevOps: Using 'Lean' to eliminate BottlenecksCampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
CampDevOps keynote - DevOps: Using 'Lean' to eliminate Bottlenecks
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 
Polyglot! A Lightweight Cloud Platform for Java SE, Node, and More
Polyglot! A Lightweight Cloud Platform for Java SE, Node, and MorePolyglot! A Lightweight Cloud Platform for Java SE, Node, and More
Polyglot! A Lightweight Cloud Platform for Java SE, Node, and More
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
IBM JavaOne Community Keynote 2015: Cask Strength Java Aged 20 years
IBM JavaOne Community Keynote 2015: Cask Strength Java  Aged 20 yearsIBM JavaOne Community Keynote 2015: Cask Strength Java  Aged 20 years
IBM JavaOne Community Keynote 2015: Cask Strength Java Aged 20 years
 
IBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of libertyIBM Impact session CICS & java a tale of liberty
IBM Impact session CICS & java a tale of liberty
 

More from nick_garrod

More from nick_garrod (20)

Enhanced cics cloud enablement and dev ops capabilities
Enhanced cics cloud enablement and dev ops capabilitiesEnhanced cics cloud enablement and dev ops capabilities
Enhanced cics cloud enablement and dev ops capabilities
 
Api management customer
Api management customerApi management customer
Api management customer
 
S110 gse - liberte egalite fraternite
S110 gse - liberte egalite fraterniteS110 gse - liberte egalite fraternite
S110 gse - liberte egalite fraternite
 
S108 - 1 Billion Smartphones a year and counting – How is your CICS connected?
S108 - 1 Billion Smartphones a year and counting – How is your CICS connected?S108 - 1 Billion Smartphones a year and counting – How is your CICS connected?
S108 - 1 Billion Smartphones a year and counting – How is your CICS connected?
 
S106 using ibm urban code deploy to deliver your apps to cics
S106 using ibm urban code deploy to deliver your apps to cicsS106 using ibm urban code deploy to deliver your apps to cics
S106 using ibm urban code deploy to deliver your apps to cics
 
S103 cics cloud and dev ops agility
S103 cics cloud and dev ops agilityS103 cics cloud and dev ops agility
S103 cics cloud and dev ops agility
 
S102 cics the future is closer abridged
S102 cics the future is closer abridgedS102 cics the future is closer abridged
S102 cics the future is closer abridged
 
S101 cics what's in it for you
S101   cics what's in it for you S101   cics what's in it for you
S101 cics what's in it for you
 
Share seattle health_center
Share seattle health_centerShare seattle health_center
Share seattle health_center
 
SHARE Seattle 2015 Taming the Beast – Best Practices for zFS with CICS
SHARE Seattle 2015 Taming the Beast – Best Practices for zFS with CICSSHARE Seattle 2015 Taming the Beast – Best Practices for zFS with CICS
SHARE Seattle 2015 Taming the Beast – Best Practices for zFS with CICS
 
Share seattle cics cloud
Share seattle cics cloudShare seattle cics cloud
Share seattle cics cloud
 
SHARE 2015 SeattleShare cics ts 52 technical overview
SHARE 2015 SeattleShare cics ts 52 technical overviewSHARE 2015 SeattleShare cics ts 52 technical overview
SHARE 2015 SeattleShare cics ts 52 technical overview
 
Share cics policy (2844)
Share cics policy (2844)Share cics policy (2844)
Share cics policy (2844)
 
Share multi versioning scenarios
Share  multi versioning scenariosShare  multi versioning scenarios
Share multi versioning scenarios
 
z Technical Summit Track 3 Session 4 Developing mobilefirst app for z
z Technical Summit Track 3 Session 4 Developing mobilefirst app for zz Technical Summit Track 3 Session 4 Developing mobilefirst app for z
z Technical Summit Track 3 Session 4 Developing mobilefirst app for z
 
Session 3 _exposing_mainframe_applications_services_v4
Session 3 _exposing_mainframe_applications_services_v4Session 3 _exposing_mainframe_applications_services_v4
Session 3 _exposing_mainframe_applications_services_v4
 
2829 liberty
2829 liberty2829 liberty
2829 liberty
 
InterConnect 2015 session 2825 cics_and_the_new soa
InterConnect 2015 session 2825  cics_and_the_new soaInterConnect 2015 session 2825  cics_and_the_new soa
InterConnect 2015 session 2825 cics_and_the_new soa
 
InterConnect session 2819 1_billion_smart Phones
InterConnect session 2819  1_billion_smart PhonesInterConnect session 2819  1_billion_smart Phones
InterConnect session 2819 1_billion_smart Phones
 
Session 6638 - The One-Day CICS Transaction Server Upgrade: Migration Conside...
Session 6638 - The One-Day CICS Transaction Server Upgrade: Migration Conside...Session 6638 - The One-Day CICS Transaction Server Upgrade: Migration Conside...
Session 6638 - The One-Day CICS Transaction Server Upgrade: Migration Conside...
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

S109 cics-java

  • 1. CICS Java – Beauty and the Beast Ian Burnett CICS - S109
  • 2. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 • The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. • References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. • IBM, the IBM logo, and WebSphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. • Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Legal Disclaimer
  • 3. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Agenda
  • 4. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Java: An Overview
  • 5. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 A Brief History of Programming Languages FORTRAN COBOL PL/I C C++ Oak Java Smalltalk Lisp ALGOL
  • 6. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 What is Java and what makes it different? Java is What makes Java different  Java is NOT compiled to executable code, it is compiled to bytecode that runs in a virtual machine  The virtual machine uses the just-in-time compiler (JIT) to execute the code  Java is not based on programs, it is based on classes  Java uses a garbage collector, that removes unused objects from the storage  Java development is often based on existing programming patterns (Design Patterns)  Encourages loose coupling between components  Most of the build in funtionality of Java is based of class libraries, that are build in the Java Runtime (JRE)  Java contains a library for user interface development  Java has the ability to reflect about the runtime with several methods  Java has type-safe variable declaration  Uses JNI for native system calls and JDBC for database calls Java is  Object-oriented  Platform-independent  Broadly-supported and prevalent  A state-of-the-art language  [and an island in Indonesia]  Something YOU should care about Java is not  Something new and unreliable  An error-prone language  The only solution for good code  Independent on its own  Something that only the distributed world should care about  Easy to write or fully-performant out of the box  A composable workbox full of libraries
  • 7. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Traditional Applications
  • 8. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Executing a COBOL Program in CICS • Load the program into storage from DASD • Initialise a new Language Environment enclave o ... ?
  • 9. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Language Environment (LE) • Prior to LE, all languages brought their own runtime libraries • Why now LE?
  • 10. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Executing a COBOL Program in CICS • Load the program into storage from DASD • Initialise a new Language Environment enclave • Control is given to the application code • Once the application ends it 'returns' to LE
  • 11. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Enclave Structure Within CICS = CICS Region = CICS initial transaction = Main Transaction Program or EC LINKed Program
  • 12. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Storage in LE
  • 13. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Dispatching a Program in CICS CICSA/S z/OS Dispatcher WEB WEB WEB WEB Global SRB TCB ASCB TCB OTE TCB OTE WEB TCB QR CICS Dispatcher DFHSIP LE Enclave Application code
  • 14. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Anatomy of a Java Application
  • 15. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 jar file Java package Java packaging and hierarchy • Classes contain data and logic • Packages contain these classes and organize them • Jar files contain the classes and are the base for applications and libraries • At the runtime, there are just a lot of classes on a classpath Java package class files Java package class files class files
  • 16. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 The Java Virtual Machine • Java Virtual Machine (JVM) • Run time data management is performed by the JVM • The JVM will only stop if the last non-daemon thread finishes • Platform-independence means that: o Java is never compiled to machine instructions upfront o Everything in Java is abstracted (including data types)
  • 17. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Java Runtime JVM OS and Hardware Nativecode Runtime Libraries Java Application
  • 18. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Bytecode and the JIT Compiler
  • 19. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Java Bytecode • Developer writes application in Java • Compiler converts to bytecode • Bytecode is stored in jar files on disk • JVM loads bytecode from disk • ... ?
  • 20. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Loading a Java Class • Loading • Linking o Verifying o Preparing o Resolving • Initialising
  • 21. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Classpath and OSGi 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 Begin Here
  • 22. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Comparing Java and bytecode public int sum(int a, int b) { int result = 0; result = a + b; return result; } public int sum(int, int); Code: 0: iconst_0 1: istore_3 2: iload_1 3: iload_2 4: iadd 5: istore_3 6: iload_3 7: ireturn
  • 23. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Executing Bytecode • The JVM constructs for each Thread an execution engine • In this engine the application now needs to be executed • Interpreting bytecode is slow
  • 24. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Just In Time Compiler (JIT) Java Application JVM JIT Compiler J9 Interpreter OS and Hardware
  • 25. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 JIT Operation • Sampling process • Multiple levels of optimisation • Transparent to application and to CICS region
  • 26. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Java on z/OS
  • 27. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Differences on z/OS IBM JDK for z/OS Standard JSE (JDK specification) z/OS Extensions Just In Time Compiler (JIT) Exploitation of the Hardware Architecture z/OS Operating System and System z Hardware
  • 28. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 An LE Enclave With Java
  • 29. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Recap: Dispatching a Program in CICS CICSA/S z/OS Dispatcher WEB WEB WEB WEB Global SRB TCB ASCB TCB OTE TCB OTE WEB TCB QR CICS Dispatcher DFHSIP LE Enclave Application code
  • 30. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Dispatching a Java Program in CICS CICSA/S z/OS Dispatcher WEB WEB WEB WEB Global SRB TCB ASCB T8 TCB T8 TCB Enclave WEB TCB QR CICS Dispatcher DFHSIP LE Enclave Application code pthread pthread GC JIT JVM server
  • 31. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Garbage Collection • All memory management is responsibility of JVM • Periodically performs garbage collection o Many approaches o Recommend using -Xgcpolicy:gencon for OLTP • New objects created in the nursery area • As objects age they are moved to the tenured area
  • 32. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Shared Classes • Faster JVM start • Faster application start • Reduced memory consumption for multiple JVMs
  • 33. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Compressed References • -Xcompressedrefs
  • 34. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Comparing COBOL and Java
  • 35. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Comparing COBOL to Java Develop a COBOL program  Cobol does not know complex data types or objects  Data elements are usually shared, not hidden  The compile is performed done after coding (no online syntax checking)  Compiler performs fewer static tests  Debugging is performed in multiuser environments  Pointers to storage locations Runtime Behaviour of Cobol  LE does not check whether the loaded program is corrupt  The runtime can not check whether the data is assigned correctly and Problems can arise  Handlers get control if something went wrong  Memory is defined upfront Develop a Java program  Data is structured in complex objects  Variables are not shared, they are addressed by methods of the object  Compiles are executed every time a class is saved (while ongoing syntax check is performed)  Compiler performs a lot of static testing  Debugging is usually performed locally  Memory can NEVER be addressed directly Runtime Behaviour of Java  The JVM checks the bytecode after loading the class  Classes are checked during compilation and in runtime data is only assigned if types match  Classes and methods can throw exceptions if a problem occurs  New objects can be generated dynamically
  • 36. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Updating Programs – COBOL and Java Update a COBOL Program in CICS  COBOL program is compiled/linked into a PDSe that is concatenated into the RPL upfront of the existing load library or to replace the existing version  In CICS issue a NEWCOPY or PHASEIN to let CICS reload the program from the dataset  Use the new program Update a Java Program in CICS  In Java you can't replace runtime code  Frameworks like OSGi enables the exchange of bundles  You need to decouple the application design (using micro services in OSGi or accept a small outage Problems with this Approach  Compatibility is a contract that is not checked until runtime  The connection is something the compiler is not aware of Problems with this Approach  The simple PHASEIN or NEWCOPY is not possible  A complex build infrastructure is necessary  Only bundles/services, not classes can be “phased in”  A change in application development architecture is necessary
  • 37. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Specialty Engines
  • 38. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 zAAP • IBM System z Application Assist Processor • Provides dedicated environment for execution of Java workloads and parsing of XML • Available on: o zEnterprise EC12 / BC12 o zEnterprise 196 / 114 o System z10 o System z9 • Superseded by zIIP on IBM z13
  • 39. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 zIIP • IBM System z Integrated Information Processor • Many IBM products exploit zIIP engines • No IBM software charges on zAAP / zIIP capacity • Available on all System z machines since System z9 • From z/OS 1.11: zAAP-on-zIIP • Specialty engines always run full speed o Even on subcapacity machines
  • 40. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Moving Eligible Work to a zIIP Eligible work Eligible work Eligible work Eligible work Eligible work Eligible work GCP zIIPGCP
  • 41. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Specialty Engines and the z/OS Dispatcher GCP zAAP CICS Start Java application JVM Mark as zAAP-eligible z/OS Dispatcher Suspend TCB on GCP z/OS Dispatcher Dispatch TCB on zAAP JVM Execution of byte code JVM Mark as zAAP-ineligible z/OS Dispatcher Suspend TCB on zAAP z/OS Dispatcher Dispatch TCB on GCP JVM Return to CICS CICS Subsystem code
  • 42. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109 Questions?
  • 43. © 2015 IBM CorporationCICS Java – Beauty and the Beast – S109

Editor's Notes

  1. GSE Nordic Region Conference 2015 3rd June 2015 Ian Burnett IBM CICS TS for z/OS Performance Test Lead ian.burnett@uk.ibm.com @IanBurnett
  2. This section will cover at a very high level some concepts behind the Java language.
  3. Highlighted boxes show languages (or their direct derivatives) which are supported within CICS. FORTRAN – 1954 ALGOL – 1958 Lisp – 1958 COBOL – 1959 PL/I – 1964 Smalltalk – 1971 C – 1971 C++ – 1983 Oak – 1991 Java – 1995 Source: www.levenez.com/lang/
  4. Java differs in some parts quite a lot from traditional languages like assembler, PL/I or COBOL. This slide covers some of the major differences – some of these differences are covered in greater depth later in this presentation.
  5. In this case, "traditional" refers to COBOL, PL/I, C, and LE assembler applications. References to COBOL in this presentation are not strictly limited to that particular language – it is merely shorthand for "CICS applications written without the Java Runtime Environment". Before starting to compare Java with other languages, this section will recap how a traditional application manages storage, how it receives control, and how it fits within the rest of the CICS and z/OS environment. I am a CICS person, so will be concentrating on the runtime operation of CICS, rather than batch or IMS.
  6. The program is loaded into storage from disk, the relocatable references are resolved and then the load module is ready for use. When the program is called from CICS, a new LE enclave is created and initialised. But what is LE and an enclave?
  7. A runtime library brings all the code that is provided by a language and not part of the user program (storage management, I/O routines, math functions...). This approach has the advantage that only the library code is tied to the underlying hardware, and without forcing the compiler or the application to require too many adaptations for the environment in which it is executing. When all the languages brought their own runtime, they expected to be alone in the world. Customers had problems to run different languages side by side, and with CICS, it is possible to run many languages side-by-side in the same environment, often calling each other.
  8. Initialising a new Language Environment enclave involves: Obtaining initial storage Condition handlers initialized Active member language specific run-time is initialised Once the application ends and 'returns' to LE: The LE environment is terminated System resources obtained during initialisation and throughout the execution of the application are cleaned-up
  9. LE definitions: Region : the range of storage the application set runs in Process : set of applications that accomplish a task Enclave : an application - set of modules that accomplish some subtask (Not shown) Thread : dispatchable unit of work that shares storage with others in the enclave An LE enclave is created for the first program within a CICS task, and for each subsequent EXEC CICS LINK command. Subroutines called (e.g. using COBOL's CALL statement) do not get their own LE enclave.
  10. Remember: each process is a CICS task. In the CICS environment, an enclave is often referred to as a "run-unit".
  11. WEB = Work Element Block ASCB = Address Space Control Block SRB = Service Request Block TCB = Task Control Block OTE = Open Transaction Environment (e.g. L8, L9, X8, X9 TCBs) In CICS, a task has one or more LE enclaves that are separated from all other Tasks in the address space. A task can have multiple LE enclaves if control is transferred from one program to another using an EXEC CICS LINK or EXEC CICS XCTL command.
  12. Java packages are a virtual form organisation, based around Java's Object-Oriented principles. A classpath will be covered later. There are some features missing from this slide: jar visibility, versioning, and dependencies. OSGi addresses all of these issues.
  13. Everything in Java is executed within a virtual machine. One of the key aspects of Java is that memory management is performed transparently by the JVM. A daemon thread is one which executes in the background, and not part of the main user application. Java is never compiled to machine instructions upfront - it is interpreted and compiled during runtime. This provides platform neutrality, leading to the claim that Java is "Write once, run anywhere".
  14. A Java application usually only interacts with the JVM and the operating system via the standard Java runtime libraries. The runtime libraries often run as pure Java, but some (such as the I/O routines) include native code to access the underlying operating system and hardware. It is possible for a Java application to access native code (e.g. assembler) through the Java Native Interface (JNI) to access platform-specific functionality. Using native code restricts the portability of a Java application, because by their very nature, they are specific to hardware and O/S combinations.
  15. In this section we look at what is happening under the covers. Java developers rarely need to know about the bytecode, but it gives an understanding of the parts at work.
  16. The compilation step often happens transparently on the development workstation, whenever the source file is saved. Unlike many other compiled languages, a Java compiler produces platform-neutral bytecode. This bytecode from the compilation step is suitable for running unmodified on any platform. In the case of Java applications in CICS, this bytecode is stored on HFS, usually packaged within a jar file. When a class is required at runtime, the JVM loads the bytecode for that class from HFS.
  17. As with a traditional load module, the loading stage finds the class file on disk and puts a copy into main memory. The linking stage is broken into three stages: Verifying – ensuring the class file adheres to the Java and JVM specifications. Preparing – allocating storage for the various components within a class Resolving – updating all indirect references to direct references within the JVM Initialising involves setting class fields to their initial values, and running the class initialiser methods.
  18. An analogy to a Java classpath is a load library concatenation. When attempting to load a class, the Java runtime searches all the jar files found in the classpath, in order, until a match is found. If no match is found, then the environment throws a java.lang.ClassNotFoundException which is propagated to the user application. Traditional classpath was per-JVM, which introduces problems when refreshing classes. OSGi removes some of the static nature of a classpath, plus adds multi-versioning and dynamic life-cycling of applications. This allows an application to be dynamically updated during the lifespan of the JVM. See the discussion later about why PHASEIN is not supported within a JVM.
  19. A simple Java method to accept two integer numbers and return their sum. The left side shows the Java source code, while the right side shows the resulting bytecode mnemonics after compilation. Java is stack-based: below is a breakdown of the bytecode: iconst_0 – load an integer value of zero onto the stack istore_3 – store the top element of the stack into local variable 3 iload_1 / iload_2 – push local variables 1 and 2 onto the stack iadd – pop top two integer values off the stack, add them together, and push the result ireturn – pop top integer value off the stack and return control to the method's invoker
  20. Old and naive JVM implementations simply take the bytecode, step through it one instruction at a time, and then perform the stack manipulations using native code. This is the old "interpreted" approach, and is very slow. These initial implementations contributed in no small part to the widespread belief that Java as a language is slow.
  21. In this diagram, the "Java Application" box represents both the user's code, and the runtime libraries. The JIT Frontend is common in all IBM JVM Implementations, the backend is specific to System z.
  22. The JIT compiler is continuously sampling the methods being executed inside the JVM. Optimisation is a non-trivial process, so only frequently-called methods are optimised to the higher levels. The more frequently a method is invoked, the more aggressive the optimisation. There are multiple levels of compilation: noOpt, cold, warm (initial compilation usually occurs to this level), hot, veryHot, and scorching. This progressive optimisation means that you are likely to see performance improve over the first tens of thousands of Java transactions into CICS. For this reason be careful when undertaking performance comparisons to ensure that the JVM is fully "warmed up" before taking measurements.
  23. IBM uses its own implementation of a JVM on mainframes that uses the underlying platform architecture. Unlike compiling a traditional application, a JVM is aware of the hardware on which it is executing. In turn, bytecode is compiled to the most optimal series of System z instructions for the level of hardware in use. For example, Java 8 can exploit SIMD on the IBM z13.
  24. Within CICS, a JVM is a very complex C application running within its own LE enclave. As part of the definition for a JVMSERVER, one of the attributes is the compiled LE options configuration. The default supplied options (DFHAXRO) are correct in almost every scenario. The LE Enclave is configured to always obtain new Heap Storage Bear in mind that the JVM Heap Size is managed by the JVM, so a JVM can run out of memory initial 64-bit heap of 100MB initial 31-bit heap of 4MB Both areas allow incremental expansion to increase The Files generated by the JVM are controlled by: DC C'ENVAR("_EDC_UMASK_DFLT=nnn")' The output that is produced by the RPTO and RPTS options is written to the CESE transient data queue
  25. We visited this diagram earlier in the presentation when examining how a COBOL program is dispatched within CICS.
  26. Removing the unchanged items, we can see that a JVM server within CICS is one single LE enclave. Java applications executing in CICS are always dispatched on a T8 TCB. This TCB then corresponds to a pthread within the JVM server. This then corresponds to a Java thread, which executes the Java application code. Aside from the application threads, there are several other threads which execute in the background of a JVM, such as the Garbage Collection (GC), or JIT compiler threads.
  27. gencon = generational plus concurrent garbage collection Garbage collections are more frequent, but have less impact (shorter) in the nursery area. Garbage collections are less frequent, but have a bigger impact (longer) in the tenured area. See http://www.ibm.com/developerworks/websphere/techjournal/1106_bailey/1106_bailey.html
  28. Shared classes can be configured using the JVM options and is transparent to CICS operation. See the Java manuals for details.
  29. Restricts Java heap sizes up to 29 GB, but makes much more effective use of the space available by reducing the size of each object.
  30. You can use JDWP to replace code at runtime but that is a debug-oriented configuration, not for production use.
  31. www.ibm.com/systems/z/hardware/features/zaap/
  32. www.ibm.com/systems/z/hardware/features/ziip/