Integration of Legacy Software in EJB Software Engineering
Integration of Legacy Software in EJB Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 -3890 Sponsored by the U. S. Department of Defense © 1999 by Carnegie Mellon University Version # Symposium 99. - page 1
Agenda Types of legacy systems Integrating legacy business logic Integrating legacy data © 1999 by Carnegie Mellon University Version # Symposium 99. - page 2
Types of “Legacy” Infraestructures Data • Mainframes • Non-relational data bases • File systems. . . Systems: Data + Logic (Niklaus Wirth) • TP monitors, COBOL systems • ERP systems • CORBA and COM servers © 1999 by Carnegie Mellon University Version # Symposium 99. - page 3
Integrating Legacy Business Logic Keep and leverage investment Access our old system through a new interface (Internet…). Substitute the old code in an incremental way - eliminating big-bang approach © 1999 by Carnegie Mellon University Version # Symposium 99. - page 4
Traditional Approaches Legacy System IT manager commits suicide. New, pretty and Internet aware System Internet server Function 1 Big- Bang Function 2 Conversion Screen © 1999 by Carnegie Mellon University N ve CGI coamtim. extension Script Screen Scrap ping Terminal em HTML ulation… Version # Symposium 99. - page 5
Traditional Approaches : Advantages & Problems Screen scrapping and terminal emulation • fast and “cheap” • plenty of support tools • the new system is as inflexible and hard to maintain as the old one • it is just a “make up” Big bang conversion • definitive solution • plenty of liberated IT resources are needed • the EIS must be not vital, a period of adaptation to the new system must be admissible © 1999 by Carnegie Mellon University Version # Symposium 99. - page 6
Application Server Approaches Message. Service Legacy System Function 1 Service Native comm. Broker Function 2 Native comm. Screen Wrapped functionality EJB Server Internet server Function 2 bean Applet Adapter CGI or Servlets Function 1 bean HTML © 1999 by Carnegie Mellon University Version # Symposium 99. - page 7
Adapter Strategy: Details Workflow model. If it involves more than one function then NOT_SUPPORTED Wrapper of Function 1 If The COBOL system enables rolling a function then NEW_REQUIRED Workflow 1 Statefull Session Adapter Stateless Session Func. 2 Stateless Session © 1999 by Carnegie Mellon University Text only COBOL system Function 1 Function 2 EJB server Func. 1 Stateless Session Green screen terminal no state between functions Communication: error control, connection pooling, timing. . . NOT_SUPPORTED Version # Symposium 99. - page 8
Application Server Approaches : Advantages & Problems Sometimes is very difficult to divide the old monolithic system in discrete functions Legacy interfaces can be very hard to use. Text based communication, for example, is error prone. Step by step approach Very good “effort / added-value” relation Straightforward approach with well defined steps. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 9
Integrating Legacy Data: Why? We cannot migrate the data • legacy systems may still use it We don’t want to replicate data for coherence and maintenance Data needs to be accessed from EJB applications • preferably in a transparent way, I. e. through Entity beans. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 10
Legacy Data II: Present Approach JDBC ve Nati ss Acce JDBC Driver XA JDBC-ODBC Mainframes, Bridge Relational DB, File systems, Native ODBC OO databases. Access Entity “Regular” Bean Container Transaction Manager Driver Na Ac tive ce ss © 1999 by Carnegie Mellon University Native Access Custom Resource Manager EJB Server “Specialized” Entity Container XA CUSTOM Version # Bean Symposium 99. - page 11
Legacy Data III: Future Approach Database Transaction Processor ERP Native Access Entity Bean Container Connector EJB Server Connector Native Access Transactions Native Access Connector © 1999 by Carnegie Mellon University Security Standard interfaces Resource management Version # Symposium 99. - page 12
Connectors Java SM Community Process Initiated • expert group being formed Schedule for specification release not yet defined • not expected until at least 2000 • implementations will follow More information contact: Rahul Sharma, Member of Technical Staff Sun Microsystems, Inc. Rahul. Sharma@sun. com © 1999 by Carnegie Mellon University Version # Symposium 99. - page 13
Connectors: Advantages Standard connection EIS resources and application servers. No more proprietary and not portable solutions like specialized containers. It only covers the system level interfaces. Application level interfaces are still vendor specific. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 14
Conclusions Application servers in general, and EJB in particular, are powerful and smart ways to integrate legacy systems in modern EIS. Every legacy integration effort has attached several risks, it is a difficult task that requires a great deal of expertise. Other options like big-bang migration or screen scraping are more expensive or do not fully solve the problem. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 15
Portability in EJB Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 -3890 Sponsored by the U. S. Department of Defense © 1999 by Carnegie Mellon University Version # Symposium 99. - page 16
Implementation vs. Standard (MTS vs. EJB) Implementation • Over-specification: every function, interface and behavior is defined • Single vendor Standard • Under-specification: different grades of imprecision - compatibility test suites an reference implementations can help portability • Multi-vendor brings competence and innovation. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 17
Portability Is Not EJB’s Only Target Product differentiation Compatibility With existing servers Portability © 1999 by Carnegie Mellon University Version # Symposium 99. - page 18
EJB Development Process 1 E. Beans Specialized E. Beans 2 G E. ene Be ric an s Set of assembled E. Beans Deployed application Deployed E. Beans 3 Application template Market Application Assembler © 1999 by Carnegie Mellon University Version # EJB Deployer Server & container Enterprise Bean Provider Component Market EJB Server Provider& Container. Provider Symposium 99. - page 19
When Portability is Important Component vendors that want a broad-based market for their components. Application assemblers that want a large market of pre-built components for reuse. Application server providers that want to expand the number of third-party components available for their platforms. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 20
When Portability is Not Important Enterprises that make a strategic decision to use a particular EJB server to take advantage of proprietary features. Organizations that custom develop beans to meet non-negotiable requirements or to differentiate their application. Application server providers that want to offer nonstandard extensions as a business strategy. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 21
Basic Structure of an Enterprise Bean EJB Server-Container Contract EJB Container Client JNDI. . . Portability Related © 1999 by Carnegie Mellon University Enterprise Bean EB-Client Contract EB-Container • Home • Remote interface • Bean • DD Contract Version # Symposium 99. - page 22
The Enterprise Bean Contracts Source Code • API definition • Programming practices, rules and prohibitions Deployment descriptor • XML based syntax • Defined set of attributes Life cycle, transactional behavior…. © 1999 by Carnegie Mellon University Version # Symposium 99. - page 23
Source Code Incompatibility Different flavors of JPE APIs • JDK 1. 1 vs. 1. 2 • RMI-CORBA mapping Additional and proprietary APIs • XML • Security Semantic differences • Objects passed by value • JNDI © 1999 by Carnegie Mellon University Version # Symposium 99. - page 24
Deployment Descriptor Incompatibility Syntactic differences have disappeared with EJB 1. 1’s XML-based descriptor There is a “standard core” set of deployment descriptor attributes Different servers additional attributes to control specific capabilities • difficult to use only standard attributes • Compatibility problems in deployment descriptors can affect the source code © 1999 by Carnegie Mellon University Version # Symposium 99. - page 25
Conclusions Are EJB applications portable? • we could say that it is possible to make portable EJB applications but it requires some workarounds and developer guidelines Portability will increase with future releases of the standard • the holes in the standard will be gradually filled • EJB servers will more closely meet the standard • test suites and reference implementation will be soon released © 1999 by Carnegie Mellon University Version # Symposium 99. - page 26
Conclusions -2 Portability in EJB is an inversion. • Making portable EJB applications is harder than using proprietary capabilities. • Is it worth in your case? © 1999 by Carnegie Mellon University Version # Symposium 99. - page 27
For More Information. . . Telephone Fax Email World Wide Web U. S. mail © 1999 by Carnegie Mellon University 412 / 268 -5800 412 / 268 -5758 rcs@sei. cmu. edu kcw@sei. cmu. edu jer@sei. cmu. edu scd@sei. cmu. edu http: //www. sei. cmu. edu Customer Relations Software Engineering Institute Carnegie Mellon Pittsburgh, PA 15213 -3890 Version # Symposium 99. - page 28
Additional Slides (I will only use them for specific questions) Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 -3890 Sponsored by the U. S. Department of Defense © 1999 by Carnegie Mellon University Version # Symposium 99. - page 29
Resource Managers They must provide: • The XA interface to make them transactional aware • A “custom” interface to access data - JDBC is one of these “custom” interfaces - Can be used by bean-managed persistence or container-managed if interface understood by container • Pooling, concurrence and similar features implemented at this level © 1999 by Carnegie Mellon University Version # Symposium 99. - page 30
Resource Managers- 2 JDBC is a resource manager to access a special kind of legacy data: relational databases • There are JDBC native drivers for plenty of databases: mainframes. . . • If not native version available ==> an ODBC driver and a JDBC-ODBC bridge can be used. • Developing JDBC drivers is complex but all EJB infrastructure can make transparent use of them. There are other resource managers to access other kinds of data e. g. , OO, file system, SAP © 1999 by Carnegie Mellon University Version # Symposium 99. - page 31
Specialized Containers If we want to use CM persistence, the container must “know” the resource manager • Normal containers know JDBC sources, sometimes plain file systems. • There could be other containers that know other resources: ODMG sources, SAP R/3…. - Versant Container to access the Versant ODBMS in Weblogic - Websphere to CICS © 1999 by Carnegie Mellon University Version # Symposium 99. - page 32
Legacy Programs Different approaches: • Traditional solutions: - Screen scraping, CGI extensions, “magic converters”…. - They meet only some objectives. • Application server solutions - Adapters - Service brokers © 1999 by Carnegie Mellon University Middleware Version # Symposium 99. - page 33
- Slides: 33