connecting nonstop applications to j2ee - please login j2ee architecture firewall client tier web...

23
Connecting Connecting Connecting Connecting NonStop NonStop NonStop NonStop Applications Applications Applications Applications to J2EE to J2EE to J2EE to J2EE Lars Linder, MyTravel Northern Europe AB Michael Horst, comForte GmbH

Upload: vonguyet

Post on 03-Mar-2018

236 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

ConnectingConnectingConnectingConnecting NonStop NonStop NonStop NonStop ApplicationsApplicationsApplicationsApplications to J2EE to J2EE to J2EE to J2EE

Lars Linder, MyTravel Northern Europe ABMichael Horst, comForte GmbH

Page 2: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Facts about Mytravel Northern Europe

• Owned by MyTravel plc in UK

• One of the leading tour operators in Northern Europe

• 15 operating brands in 4 countries:Sweden, Norway, Denmark, Finland

• 3,000 employees

• 1.500.000 passengers per year

• 200 destinations in 40 countries

• 11 aircrafts

Page 3: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Mytravel’s Applications & Environment

• Tandem users since 1978

• Traditional Cobol Pathway and batch environment

• First web in 1997 (Microsoft & iTP Webserver)

• Java since 2001

• 25 web sites today – will be replaced by one web

Page 4: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

The Key Issue: Access legacy Cobol Pathway servers

MyTravel at the leading edge: We have tried it all• CGI• ATP• Servlets/JPathsend• JSP/Servlets/JPathsend

Looking for a Standard Environment to support web, java and .NET clients:

• J2EE• Expose application functionality with standard interfaces

Original idea• J2EE applications executing on NonStop• Use JPathsend to access Cobol servers

Page 5: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

J2EE Architecture

Firewall

Client Tier

Web Container

EJB Container

(Servlets,JSP, HTML, XML)

EJBEJB EJBEJB

EJBEJB

Middle Tier AS

EIS Tier

JNDI API,JMS API,JavaMailServices

Enterprise Information

System

Key: Hypertext Markup Language (HTML), Extensible Markup Language (XML), JavaServer Pages (JSP), Java Naming and Directory Interface (JNDI), Java Message Service (JMS), Enterprise Information System (EIS),Application Server (AS), Enterprise Java Bean (EJB)

(RDBMS,ERP,Legacy Application)

Page 6: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Central Approach

Client Tier

EJB Container

EJBEJB EJBEJB

EJBEJB

Middle Tier AS

EIS Tier

HP NonStop System

Key: Enterprise Information System (EIS), Application Server (AS), Enterprise Java Bean (EJB)

Enterprise Information

System

• BEA WebLogic Server on NonStop• JBDC and JToolkit (JPathsend) for EIS access

Page 7: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

MyTravel‘s experiences with theCentral Approach

• Started with Tandem’s EAS• WebLogic on NonStop

• Problems as early adopter• Performance Problems• Architectural Drawbacks

• Development & Test much more complex• Application cannot be moved to other EAS platforms due to

propriatary JPathsend

• Weblogic on NonStop was no success• BEA WebLogic also on Windows

Page 8: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

„Hybrid“ Approach

• J2EE Appplication server on farm of commodity machines• ANY standard AS

• JBoss, IBM WebSphere, BEA Weblogic, ….

• JDBC Type 4 driver for SQL access• How to connect legacy Pathway servers?

Client Tier

EJB Container

EJBEJB EJBEJB

EJBEJB

Middle Tier AS

EIS Tier

HP NonStop System

Key: Enterprise Information System (EIS), Application Server (AS), Enterprise Java Bean (EJB)

Enterprise Information

System

Page 9: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

The J2EE Connector Architecture

Client Tier

EJB Container

EJBEJB EJBEJB

EJBEJB

Middle Tier EIS Tier

Database

PathwayServer

Key: Enterprise Information System (EIS), Application Server (AS), Enterprise Java Bean (EJB), Common Client Interface (CCI)

Application Server

NonStopAdapter

System Contracts

CCI

Page 10: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

JSL – J2EE Server Link

• J2EE-compliant Resource Adapter for Pathwayapplications

• Implements the „Java Connector Architecture“specification

• Works with BEA Weblogic, IBM WebSphere, JBossand other standard J2EE Application Servers

• Uses CSL as Transport Layer, no OSS/Java requiredon NonStop

Page 11: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

JSL – J2EE Server Link

Page 12: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

JSL in BEA WLS

Page 13: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Hybrid J2EE in Real Life

N o n S t o p S - S e r i e s

• 3 Million Transactions per day on average• 300 TPS Peak• Architecture allows for 30 Million Transactions per day

Page 14: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

MyTravel’s perspective on the Hybrid Approach

• Advantages of using a standard JCA Adapter• The java code can execute on any platform• The development have moved completly to the pc

• Advantage of JSL• No Java required in NonStop• Delivers the performance required

Page 15: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Developing with JSL: A Sample

ERB communicating to the ENABLE General Server to read an ENSCRIBE file

EJB Container

NonStop System

VIP

Key: Enterprise Information System (EIS), Application Server (AS), Enterprise Java Bean (EJB), EnableGS (EGS), EnscribeReaderBean (ERB), Data Definition Language (DDL), Common Client Interface (CCI),Java Server Link (JSL)

NonStopAdapter

Web Container

(Servlets,JSP, HTML, XML)

EGSEGS

JSL ServerComponent

(JSL)ERBERB

Client

Conversion of DDL

Sending a request tothe Pathway Server

Formating a request and retrieving response data

Page 16: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

DDL Conversionpackage ddl;import java.util.Vector;public class Vip implements

com.comforte.csl.utils.CSLSerializable{

protected String vipNumber;protected Name name;protected String sex;protected String dateOfBirth;protected String placeOfBirth;protected String nationality;protected String familyStatus;protected String children;protected String phone;protected String mobile;protected Address address;public Vip() {}public String get VipNumber() {

return vipNumber;}public void set VipNumber(String theVipNumber) {

vipNumber = theVipNumber;}// ... all other getter and setterspublic Integer size(String propName) {

if(propName.equals(" vipNumber")) return new Integer(5);

else ... // and so on

elsereturn new Integer(0);

}public String[] getPropertyOrder() {

String [] positions = new String[14] ;

positions[0] = " vipNumber";positions[1] = " name";... // and so on

return positions; }

}

RECORD VIP.FILE is VIP KEY-SEQUENCED.05 VIP-number PIC 9(5) HEADING "VIP-

number".05 Name.

10 Surname PIC X(30) HEADING "Surname".

10 Given-names PIC X(30) HEADING "Given …".

05 Sex PIC X(1) HEADING "Sex".

05 Date-of-Birth PIC 9(8) HEADING "Date …".

05 Place-of-Birth PIC X(30) HEADING "Place …".

05 Nationality PIC X(30) HEADING "Nation…".

05 Family-Status PIC X(1) HEADING "Family …".

05 Children PIC X(1) HEADING "Children".

05 Phone PIC X(20) HEADING "Phone".

05 Mobile PIC X(30) HEADING "Mobile".

05 Address10 Street PIC X(30).10 ZIP PIC 9(5).10 City PIC X(30).

KEY IS VIP-number.KEY "NA" IS Name.END

• Use the JSL tools to convert the DDL structures into Java Classes

Page 17: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Coding the EJB

• Formatting a request and retrieving response data

• Sending the Request to the Pathway Server

/* * get the response structure from the CCI*/

JSLInputStream in = getJSLInputStream(/*CCI*/);vip = (Vip) in.readObject(vip.getClass());

…Name name = vip.getName();String surname = name.getSurname();String givennames = name.getGivenNames();

/** Look up NonStop Adapter*/

connectionFactory = applicationServer.lookup(/*JSL*/ );/*

* get connection from connection pool*/ connection = connectionFactory.getConnection( /*Use r, Password*/);

/** execute multiple Pathsends to read complete file w ith ENABLEGS*/

interaction = connection.getInteraction();while (/*not EOF*/) {

interaction.execute(/* System, EnableGS, Data */);}

Page 18: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Using the EJB

Page 19: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Developing Complex Applications

• Multiple Pathway Servers, multiple EJB, Add & Update Transations

• Much Complextity handled by J2EE ApplicationServer

• For example: Transactions• No code changes!• Just state „Transactions Required“ for relevant EJBs• Everything else handled by Application Server and JSL

Adapter

Page 20: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

MyTravel’s current architecture

HP rx2200 Itanium / Windows 2003

HP Proliant / Windows 2003

MS IIS / .net Web application

Web Service requestor

Web Service

WLS / J2EE applications

JDBCT4 driver

JSLadapter

HP NonStop Server

WLS / J2EE applications

Legacy pathway applications

CSLadapter

Facade

Cobol85Server

JPathwayServerEJB

EJB EJB

EJBEJB

EJB

Internet

JDBC/SQLJ

JDBC (simple queries)

Scobol

Cobol85Server

Page 21: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

MyTravel‘s Future Goals

• Move Weblogic completely off NonStop

• Replace java by .NET • Like JSL for J2EE, CSL.NET provides Pathway

Server access from .NET Framework• JSL and CSL.NET use single infrastructure,

protecting our investment

• Move away from NonStop?

Page 22: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

Outlook: NonStop & J2EE

• J2EE as platform for Web & Integration Applications

• NonStop as J2EE application server platform?

• NonStop as back-end for mission-critical J2EE applications

Page 23: Connecting NonStop Applications to J2EE - Please Login J2EE Architecture Firewall Client Tier Web Container EJB Container (Servlets, JSP, HTML, XML) EJB EJB EJB MiddleTier AS EIS Tier

ConnectingConnectingConnectingConnecting NonStop NonStop NonStop NonStop ApplicationsApplicationsApplicationsApplications to J2EE to J2EE to J2EE to J2EE

Questions?