From Code To Deployment: Connecting To CICS From

Transcription

Front coverFrom code to deployment:Connecting to CICS fromWebSphere V4.01 for z/OSHow to connect to CICS fromWebSphere V4.01 for z/OSUse the J2EE ConnectorArchitectureUse VisualAge for Javaand WebSphere StudioMartin KeenTamas Vilaghyibm.com/redbooksRedpaper

International Technical Support OrganizationFrom code to deployment: Connecting to CICS fromWebSphere V4.01 for z/OSMay 2002

Note: Before using this information and the product it supports, read the information in“Notices” on page vii.First Edition (May 2002)This edition applies to Version 4.0.1 of WebSphere Application Server with V4.0.2 of CICSTransaction Gateway Copyright International Business Machines Corporation 2002. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP ScheduleContract with IBM Corp.

iii

ivFrom code to deployment: Connecting to CICS from WebSphere for z/OS

ContentsNotices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiTrademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The team that wrote this Redpaper . . . . . . . . . . . . . . . . . .Become a published author . . . . . . . . . . . . . . . . . . . . . . . .Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix. . . ix.x. . . xiChapter 1. Overview . . . . . . . . . . . . . . .1.1 Connector support overview . . . . . . .1.2 Development tool choices . . . . . . . . .1.3 The example used in this Redpaper .1.4 Before you begin . . . . . . . . . . . . . . . .12589Chapter 2. VisualAge for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2 Preparing VisualAge for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2.1 Installing VisualAge for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2.2 Configuring VisualAge for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.3 Building a command and record bean. . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.3.1 Building the record bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.3.2 Building the command bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.3.3 Testing the command bean. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.3.4 Configuring the command bean for JNDI . . . . . . . . . . . . . . . . . . . . . 26Chapter 3. WebSphere Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.2 Building the Trader enterprise application . . . . . . . . . . . . . . . . . . . . . . . . . 353.2.1 Preparing WebSphere Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.2.2 Creating a session bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.2.3 Testing the session bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493.2.4 Completing the enterprise application . . . . . . . . . . . . . . . . . . . . . . . . 61Chapter 4. WebSphere Application Server for z/OS. . . . . . . . . . . . . . . . . . 654.1 Enabling CICS connector support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664.1.1 Preparing the CICS ECI resource adapter . . . . . . . . . . . . . . . . . . . . 664.1.2 Defining connection information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694.2 Deploying to WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . 714.2.1 Application Assembly Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Copyright IBM Corp. 2002. All rights reserved.v

4.2.2 Systems Management User Interface . . . . . . . . . . . . . . . . . . . . . . . . 744.3 Advanced tasks to try . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Appendix A. Trader CICS Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79The Trader CICS Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Appendix B. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87System requirements for downloading the Web material . . . . . . . . . . . . . . 88How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Related publications . . . . . . . . . . . . . . . . . . . . . .IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . .Other resources . . . . . . . . . . . . . . . . . . . . . . . .How to get IBM Redbooks . . . . . . . . . . . . . . . . . . .IBM Redbooks collections . . . . . . . . . . . . . . . . .8989898989Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91viFrom code to deployment: Connecting to CICS from WebSphere for z/OS

NoticesThis information was developed for products and services offered in the U.S.A.IBM may not offer the products, services, or features discussed in this document in other countries. Consultyour local IBM representative for information on the products and services currently available in your area.Any reference to an IBM product, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product, program, or service thatdoes not infringe any IBM intellectual property right may be used instead. However, it is the user'sresponsibility to evaluate and verify the operation of any non-IBM product, program, or service.IBM may have patents or pending patent applications covering subject matter described in this document.The furnishing of this document does not give you any license to these patents. You can send licenseinquiries, in writing, to:IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.The following paragraph does not apply to the United Kingdom or any other country where suchprovisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATIONPROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS ORIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimerof express or implied warranties in certain transactions, therefore, this statement may not apply to you.This information could include technical inaccuracies or typographical errors. Changes are periodically madeto the information herein; these changes will be incorporated in new editions of the publication. IBM maymake improvements and/or changes in the product(s) and/or the program(s) described in this publication atany time without notice.Any references in this information to non-IBM Web sites are provided for convenience only and do not in anymanner serve as an endorsement of those Web sites. The materials at those Web sites are not part of thematerials for this IBM product and use of those Web sites is at your own risk.IBM may use or distribute any of the information you supply in any way it believes appropriate withoutincurring any obligation to you.Information concerning non-IBM products was obtained from the suppliers of those products, their publishedannouncements or other publicly available sources. IBM has not tested those products and cannot confirmthe accuracy of performance, compatibility or any other claims related to non-IBM products. Questions onthe capabilities of non-IBM products should be addressed to the suppliers of those products.This information contains examples of data and reports used in daily business operations. To illustrate themas completely as possible, the examples include the names of individuals, companies, brands, and products.All of these names are fictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.COPYRIGHT LICENSE:This information contains sample application programs in source language, which illustrates programmingtechniques on various operating platforms. You may copy, modify, and distribute these sample programs inany form without payment to IBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operating platform for which thesample programs are written. These examples have not been thoroughly tested under all conditions. IBM,therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,modify, and distribute these sample programs in any form without payment to IBM for the purposes ofdeveloping, using, marketing, or distributing application programs conforming to IBM's applicationprogramming interfaces. Copyright IBM Corp. 2002. All rights reserved.vii

TrademarksThe following terms are trademarks of the International Business Machines Corporation in the United States,other countries, or both:Redbooks(logo) CICS IBM IMS MVS RACF Redbooks VisualAge WebSphere z/OS zSeries Lotus Word Pro The following terms are trademarks of other companies:ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the UnitedStates, other countries, or both.Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in theUnited States, other countries, or both.Java and all Java-based trademarks and logos are trademarks or registered trademarks of SunMicrosystems, Inc. in the United States, other countries, or both.C-bus is a trademark of Corollary, Inc. in the United States, other countries, or both.UNIX is a registered trademark of The Open Group in the United States and other countries.SET, SET Secure Electronic Transaction, and the SET Logo are trademarks owned by SET SecureElectronic Transaction LLC.Other company, product, and service names may be trademarks or service marks of others.viiiFrom code to deployment: Connecting to CICS from WebSphere for z/OS

PrefaceThe way you access CICS business logic from enterprise applications running inWebSphere Application Server has changed. In March 2002, WebSphereApplication Server V4.0.1 for z/OS introduced support for the J2EE ConnectorArchitecture, and with this support comes a whole new way of connecting toenterprise systems like CICS and IMS.This Redpaper describes how to use the J2EE Connector Architecture support tocreate a managed connection between WebSphere for z/OS and CICSTransaction Server, using the CICS ECI resource adapter. The entire process iscovered in this paper, from developing an enterprise application that makes callsto CICS, through to deploying the enterprise application to WebSphere for z/OS.This Redpaper describes detailed instructions on how to prepare IBM’sVisualAge for Java and the new WebSphere Studio configurations for use withthe CICS ECI resource adapter, and then details how to build an enterpriseapplication using these tools. This enterprise application is then deployed to aWebSphere J2EE server configured for the CICS ECI resource adapter.Since this Redpaper was originally published, WebSphere Application Server forz/OS has introduced support for enterprise services generated in WebSphereStudio Application Developer Integration Edition, via Service Level 4. This is nowthe strategic way to develop applications that use the CICS ECI resourceadapter. However, as a starting point you may wish to follow the approachdocumented here first, before moving on to the world of enterprise services.The team that wrote this RedpaperThis Redpaper was produced by a team of specialists from around the worldworking at the International Technical Support Organization, PoughkeepsieCenter. Copyright IBM Corp. 2002. All rights reserved.ix

Martin Keen is an Advisory IT Specialist, working as aconsultant in Software Group Services at IBM UK’s HursleyLaboratory. He writes and teaches extensively in the area ofCICS Java Web-enablement, and also provides consultationfor WebSphere Application Server for z/OS. Martin is anIBM Certified Solutions Expert in CICS Web Enablement,and holds a BSc in Computer Studies from SouthamptonInstitute.Tamas Vilaghy is a project leader at the InternationalTechnical Support Organization, Poughkeepsie Center.He leads redbook projects dealing with e-business onzSeries servers. Before joining the ITSO 6 months ago, heworked in System Sales Unit and Global Servicesdepartments of IBM Hungary. Tamas spent 2 years inPoughkeepsie from 1998 to 2000 dealing with zSeriesmarketing and competitive analysis. From 1991 to 1998he held technical, marketing and sales positions dealingwith zSeries.Thanks to the following people for their contributions to this project:Mike CoxWashington Systems CenterKen MuckenhauptIBM eTP Center, PoughkeepsieIvan JoslinIBM WebSphere for z/OS developmentRich ConwayITSO, PoughkeepsiePhil Wakelin, Richard Johnson, and Daniel Cerecedo DiazThe team of the Java Connectors for CICS redbookBecome a published authorJoin us for a two- to six-week residency program! Help write an IBM Redbookdealing with specific products or solutions, while getting hands-on experiencewith leading-edge technologies. You'll team with IBM technical professionals,Business Partners and/or customers.xFrom code to deployment: Connecting to CICS from WebSphere for z/OS

Your efforts will help increase product acceptance and customer satisfaction. Asa bonus, you'll develop a network of contacts in IBM development labs, andincrease your productivity and marketability.Find out more about the residency program, browse the residency index, andapply online at:ibm.com/redbooks/residencies.htmlComments welcomeYour comments are important to us!We want our papers to be as helpful as possible. Send us your comments aboutthis Redpaper or other Redbooks in one of the following ways: Use the online Contact us review redbook form found at:ibm.com/redbooks Send your comments in an Internet note to:redbook@us.ibm.com Mail your comments to:IBM Corporation, International Technical Support OrganizationDept. HYJ Mail Station P0992455 South RoadPoughkeepsie, NY 12601-5400Prefacexi

xiiFrom code to deployment: Connecting to CICS from WebSphere for z/OS

1Chapter 1.OverviewThis chapter provides an overview of the new connector support in WebSphereApplication Server V4.0.1 for z/OS. It introduces the J2EE ConnectorArchitecture and CICS ECI resource adapter, then goes on to explain the choiceof development tools you can use to develop enterprise applications that use thisconnector technology.Finally it describes the sample used in this Redpaper, and lists a set ofprerequisites.This chapter contains the following sections: Connector support overview Development tool choices The example used in this Redpaper Before you begin Copyright IBM Corp. 2002. All rights reserved.1

1.1 Connector support overviewSo you want to access CICS from WebSphere?The way you access CICS business logic from enterprise applications running inWebSphere Application Server has changed. In March 2002, WebSphereApplication Server V4.0.1 for z/OS introduced support for the J2EE ConnectorArchitecture, and with this support comes a whole new way of connecting toenterprise systems like CICS and IMS.What is the J2EE Connector ArchitectureIt’s a standard way for a Java component to connect to any enterprise system. Itis now part of the J2EE standard, introduced in the J2EE V1.3 specification.WebSphere Application Server V4 is a J2EE V1.2 compliant application server,but has been extended to include this support.Figure 1-1 shows how WebSphere connects to CICS from a session bean, usingthe J2EE Connector Architecture. This introduces the CICS ECI resourceadapter.WebSphere Application ServerCICS TSSessionbeanCICS ECI resource adapterBusinessLogicProgramFigure 1-1 Overview of connecting to CICSWhat is the CICS ECI resource adapterFirst, lets introduce what a resource adapter is. The J2EE ConnectorArchitecture states that the way an application server (like WebSphere)communicates with an enterprise system (like CICS) is through a resourceadapter. This resource adapter is written specifically for the enterprise system itsupports, but the same resource adapter can be plugged in to any applicationserver.The resource adapter exposes two components:2From code to deployment: Connecting to CICS from WebSphere for z/OS

Common Client InterfaceThis is a common API amongst all resource adapters. A Java componentwishing to use the resource adapter to access an enterprise system does sothrough this common API. Unlike connectors in the past, there is not aconnector-specific API for the application programmer to learn, whichsignificantly differs with each connector. System contractsThis is how the application server communicates with the resource adapter.This is also common amongst resource adapters, allowing a resource adapterto plug in to any application server that supports the J2EE ConnectorArchitecture.The resource adapter that specifically provides access to CICS business logic isthe CICS ECI resource adapter.How does this affect my connections to CICSThe CICS ECI resource adapter allows WebSphere to take much tighter controlin how connections to CICS are made. It allows WebSphere to manage theconnections by using the system contracts of the resource adapter. Thismanaged connection allows WebSphere to perform the following: Provide two phase commit processing using RRS Flow security credentials based on deployment information specified in theenterprise application. The userid you flow to CICS can come from:– The enterprise application– The userid of the J2EE server running the enterprise application– The userid of the caller of the enterprise application– A userid mapped to an EJB security role Provide sysplex-wide pooling of connections.Do I still need the CICS Transaction GatewayYes! It is the CICS Transaction Gateway that actually ships the CICS ECIresource adapter.The CICS ECI resource adapter internally uses the CICS Transaction Gateway inlocal mode to make the physical connection to CICS. It uses the same set of filesas usual -- ctgserver.jar to provide the Java interface and libCTGJNI.so tomake EXCI calls to CICS. See Figure 1-2.Chapter 1. Overview3

WebSphere Application ServerCICS TSCICS ECI resource adapterlibCTGJNI.soCTG JavaclassesJ2EE ConnectorArchitecture classesEXCIBusinessLogicProgramFigure 1-2 Inside the CICS ECI resource adapterAnything else I should knowWell, yes. The CICS Transaction Gateway ships two CICS ECI resourceadapters: The original CICS ECI resource adapter fully complies with the J2EEConnector Architecture specification. It can be used in WebSphereApplication Server V4 Advanced Edition on distributed platforms, or in anyJ2EE Connector Architecture compliant application server.This resource adapter has been shipped since CICS Transaction GatewayV4.0.1, and is available with the CTG on all platforms. A different CICS ECI resource adapter is required specifically for WebSphereon z/OS. This is because WebSphere on z/OS does not implement a fullyJ2EE Connector Architecture compliant environment. That’s the bad news.The good news is because WebSphere on z/OS isn’t constrained to the J2EEConnection Architecture specification, it can use RRS to provide two phasecommit (this is not available on distributed platforms).This resource adapter is currently only available with the CICS TransactionGateway V4.0.2 for z/OS.Note: To an application programmer, the interfaces they use to work witheither resource adapter are identical.Note that WebSphere on z/OS and CICS must run within the same system.To learn more about the J2EE Connector Architecture and the CICS ECIresource adapter, consult the IBM Redbook Java Connectors for CICS,SG24-6401 and Assembling Java 2 Platform Enterprise Edition Applications,SA22-7836.4From code to deployment: Connecting to CICS from WebSphere for z/OS

1.2 Development tool choicesWhen developing an enterprise application which uses the CICS ECI resourceadapter, there are two application programming tasks: Develop Common Client Interface code that uses the resource adapter toconnector to CICS. Develop a session bean that uses this connector code.IBM provides a set of development tools to help with this: VisualAge for Java Enterprise EditionThis tool provides a component called the Enterprise Access Builder whichcan automatically generate Common Client Interface code. This code isstored within a command bean. The command bean is built using a set ofwizards - no Java programming is required. WebSphere StudioCertain configurations of this tool contain a full J2EE developmentenvironment, allowing the development and test of session beans in aWebSphere environment.This Redpaper proposes using a combination of the products to achieve theapplication programming tasks outlined above.Note: Since this Redpaper was first published, WebSphere Application Serverfor z/OS has introduced support for enterprise services generated inWebSphere Studio Application Developer Integration Edition. This is now thestrategic way to develop applications that use the CICS ECI resource adapter.We generally recommend using this enterprise services approach ahead ofthe development approach described in this Redpaper. However, as a startingpoint, you may wish to follow the approach documented here first, beforemoving on to the world of enterprise services.The application development approach described in this Redpaper is shown inFigure 1-3.Chapter 1. Overview5

WebSphere Application ServerWebSphere StudioSession beanVisualAge for JavaCommandbeanCICS ECI resource adapterCICS TSBusinessLogicProgramFigure 1-3 Recommended development toolsWhy VisualAge for JavaIf you did not use VisualAge for Java you would have to write the Common ClientInterface code yourself. The Enterprise Access Builder automatically generatesthis code for you into a command bean. The user of the command bean can treatit as a black box; using the command bean’s exposed methods to interact withthe enterprise system without having to understand how the command beaninternally interfaces with the CICS ECI resource adapter.Why WebSphere StudioIBM has significantly overhauled its development tooling, and introduced the newWebSphere Studio tool. This tool comes in several configurations, ranging from asimple Web page development configuration, to a full J2EE applicationdevelopment and test configuration. The following two configurations ofWebSphere Studio can be used to develop J2EE enterprise applications: WebSphere Studio Application Developer WebSphere Studio Application Developer Integration EditionBoth of these configurations provide tools to generate session beans, and to testthese beans in a powerful WebSphere Application Server test environment. Forour purposes, the difference between these two configurations lies in the qualityof the test environment: WebSphere Studio Application DeveloperThis configuration does not contain a J2EE Connector Architecture complianttest environment. Therefore the CICS ECI resource adapter classes must beimported into the WebSphere test environment, and the connections to theresource adapter will not be managed by the test environment. This is anon-managed environment.6From code to deployment: Connecting to CICS from WebSphere for z/OS

WebSphere Studio Application Developer Integration EditionThis configuration contains a J2EE Connector Architecture compliant testenvironment, and ships with the CICS ECI resource adapter (the non-z/OSversion) already installed into the WebSphere test environment. Connectionsto the resource adapter are managed by the test environment. This is amanaged environment.What other options do I haveBefore committing to the mix of development tools recommended by thisRedpaper, you probably want to at least hear what alternatives are available.This section describes them.The all-VisualAge for Java approachIn addition to providing the Enterprise Access Builder, VisualAge for Javaprovides a full EJB development and test environment. So why not use that tobuild session beans, and have the advantage of performing all of the applicationdevelopment tasks in a single tool? Here’s why: VisualAge for Java supports the EJB 1.0 specification, whilst WebSpheresupports the EJB 1.1 specification. Although the Application Assembly Toolcan convert a session bean from the EJB 1.0 specification to 1.1, it isadvisable to develop to the same level of specification as you intend to deploy.WebSphere Studio supports EJB 1.1. VisualAge for Java does not support the J2EE 1.2 packaging model of EARand WAR files. Again this then becomes a job for the Application AssemblyTool. WebSphere Studio supports the packaging model. VisualAge for Java provides limited Web application support. It does not, forinstance, contain an HTML editor. WebSphere Studio has dedicated Webapplication support. The VisualAge for Java EJB test environment provides limited functionality incomparison to WebSphere Studio.The all-WebSphere Studio approachWebSphere Studio is IBM’s strategic development tool of choice, so why not usethat for the entire development work? Here’s why: Without VisualAge for Java’s Enterprise Access Builder you have to writeCommon Client Interface code manually. Enterprise Access Builder provides a utility to take COBOL COMMAREAsand turn them in to J2EE Connector Architecture compliant Java records. Therecord classes automatically perform ASCII to EBCDIC and code pageconversion. In WebSphere Studio you would have to write these records -and the conversion routines -- yourself.Chapter 1. Overview7

The enterprise services approachNote: Since this Redpaper was originally published, WebSphere ApplicationServer for z/OS has introduced support for enterprise services generated inWebSphere Studio Application Developer Integration Edition via ServiceLevel 4 delivered in September 2002.WebSphere Studio Application Developer Integration Edition contains anEnterprise Services component which can generate session beans or Webservices that use the J2EE Connector Architecture to communicate withenterprise systems such as CICS. It also contains a Service Flow engine togroup together multiple enterprise services, thereby grouping together a flow ofcommunications to enterprise systems. This Service Flow engine is similar inconcept to Navigators in the Enterprise Access Builder. WebSphere ApplicationServer for z/OS, with Service Level 4, supports the deployment of simpleenterprise services, but does not support Service Flows.The enterprise services approach is the strategic way for generating applicationcode for any J2EE resource adapter, including the CICS ECI resource adapter.The Windows Notepad approachWho needs a development environment at all? Why not just develop the entireapplication in a text editor? Well, where shall we start. how would you test,debug, maintain, and version this code? Hopefully this is one approach you cangleefully discount instantly!1.3 The example used in this RedpaperThis Redpaper provides step-by-step instructions on how to: Prepare the development tools for use with the CICS ECI resource adapter. Develop and test an enterprise application that uses this resource adapter tocommunicate with CICS. Configure WebSphere on z/OS to use the CICS ECI resource adapter, andthen deploy the enterprise application to WebSphere on z/OS.To help describe this process these instructions describe how to build anexample called Trader. This is a stock trading application that allows a user to buyand sell shares in numerous companies. Trader is a CICS business logicprogram, and this Redpaper describes how to build an enterprise application inWebSphere to drive this CICS program, using the CICS ECI resource adapter.The completed Trader application components are shown in Figure 1-4.8From code to deployment: Connecting to CICS from WebSphere for z/OS

WebSphere Application ServerWeb containerHTMLJSPsTraderServletCICS TSEJB containerTraderBeanTraderCommandCICS ECI resource adapterTRADERBLFigure 1-4 The Trader applicationThis Redpaper describes how to build the following components:1. Use VisualAge for Java’s Enterprise Access Builder to build a command bean(TraderCommand) which can link to the CICS program TRADERBL. Thiscommand bean uses the CICS ECI resource adapter to perform interactionswith CICS.2. Import the command bean in to WebSphere Studio and wrapper it in asession bean (TraderBean). Write some business methods in the sessionbean such as buy shares, sell shares, and get stock quotes. These businessmethods use the command bean to invoke business logic functions in theCICS Trader application.3. Import a pre-built Web project into WebSphere Studio which contains a Webapplication to front end Trader, and a Java servlet (TraderServlet) thatinvokes the session bean.4. Export the completed enterprise application so it can be deployed toWebSphere on z/OS.

x From code to deployment: Connecting to CICS from WebSphere for z/OS Martin Keen is an Advisory IT Specialist, working as a consultant in Software Group Services at IBM UK ’s Hursley Laboratory. He writes and teaches extensively in the area of