Advantage Gens Java Journey to J 2 EE

  • Slides: 60
Download presentation
Advantage™ Gen’s Java Journey to J 2 EE William “RED” Davidson Computer Associates Gen

Advantage™ Gen’s Java Journey to J 2 EE William “RED” Davidson Computer Associates Gen 102 March 31, 2003 1

Agenda • • Introduction Java Generation Web Client Generation EJB Generation Demonstration EJB Interoperability

Agenda • • Introduction Java Generation Web Client Generation EJB Generation Demonstration EJB Interoperability with GUI C Clients and Proxies Questions 2

Advantage Gen Heritage • • Model-based development Complete end-to-end solution 100% code generation Goal:

Advantage Gen Heritage • • Model-based development Complete end-to-end solution 100% code generation Goal: One model – Generate for… – – Any supported OS (MVS, UNIX, Windows. . . ) Any supported TP monitor (CICS, IMS, Tuxedo. . . ) Any supported DBMS (DB 2, MS/SQL, Oracle…) Any supported • • • 3

Advantage Gen Java Generation Design Goal Generate a complete Java™ 2 Platform, Enterprise Edition

Advantage Gen Java Generation Design Goal Generate a complete Java™ 2 Platform, Enterprise Edition (J 2 EE™) application from an Advantage Gen Client/Server model without modification. 4

J 2 EE is. . . • Related set of specifications (J 2 SE,

J 2 EE is. . . • Related set of specifications (J 2 SE, JSP, EJB, etc. ) • Defines the entire application; from the client presentation to the server – Multitiered distributed application model – Transaction control – Security model • The version of J 2 EE implies versions of other specifications 5

J 2 EE Contents, Partial Listing Java™ 2 Platform, Standard Edition Enterprise Java. Beans™

J 2 EE Contents, Partial Listing Java™ 2 Platform, Standard Edition Enterprise Java. Beans™ (EJB) Java. Server Pages™ (JSP) Java™ Servlet Java™ Database Connectivity (JDBC™) Java Naming and Directory Interface™ (JNDI) Java™ Transaction API (JTA) J 2 EE 1. 3 Current J 2 EE 1. 4 Future 1. 3 2. 0 1. 2 2. 3 2. 1 1. 2 1. 0. 1 1. 4 2. 1 2. 0 2. 4 3. 0 1. 2. 1 1. 0. 1 6

What version of J 2 EE will Advantage Gen Support? Advantage Gen 6. 5

What version of J 2 EE will Advantage Gen Support? Advantage Gen 6. 5 is designed for J 2 EE 1. 3 7

Advantage Gen follows the following model Take from the Sun’s J 2 EE Tutorial

Advantage Gen follows the following model Take from the Sun’s J 2 EE Tutorial 8

Advantage Gen 6. 5 Java Generated Application Web Browser Advantage Gen Client • HTML

Advantage Gen 6. 5 Java Generated Application Web Browser Advantage Gen Client • HTML Presentation • 100% Generated HTML & Java. Script Web Server Servlet Engine Advantage Gen Server • Generated Java Code • Database Access via JDBC • Runtimes rewritten in Java; • Generated Java Code Portable to any Java 2 Server New • Database Access via JDBC • Runs within an EJB Container 9

Java Generation 10

Java Generation 10

Action Diagram Java Generation • Design Goals – Functionally equivalent to C – Ensure

Action Diagram Java Generation • Design Goals – Functionally equivalent to C – Ensure Java portability – Performance • Generated code written to the Java 2 Language spec • No bias for the client or the server • Supported by a 100% Java Gen Runtime 11

Support for Advantage Gen Features • • Support both Gen RI and DBMS RI

Support for Advantage Gen Features • • Support both Gen RI and DBMS RI Decimal Precision implemented as Big. Decimal Support full 6 -digit microseconds in timestamps Diagram Trace Facility User Exits External Action Blocks New Multiple database support 12

Designed for High Performance • Applied lessons learned from the Java Proxy • Cache

Designed for High Performance • Applied lessons learned from the Java Proxy • Cache anything that can be cached (views, attributes, runtime objects, etc. ) • Very careful with synchronization; only performed when absolutely necessary 13

Restrictions • Asynchronous Flows – Java Web Clients • Ignored by design – EJBs

Restrictions • Asynchronous Flows – Java Web Clients • Ignored by design – EJBs • Action Diagram Async statements will be supported • They will execute Synchronously – Java Proxy • Fully Supported 14

Web Generation Java Web Clients 15

Web Generation Java Web Clients 15

Java Web Client Generation • Advantage Gen will generate the applications UI as HTML,

Java Web Client Generation • Advantage Gen will generate the applications UI as HTML, Cascade Style Sheets and Java. Script – Tested against Internet Explorer 5. 5 & 6. 0 and Netscape 6. x • Load Modules and Trancodes are generated as JSPs • The JSPs call the Servlet Manager, a Servlet that will find the correct Pstep and invoke it • Psteps (and Action Blocks) are generated as Java classes 16

No More Cookies or Applets • Cookies – Advantage Gen 6. 5 no longer

No More Cookies or Applets • Cookies – Advantage Gen 6. 5 no longer needs to store info such as session id, code page, history, etc. Now use Web Server facilities for session management or hidden form fields. • Applets – Advantage Gen 6. 5 no longer generated for permitted value and edit pattern checking 17

Advantage Gen 6. 5 Enhancements • HTML Editing – Enhance capabilities for customers to

Advantage Gen 6. 5 Enhancements • HTML Editing – Enhance capabilities for customers to customize HTML pages outside of Advantage Gen • Drop-down Menus, horizontal & vertical (Java. Script) • HTML Pages without Frames • Support for Scroll. Top, Scroll. Bottom, Gain. Focus and Lose. Focus events • Dragable scrolling thumb added to tables 18

Advantage Gen 6. 5 Enhancements • • Support “Disable by” Style Sheet Templates In-memory

Advantage Gen 6. 5 Enhancements • • Support “Disable by” Style Sheet Templates In-memory session management Message Boxes Dialog Boxes Dynamic Page Updates Queuing Browser Events 19

Coopflows for Web Clients • • • Java Web Client to C and COBOL

Coopflows for Web Clients • • • Java Web Client to C and COBOL Servers TCP/IP MQ Series ECI New Tuxedo • Java Web Client to EJB Servers using Java RMI 20

EJB Generation 21

EJB Generation 21

Advantage Gen EJBs • Design Goal: Generate well-behaved EJBs that comply with all applicable

Advantage Gen EJBs • Design Goal: Generate well-behaved EJBs that comply with all applicable standards • Target the J 2 EE 1. 3 and EJB 2. 0 specifications • Procedure Steps implemented as Stateless Session Beans • Load modules become EJB-JAR files • Uses the same Java action block generator as the Java Web Client 22

Advantage Gen EJBs • Communications between Client and Server (and between Servers) are via

Advantage Gen EJBs • Communications between Client and Server (and between Servers) are via Serialized Views and RMI • Procedure Steps manage their own transaction using the Java Transaction API to support the Advantage Gen Transaction Retry feature • All database access via JDBC 23

Limitless Views • No 32 K Limit • Limit designed-out of Java generated code

Limitless Views • No 32 K Limit • Limit designed-out of Java generated code and runtimes • No design limit for Java Web Client to EJB Servers via Serialized Views over RMI • No design limit for EJB Servers to EJB Servers via Serialized Views over RMI • There may be limits imposed by application server vendors 24

Support for Advantage Gen Features • Java Web Client to EJB Server Flows –

Support for Advantage Gen Features • Java Web Client to EJB Server Flows – Server Pstep (EJB) will default to not use the Client’s transaction context • EJB Server to EJB Server Flows – A Pstep implemented as an EJB may flow to another Pstep implemented as an EJB – Target Pstep (EJB) does not have to be on the same EJB server – Target Pstep (EJB) may or may not use transaction context 25

Server to Server Interoperability Support EJB Server • EJB Servers may flow to non-EJB

Server to Server Interoperability Support EJB Server • EJB Servers may flow to non-EJB Servers • Use TCP/IP, MQ, ECI or Tuxedo Coopflows • Distributed transactions will not be supported • Examples: C, COBOL Server • TCP/IP to CICS • TCP/IP to IEFAE on UNIX 26

Server to Server Interoperability Support EJB Server • Flows from non-EJB Servers to EJB

Server to Server Interoperability Support EJB Server • Flows from non-EJB Servers to EJB servers are not supported C, COBOL Server 27

Support for CBD • View names are more readable; rather than “a_0068766385_ia”, names generated

Support for CBD • View names are more readable; rather than “a_0068766385_ia”, names generated as “<Member. Name>_IA” • Transactional public operations will be built as EJBs • Subtransactional public operations will be built as classes • See documentation for package name requirements 28

Application Servers • Tested app servers – JBoss 2. 4. 4 with Tomcat 4.

Application Servers • Tested app servers – JBoss 2. 4. 4 with Tomcat 4. 0. 1 – JRun 4. 0 – Web. Logic 6. 1 – Web. Sphere 4. 0. 4 • Any J 2 EE 1. 3 app server may be used, but problems should be reproduced on one of the above to obtain support. 29

Constructing an Advantage Gen J 2 EE Application 30

Constructing an Advantage Gen J 2 EE Application 30

Construction Overview • Generate on the Windows Workstation Toolset or the Client/Server Encyclopedia •

Construction Overview • Generate on the Windows Workstation Toolset or the Client/Server Encyclopedia • Build on a Windows Workstation only • Deploy using Advantage Joe • Test on a small-scale system (i. e. Windows) – Diagram Trace should be limited to a single-user App Server • Use Advantage Joe to redeploy the application to your test or production Application Server 31

Things to do Before Generation • Install software (J 2 SE, J 2 EE,

Things to do Before Generation • Install software (J 2 SE, J 2 EE, Advantage Joe, Advantage Gen) • Determine how the DTDs are to be references during deployment • Determine how the Advantage Gen runtimes are to be placed on the App Server • Modify your Client/Server model… – (Optional) Mark attributes as Decimal Precision – (Required for CBD) Add Java package name(s) to the model – (Optional) Update Load Module properties • Define the Resource Adapter • Update Build Tool Setup File 32

Determine DTD Access • The deployment descriptors contain a reference to DTDs • During

Determine DTD Access • The deployment descriptors contain a reference to DTDs • During deployment, the App Server will validate the contents of the deployment descriptor by reading the DTD • Three possibilities where DTDs may be located: – On Sun’s web site – On the corporate intranet – On the computer’s file system • The DTDs should always be available for reference 33

Determine Advantage Gen Runtime Placement • Advantage Gen runtimes are required to execute Java

Determine Advantage Gen Runtime Placement • Advantage Gen runtimes are required to execute Java Web Clients and EJBs • Options for getting the Advantage Gen runtimes onto the App Server: – Place them in the EAR file • One copy per application • Possible User Exit and PTF issues • Some App Servers will not allow this – Place them in a common location • Usually, the lib/ext directory • Easier User Exits and PTF maintenance • May require a restart of the app server for changes to take effect 34

Resource Adapter Definition • At some point before running the application, the Resource Adapter

Resource Adapter Definition • At some point before running the application, the Resource Adapter for the database must be defined • Manual process, usually done only once • Process is different for each app server • Creates the resource in the App Server that the application will use to access the database via JDBC • Copy the JDBC driver to the App Server’s directory 35

Demonstration Generate, Build, Deploy, Execute and Test • Dell Latitude CPi, P II, 366

Demonstration Generate, Build, Deploy, Execute and Test • Dell Latitude CPi, P II, 366 Mhz, 256 MB • Windows 2000 SP 3 • Advantage Gen 6. 5 • Advantage Joe 3. 0 • Sun J 2 SE 1. 3. 1_05 • Sun J 2 EE 1. 3. 1 • JBoss 2. 4. 8 + Tomcat 4. 0. 4 • Oracle 9. 0. 1. 1. 1 36

Generation may take place on the Windows Workstation or the CSE • Web Clients

Generation may take place on the Windows Workstation or the CSE • Web Clients – OS: – DBMS: – Lang: – TP Mon: JVM JDBC* Java Internet • EJB Servers – OS: – DBMS: – Lang: – TP Mon: – Comm: * DBMS may be any supported DBMS (DB 2, MS/SQL, etc. except ODBC) rather than JDBC JVM JDBC* Java EJB Java RMI 37

Build • Build may only take place on the Windows NT/2000/XP-Pro system (no Windows

Build • Build may only take place on the Windows NT/2000/XP-Pro system (no Windows 98) • Building EJBs appears much the same as other servers • Results of the build: – <lm>. jar The executable code – <lm>_dpy. jar Contains the portable interface definitions; the Home and Remote; used by all clients 38

Deployment Overview 1 Select LMs to deploy, then. . . Deploy 2 Advantage Gen

Deployment Overview 1 Select LMs to deploy, then. . . Deploy 2 Advantage Gen EAR File Deployment Dialog 3 Files JAR Files Compiled Web Clients and/or EJBs EAR File Updated Deployment Descriptors 4 5 Advantage Joe Deployment Wizard App Server 39

Deploy Button Once the Advantage Gen Load Modules to be deployed (from the same

Deploy Button Once the Advantage Gen Load Modules to be deployed (from the same model) have been selected, clicking the Deploy button will cause the EAR File Deployment Details dialog box to appear. 40

EAR File Deployment Details Dialog 41

EAR File Deployment Details Dialog 41

EAR File Deployment Details Dialog • Specify the properties of the EAR file including

EAR File Deployment Details Dialog • Specify the properties of the EAR file including its name, the J 2 EE Compliance Level, etc. • If a Java Web Client has been selected for deployment, specify the WAR file properties including its name, default context, etc. • Info on the dialog stored in the file DEPLOY. ICM • All fields described in detail in the ebook EJB Generation Option Guide 42

Application Assembly by Advantage Gen Build Tool • The build tool executes a script

Application Assembly by Advantage Gen Build Tool • The build tool executes a script that performs the following tasks: – The files of the selected Java Web Clients and/or EJBs are placed into the EAR file – The generated deployment descriptors are updated with information from the EAR File Deployment Details dialog box • At this point, Advantage Gen has created a complete EAR file that is compliant with the J 2 EE specifications not specific to any application server. 43

Application Deployment via Advantage Joe • If requested, the Advantage Joe Deployment Wizard is

Application Deployment via Advantage Joe • If requested, the Advantage Joe Deployment Wizard is launched – Asks which application server to which the EAR will be deployed – Copies the EAR file and customize it for the target App Server – Perform the deployment to the target App Server • If Joe is not used, the customer must manually customize (if required) and deploy the generated EAR file to the target Application Server. 44

Application Deployment via Advantage Joe New Advantage Gen Deployment Status Dialog Joe Deployment Wizard:

Application Deployment via Advantage Joe New Advantage Gen Deployment Status Dialog Joe Deployment Wizard: • Intro panel • Select Server & Profile • Customize Server Profile • EAR file contents; Edit the XML • Summary Dialog 45

Application Availability • For App Servers that support Hot Deployment, the application is available

Application Availability • For App Servers that support Hot Deployment, the application is available immediately. • For App Servers that support a command line interface, Joe will issue the commands to access and start the application. • Otherwise, must manually issue commands to the App Server to access and start the application. • Access the application with a web browser 46

Diagram Trace • Use the Network Trace Facility (NTF) • To run with trace:

Diagram Trace • Use the Network Trace Facility (NTF) • To run with trace: – Generate code with Trace – On the EAR File Deployment Details dialog: • Check “Enable Diagram Tracing” • Specify the host and port of the NTF • Start the NTF on your PC • Access the application to be traced 47

Application Maintenance • Advantage Gen always creates a new EAR file • Customers should

Application Maintenance • Advantage Gen always creates a new EAR file • Customers should CM the directories on the Windows system where the application was built 48

Offerings • Workstation Cross Generation and Deployment Option to EJBs for Windows – Comes

Offerings • Workstation Cross Generation and Deployment Option to EJBs for Windows – Comes with a full copy of Advantage Joe • Encyclopedia Server Cross Generation Option to EJBs 49

Summary • • • Customers need to do some planning before getting started (DTD,

Summary • • • Customers need to do some planning before getting started (DTD, Gen RT) May need to update your model Manually define the Resource Adapter Generate on Windows Workstation or CSE Build with the Windows Build Tool New Deploy button on Build Tool to assemble the application into a “generic” J 2 EE EAR file • Use Joe to specialize EAR and perform deployment • Diagram Trace via Network Trace Facility 50

Interoperability and Proxies 51

Interoperability and Proxies 51

Client to Server Interoperability Existing Coopflows GUI Client C, COBOL Server Selected * For

Client to Server Interoperability Existing Coopflows GUI Client C, COBOL Server Selected * For TP Monitors * TCP/IP, MQ, ECI or Tuxedo Coopflows EJB Server Web Client Java RMI Coopflow 52

EJB Converter Services • Allows the “old” world to talk to the “new” world

EJB Converter Services • Allows the “old” world to talk to the “new” world – From GUI C Client to EJB – From C/COM Proxy to EJB • For Windows Only (Win 98 and Win NT/2000/XP-Pro) 53

Option 1 - CFB Server GUI Client or C/COM Proxy CFB over TCP/IP CFB

Option 1 - CFB Server GUI Client or C/COM Proxy CFB over TCP/IP CFB Server Serialized Views and RMI EJB Server • CFB Server is a Java Program • Could execute on the Client, Server or some other system • Client must change target server IP address; deploy the <LM>_DPY. JAR file to the CFB Server system 54

Option 2 - C to RMI Coopflow GUI Client or C/COM Proxy C to

Option 2 - C to RMI Coopflow GUI Client or C/COM Proxy C to Java RMI Serialized Views and RMI EJB Server • Requires a JVM and new coopflow on all Clients • Deploy the <LM>_DPY. JAR file to client system • Must change COMMCFG. INI 55

Java Proxy Support • Java Proxy to communicate directly with the EJB Servers via

Java Proxy Support • Java Proxy to communicate directly with the EJB Servers via the Java RMI Coopflow • Can customers bypass the Java Proxy and just call the EJBs directly? Yes, but this is not recommended. EJBs expect to receive valid data. Java Proxy performs data validation. 56

Client to Server Interoperability GUI Client or C/COM Proxy C to Java + Java

Client to Server Interoperability GUI Client or C/COM Proxy C to Java + Java RMI Existing Coopflows TCP/IP CFB Server C, COBOL Server Selected * For TP Monitors * TCP/IP, MQ, ECI or Tuxedo Coopflows Web Client or Java Proxy EJB Server Java RMI Coopflow 57

EJB Documentation • All new guide (ebook as PDF) EJB Generation Option Guide <Gen-root>DOCadgen_650_ejb_gen.

EJB Documentation • All new guide (ebook as PDF) EJB Generation Option Guide <Gen-root>DOCadgen_650_ejb_gen. pdf • Updates will be placed on esupport. ca. com 58

Summary • Advantage Gen will generate a complete J 2 EE application from a

Summary • Advantage Gen will generate a complete J 2 EE application from a Client/Server Model • Action Language to be generated in Java • Application’s UI to be generated as Web Pages for display on a Web Browsers • Client Psteps execute on Web/JSP Servers • Server Psteps execute on Stateless Session EJB • Joe can be used to specialize and deploy the EAR to various Application Servers • Facilities to provide interoperability for GUI C Clients to utilize the new EJB Servers • Support C, COM and Java Proxies 59

? Questions & Answers 60

? Questions & Answers 60