S110 gse - liberte egalite fraternite

download S110 gse - liberte egalite fraternite

If you can't read please download the document

Transcript of S110 gse - liberte egalite fraternite

1. 2015 IBM CorporationLibert, galit, Fraternit Michael Jones Test Lead Liberty in CICS [email protected] 2. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation IBMs statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBMs sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. 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 users 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. 3. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation 4. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation CICS Liberty's 'Sunshine Room' 5. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation What is Liberty? Lightweight application server created by WebSphere Easily configurable opt-in customisation model Runs on many platforms (Both distributed and z/OS) Now integrated into CICS! 6. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation What does Liberty buy me? Support for the Java EE 6 Web Profile Support for a number of Java EE technologies HTTP endpoint for applications Ability to closely integrate front end applications with CICS 7. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty in CICS Extending JVM servers for the web 8. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Where do I start? 9. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Many familiar JVM profile options are still valid. WLP_INSTALL_DIR specifies this JVM server as a Liberty JVM server. Like regular JVM servers, you can make use of health center to help you monitor your JVM server You can use the JVM profile to specify the ports you want to use. Auto-configure causes Liberty to create required files on start-up (We recommend that you disable set this to false after first startup) JAVA_HOME=/usr/lpp/java/J7.0_64 WORK_DIR=/u/cicsuser/workdir OSGI_FRAMEWORK_TIMEOUT=60 -Dfile.encoding=ISO-8859-1 WLP_INSTALL_DIR=&USSHOME;/wlp -XhealthCenter -Xhealthcenter:port=12345 -Dcom.ibm.cics.jvmserver.wlp.server.http.port=23456 -Dcom.ibm.cics.jvmserver.wlp.server.https.port=34567 -Dcom.ibm.cics.jvmserver.wlp.autoconfigure=true 10. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Installing your Liberty-enabled JVM server 11. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Administrating & configuring Liberty JVM servers 12. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Administrating & configuring Liberty JVM servers 13. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty unique configuration USS files WLP_USR_DIR - Specifies the location where your usr directory will be created. This will contain all of your Liberty configuration files. WLP_OUTPUT_DIR Specifies the directory where your Liberty server will place any output files. InstalledApps.xml Installed CICS bundles are listed here Messages.log Liberty's log file Server.xml Server configuration file Tranlog Files required by Liberty to track transactions Workarea Runtime files required for Liberty 14. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty unique configuration Server.xml cicsts:core-1.0jsp-2.2wab-1.0blueprint-1.0ssl-1.0 15. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty configuration Logging and monitoring 16. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation More on messages.log ******************************************************************************** product = CICS Transaction Server for z/OS 5.2.0, CICS LIBERTY NOTUSAGE, WebSphere Application Server 8.5.5.3, WAS FOR Z/OS 8.5.5.3 (wlp-1.0.6.cl50320140905-1604) wlp.install.dir = /cics/cics690/wlp/ server.config.dir = /u/michaej/jatp/BEANV/JATP1351/JATP1351/WLPJVMS/wlp/usr/servers/defaultServer/ java.home = /java/J7.1_64 java.version = 1.7.0 java.runtime = Java(TM) SE Runtime Environment (pmz6470_27sr2fp10-20141218_02 (SR2 FP10)) os = z/OS (01.13.00; s390x) (en_US) ******************************************************************************** [5/8/15 13:46:54:328 GMT] 00000023 com.ibm.ws.logging.internal.TraceSpecification I TRAS0018I: The trace state has been changed. The new trace state is *=info. [5/8/15 13:46:54:411 GMT] 00000023 com.ibm.ws.kernel.launch.internal.FrameworkManager A CWWKE0001I: The server defaultServer has been launched. [5/8/15 13:46:57:357 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0103I: Authorized service group PRODMGR is available. [5/8/15 13:46:57:357 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0103I: Authorized service group SAFCRED is available. [5/8/15 13:46:57:358 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0104I: Authorized service group LOCALCOM is not available. [5/8/15 13:46:57:358 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0104I: Authorized service group TXRRS is not available. [5/8/15 13:46:57:358 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0104I: Authorized service group WOLA is not available. [5/8/15 13:46:57:359 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0104I: Authorized service group ZOSDUMP is not available. [5/8/15 13:46:57:359 GMT] 0000002e com.ibm.ws.zos.core.internal.NativeServiceTracker I CWWKB0104I: Authorized service group ZOSWLM is not available. [5/8/15 13:47:04:861 GMT] 00000044 com.ibm.ws.tcpchannel.internal.TCPChannel I CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host * (IPv6) port 29540. [5/8/15 13:47:05:877 GMT] 00000036 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0015I: The server has the following interim fixes installed: PI29785,PI15943,PI26809. [5/8/15 13:47:05:877 GMT] 00000036 com.ibm.ws.kernel.feature.internal.FeatureManager I CWWKF0008I: Feature update completed in 6.884 seconds. [5/8/15 13:47:05:877 GMT] 00000036 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0011I: The server defaultServer is ready to run a smarter planet. 17. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation More on messages.log [5/8/15 13:47:24:002 GMT] 00000034 com.ibm.ws.config.xml.internal.ConfigRefresher A CWWKG0016I: Starting server configuration update. [5/8/15 13:47:24:005 GMT] 00000034 com.ibm.ws.config.xml.internal.XMLConfigParser A CWWKG0028A: Processing included configuration resource: /u/michaej/jatp/BEANV/JATP1351/JATP1351/WLPJVMS/wlp/usr/servers/defaultServer/installedApps.xml [5/8/15 13:47:24:089 GMT] 00000054 com.ibm.ws.config.xml.internal.ConfigRefresher A CWWKG0017I: The server configuration was successfully updated in 0.090 seconds. [5/8/15 13:47:24:372 GMT] 00000055 com.ibm.ws.app.manager.AppMessageHelper I CWWKZ0018I: Starting application com.ibm.cics.fv.wlp.BeanValidation. [5/8/15 13:47:25:162 GMT] 00000055 com.ibm.ws.webcontainer.osgi.webapp.WebGroup I SRVE0169I: Loading Web Module: com.ibm.cics.fv.wlp.BeanValidation. [5/8/15 13:47:25:164 GMT] 00000055 com.ibm.ws.webcontainer I SRVE0250I: Web Module com.ibm.cics.fv.wlp.BeanValidation has been bound to default_host. [5/8/15 13:47:25:170 GMT] 00000055 com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0016I: Web application available (default_host): http://sysplex2-dvipa62.hursley.ibm.com:29540/com.ibm.cics.fv.wlp.BeanValidation/ [5/8/15 13:47:25:175 GMT] 00000055 com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0001I: Application com.ibm.cics.fv.wlp.BeanValidation started in 0.809 seconds. ... [5/8/15 13:48:00:312 GMT] 0000005c com.ibm.ws.webcontainer.servlet I SRVE0242I: [com.ibm.cics.fv.wlp.BeanValidation] [/com.ibm.cics.fv.wlp.BeanValidation] [com.ibm.cics.fv.wlp.beanValidation.servlets.mainTestServlet]: Initialization successful. [5/8/15 13:48:18:193 GMT] 00000097 SystemOut O TEST [5/8/15 13:48:18:491 GMT] 00000098 SystemOut O Couldn't read items on queue: CICS QIDERR Condition(RESP=QIDERR, RESP2=0) [5/8/15 13:48:24:294 GMT] 00000034 com.ibm.ws.config.xml.internal.ConfigRefresher A CWWKG0016I: Starting server configuration update. [5/8/15 13:48:24:298 GMT] 00000034 com.ibm.ws.config.xml.internal.XMLConfigParser A CWWKG0028A: Processing included configuration resource: /u/michaej/jatp/BEANV/JATP1351/JATP1351/WLPJVMS/wlp/usr/servers/defaultServer/installedApps.xml [5/8/15 13:48:24:342 GMT] 0000009c com.ibm.ws.config.xml.internal.ConfigRefresher A CWWKG0017I: The server configuration was successfully updated in 0.050 seconds. [5/8/15 13:48:24:343 GMT] 00000096 com.ibm.ws.http.internal.VirtualHostImpl A CWWKT0017I: Web application removed (default_host): http://sysplex2- dvipa62.hursley.ibm.com:29540/com.ibm.cics.fv.wlp.BeanValidation/ [5/8/15 13:48:24:346 GMT] 00000096 com.ibm.ws.webcontainer.servlet I SRVE0253I: [com.ibm.cics.fv.wlp.BeanValidation] [/com.ibm.cics.fv.wlp.BeanValidation] [com.ibm.cics.fv.wlp.beanValidation.servlets.mainTestServlet]: Destroy successful. [5/8/15 13:48:24:387 GMT] 00000096 com.ibm.ws.app.manager.AppMessageHelper A CWWKZ0009I: The application com.ibm.cics.fv.wlp.BeanValidation has stopped successfully. ... [5/8/15 13:48:36:393 GMT] 0000006b com.ibm.ws.tcpchannel.internal.TCPChannel I CWWKO0220I: TCP Channel defaultHttpEndpoint has stopped listening for requests on host * (IPv6) port 29540. ... [5/8/15 13:48:37:088 GMT] 00000023 com.ibm.ws.kernel.launch.internal.FrameworkManager A CWWKE0036I: The server defaultServer stopped after 1 minutes, 42.677 seconds. 18. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Monitoring Liberty 19. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty configuration Installing applications Server Configuration /dropins CICS InstalledApps.xml CICS Bundle Jvmserver = DFHWLP 20. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Installing Applications CICS Bundles CICS Bundle EBA EAR WAR EJB OSGi Bundle 21. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Installing Applications - Dropins 22. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Installing Applications Application Tags 23. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation CICS and Liberty Available features 24. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Type 2 Datasources f 25. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Transactions in CICS Liberty Incoming requests CICS HTTP Request Liberty HTTP Endpoint CJSA URIMAP TCLASS Application work 26. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation User transactions in CICS Liberty - JTA The Java Transaction API allows programmers to define their own transactions, which can span multiple XA resources. 27. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation User transactions in CICS Liberty - JTA // Get the user transaction from the context InitialContext ctx = new InitialContext(); UserTransaction transaction = (UserTransaction) ctx.lookup("java:comp/UserTransaction"); // Begin the transaction transaction.begin(); // Do your CICS work TSQ targetTsq = new TSQ(); targetTsq.setName("RECORDS"); targetTsq.writeString("01:FRANK:500A"); // Rollback or commit the changes transaction.commit(); 28. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Security The angel process and CICS JCL for the angel process is provided by CICS in your USS home directory: USSHOME/wlp/templates/zos/procs/bbgzangl.jcl BBGZANGL RACF Liberty CICS 29. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Security The angel process and CICS Protected with cicsAllAuthenticated role/*cicsAllAuthenticated 30. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Z/OS Connect in CICS A unified mobile-friendly interface for z/OS resources and services 31. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Z/OS Connect in CICS cicsts:zosConnect-1.0 {"zosConnectServices":[ {"ServiceName":"Test Service", "ServiceDescription":"Simple service for testing.", "ServiceProvider":"com.ibm.cics.wlp.zosconnect.CICSEndpointServiceImpl", "ServiceURL":"https://winmvs2c.hursley.ibm.com:29461/zosConnect/services/Test Service"}]} 32. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation JCICS and Liberty protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Set up the output stream ServletOutputStream out = response.getOutputStream(); // Get the current CICS task Task task = Task.getTask(); try{ // Print out information from CICS out.println("Program name: " + task.getProgramName()); out.println("Transaction name: " + task.getTransactionName()); out.println("Task id: " + task.getTaskNumber()); out.println("User id: " + task.getUSERID()); } catch(InvalidRequestException e){ throw new IOException(e); } } 33. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty and the web - Servlets @WebServlet("/Read") public class Read extends HttpServlet { private static final long serialVersionUID = 1L; @PersistenceUnit(unitName = "cics.test.wlp.jpa.annotation.cics.datasource") EntityManagerFactory emf; /** * @see HttpServlet#HttpServlet() */ public Read() { super(); } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Get the customer number from the servlet parameters long id = Long.valueOf(request.getParameter("id")); // Retrieve the employee object EntityManager em = emf.createEntityManager(); Employee myEmployee = em.find(Employee.class, id); // Print out the retrieved information ServletOutputStream out = response.getOutputStream(); out.println("== SUCCESS =="); out.println("Found employee with id: " + myEmployee.getEMPNO()); out.println("Associated name is: " + myEmployee.getNAME()); } } 34. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty and the web JAX-WS @WebService @SOAPBinding(style=SOAPBinding.Style.RPC) public interface SimpleCicsService { @WebMethod public String callService(); } A Java API for building web services and clients which communicate using XML. 35. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Liberty and the web JAX-WS @WebService(endpointInterface="com.ibm.cics.fv.wlp.jaxws.simple.cics.service.definition.SimpleCicsService") public class SimpleCicsServiceImpl implements SimpleCicsService { /** * Writes data to a TSQ and reads it back off the queue */ public String callService() { // Set up the CICS objects TSQ tsq = new TSQ(); ItemHolder data = new ItemHolder(); tsq.setName("JAXWS"); try { // Write to the queue and read it back tsq.writeString("This data was written by a JAXWS web service"); tsq.readNextItem(data); } catch (Exception e) { return e.getMessage(); } // Return the data return data.getStringValue(); } } 36. 2015 IBM Corporation Deploying CICS with Right Clicks - An Introduction to CICS Deployment Assistant v5.2 - S110 2015 IBM Corporation Bean Validation @Target(value={ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE}) @Retention(value=RetentionPolicy.RUNTIME) @Constraint(validatedBy={TSQValidator.class}) @Documented public @interface ValidTsq { public String message() default "Tsq must already exist in CICS and contain at least 1 item."; public Class[] groups() default {}; public Class