1 / 144

Enterprise JavaBeans™ A COTS Architecture for Modern Enterprise Systems

Enterprise JavaBeans™ A COTS Architecture for Modern Enterprise Systems Kurt Wallnau • Robert Seacord • John Robert • Santiago Comella. Outline of Today’s Tutorial. Why Enterprise JavaBeans™ (EJB)? An Overview of EJB Security and Transactions Portability and Legacy Systems

yangj
Download Presentation

Enterprise JavaBeans™ A COTS Architecture for Modern Enterprise Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enterprise JavaBeans™ A COTS Architecture for Modern Enterprise Systems Kurt Wallnau•Robert Seacord•John Robert•Santiago Comella

  2. Outline of Today’s Tutorial • Why Enterprise JavaBeans™ (EJB)? • An Overview of EJB • Security and Transactions • Portability and Legacy Systems • Summary and the Future of EJB

  3. Why Enterprise JavaBeans™?

  4. Why Enterprise JavaBeans™? • The Nature and Challenges of Enterprise Systems • Best of Breed vs. Off-the-Shelf Infrastructures • Closed vs. Open Infrastructures • Enterprise JavaBeans™ (EJB) Benefits • Technical/Market/Business Triangulation

  5. What are Enterprise Systems? • Enterprise systems (ES) automate business processes, i.e., how work gets done • Enterprise systems are1 • large • heterogeneous • distributed • evolving • dynamic • long lived • mission critical • systems of systems • 1. John Salasin, “DAMES: Dynamic Assembly of Military Enterprise Systems,” briefing materials

  6. Challenges of Enterprise Systems ES Property ES Challenge

  7. ES’s Are Big Business • Estimates of ES1 market in federal systems alone is currently $3.7 billion, up from 1998 estimate of $2.8 billion • BAAN, SAP, PeopleSoft and other enterprise resource planning (ERP) systems are meeting this demand • Software component technologies are another market response • Estimates of this market range from $7 billion by 20022 to $12 billion by 20013 • 1. http://www.planetit.com/techcenters/docs/enterprise_apps/news/PIT19990707S0003 • 2. Gartner Group • 3. IDC http://www.selectst.com/downloads/IDC/IDC.asp

  8. Structure of an Enterprise System Clients Business Logic • There are various ways of viewing enterprise systems • 2-tiered, 3-tiered, N-tiered • by infrastructure technology • This N-tiered view will serve our purposes for today Business Objects (Shared Data) Infrastructure Platform (HW/OS)

  9. Clients Business Logic Business Objects (Shared Data) Infrastructure Platform (HW/OS) Structure of an Enterprise System • business rules • application services Our focus is here... • relational data • object-to-relation mapping • distribution, events, naming, • transactions, security, etc.

  10. ES Infrastructures are Complex The technical infrastructure needed for mission-critical applications is non-trivial Business Logic Networking Connection mgmt Security Business Objects (Shared Data) Transactions Thread Pool Infrastructure (e.g., Middleware) Synchronization Persistence Naming System mgmt Load Balancing Failover

  11. “Best of Breed” Infrastructure is Problematic: The GEE Experience Netscape Browser & ES Visibroker/Java Microsoft Explorer & IIS OrbixWeb Networking Java Web Server JDK/RMI Connection mgmt Netscape DS JSAFE JCE Security Microsoft IIS CRYPTIX Transactions Java Key SSLEAY Thread Pool Visibroker/C++ ITS Synchronization Persistence Microsoft Access Naming Oracle 7.x and 8.x System mgmt ODBC/JDBC Load Balancing Netscape DS Orbix Names Failover Visi Names Microsoft IIS

  12. The GEE: Some Lessons • We built an enterprise infrastructure from COTS “parts” choice-points for product specific options • product selections limited by “ensemble effect” • latest versions of products often are often un-integratable with previous ensemble • significant ongoing cost for product tracking and evaluation of new releases • complex rules for build and deploy • product/technology insulation is very very hard • tremendous vertical and spanning product and technology competency needed • product and technology competency is a wasting asset

  13. Clients 1.1 1.2 Proprietary Scripting and Modeling Tools 1.3 Infrastructure Platform (HW/OS) COTS ERP: Proprietary, Vertically-Integrated ES Pre-specified business processes, process templates and data items Pre-Integrated Infrastructure using vendor selected products and policies

  14. EJB: Specification for “Open” but Proprietary ES Frameworks Clients COTS Bean Families SessionBeans for Service Connections EntityBeans for Persistent Data Infrastructure Specification of security, persistence, life cycle, naming, transactions via server and container contracts Platform (HW/OS)

  15. COTS ERP vs. EJB: pros and cons Enterprise JavaBeans™ COTS ERP Package

  16. Rationale for EJB? ES Property ES Challenge EJB Benefit

  17. To Bean or Not To Bean? (1) • Ultimately this will require consideration of technical, market and business pros and cons • Technical • + The J in EJB addresses heterogeneity • + Specification ties together a variety of ES infrastructure services in a “standard” way • - The J in EJB may suffers from performance problems and JVM bugs • - Not all services are sufficiently well defined to enable cross-container bean portability

  18. To Bean or Not to Bean? (2) • Market factors refer to the performance and viability of EJB in the technology marketplace: • + EJB may unify a fragmented “app server” market, and jumpstart a market in servers and containers • + EJB leverages tremendous interest in Java, and many EJB servers are now available • - EJB is not “open”--Sun controls the spec, and its future evolution is unpredictable • - Technology battle with Microsoft and fast Java evolution guarantee continued EJB instability

  19. To Bean or Not To Bean? (3) • Business factors will be particular to each organization. These are representative pros/cons • + Organization is engaged in a general switchover to Java technology, so why wait? • + Market in server/container providers provide competitive alternatives and fallbacks • - Technology instability and immaturity will cause delays, rework, risking added cost and delayed time to market • - EJB vendors will continue to provide proprietary and non-standard features

  20. The Remainder of the Tutorial • John Robert describes EJB in detail • Robert Seacord takes a more in-depth look at several aspects of EJB and discusses strengths and weaknesses found • Santiago Comella-Dorda discusses issues of Enterprise JavaBean portability and integration with legacy systems • Robert Seacord closes with a brief summary and some thoughts on the future of EJB

  21. Enterprise JavaBeans™ Overview

  22. EJB Overview • What is EJB? • EJB Roles • EJB Architecture • EJB Services • Building an EJB Application • EJB & CORBA • Summary

  23. EJB in the n-Tier System You Are Here Browser Client Applet Database Client Application Legacy Systems EJB Server Clients Application Data

  24. What is EJB? • Specification for component based distributed computing framework using Java technology. • Enterprise JavaBeans Specification describes • roles and responsibilities for component-based software development of server-side applications. • an architecture including EJB Servers, Containers, and Beans. • a set of services including naming, transactions and security. • interoperability with database servers and CORBA applications.

  25. EJB Specification • Evolving Technology • Release 1.0 - March 98, Final • Release 1.1 - May 99, Public Draft • Goals • Component-based software development. • Separate business logic from system code. • Address application life cycle. • Compatible with CORBA (non Java apps). • Specification owned by Sun and supported by 40+ companies.

  26. EJB Roles Bean Provider - Producer of enterprise beans. - Combines enterprise beans into larger deployable parts. - Deploys enterprise beans into a specific operational environment. - Container provider and server provider. - Configuration and administration of infrastructure. Application Assembler Application Development and Deployment Deployer Platform Provider System Admin.

  27. EJB Architecture The container is the platform. The component is your application. Picture provided by Sun Microsystems, Inc.

  28. EJB Platform Provide naming service using JNDI Provide OMG/OTS compliant transaction service Container EJB Server Manage EJ Bean life cycle Make EJ Bean Interfaces Available with JNDI Provide basic security services Persistence Management (DBMS and other) Manage transaction context

  29. Select EJB complaint platform for purchase (1.0 or 1.1). EJB Platform vendors supplement standard EJB with proprietary features. Current Vendors include BEA Systems - WebLogic Bluestone - Sapphire/Web IBM - WebSphere Inprise - Application Server Oracle - Oracle8i Persistence - PowerTier Sun/Netscape alliance - reference implementation EJB Platform Vendors

  30. Enterprise JavaBeans™ Component EJB Application Application consists of multiple beans Beans are “portable” across containers Beans can be purchased or constructed

  31. Types of Enterprise JavaBeans • Session Bean • Used for client interface • Not shared between clients • Two kinds of Session Bean: • stateless - common object identity • stateful - unique object identity • Entity Bean • Maps to data in database or application • Shared between clients • Persistent state • container managed - access defined at deployment • bean managed - access defined as part of bean • Support optional in 1.0 and mandatory in 1.1

  32. Mixing Beans • EJB applications use a combination of entity beans and session beans to implement business logic. PrefixBean Database Client EchoServiceBean SuffixBean Session Bean Entity Bean Application Server Application Server

  33. EJB Client Interfaces Factory Interface Finder Interface EJBHome EJBObject Remote Interface Contains bean services seen by clients

  34. EJB Architecture The purchased EJB server is the platform. The application consists of session and entity beans. Application interfaces are made available to clients at time of deployment. Picture provided by Sun Microsystems, Inc.

  35. Deployment descriptor Deployment Platform Specific Implementation of Bean • Deployment provides a mechanism for adapting a component for a specific runtime environment. • Deployment is an intermediate step between coding a bean and executing a bean. By using a deployment descriptor, some attributes of the bean implementation are specified by the deployer, and implemented by the platform provider. • Two kinds of information in a deployment descriptor • Enterprise beans’ structural information - can’t change • Application assembly information - can change Bean Deploy +

  36. EJB Overview • What is EJB? • EJB Roles • EJB Architecture • EJB Services • Building an EJB Application • EJB & CORBA • Summary

  37. EJB Services • Standard EJB services allow application developers to • focus on business logic rather than infrastructure • defer responsibility for common services to the EJB platform • create “portable” applications that can be reused • support a component marketplace • Standard EJB services include • Persistence • Naming • Transactions • Security

  38. Persistence • EJB Definition • “The data access protocol for transferring the state of the entity between the enterprise bean instance and the underlying database is referred to as object persistence.” • Two types of persistence • bean-managed - persistence logic implemented directly inside the enterprise bean class. • container-managed - persistence logic delegated to container. • The underlying data source may be an existing application rather than a database.

  39. Bean-Managed Persistence • EntityBean • SQL code • persistence logic • Enterprise bean provider writes database access calls (using JDBC or SQLJ) directly in the entity bean. • Entity bean is tied to the data source in which the entity is stored. • More portable across EJB platforms than container-managed entity bean. Deploy • Bean • SQL code • persistence logic + Deployment Descriptor persistence-type

  40. Container-Managed Persistence EntityBean • Data access components (like JSBC and SQLJ calls) are generated at deployment time by container tool. • Entity bean is independent from the data source in which the entity is stored. • Less development effort for bean provider. Deploy + • Bean • generated SQL code • generated persistence logic Deployment Descriptor persistence-type cmp-fields

  41. Name Service - Deployment • Benefits • EJB server has built-in name server. • Service name of bean is assigned at deployment time, not compile time. • Some EJB servers support enterprise bean replication. Deploy Deployment Descriptor bean home name

  42. Name Service - Lookup • Benefits • JNDI allows clients to use one interface for locating CORBA, LDAP, NDS, and file objects. • Allows management of enterprise wide services using naming hierarchy. MyClient Context ct= getInitialContext(…) ct.lookup(“EchoService”) Runtime

  43. Transactions • Benefits • EJB applications can defer transaction logic to EJB server and container. • Distributed transactions. Picture provided by Sun Microsystems, Inc.

  44. Security • Benefits • Permissions specified for each bean service at deployment time. • Builds on security of JDK. Detailed discussion by Robert Seacord. Deploy Deployment Descriptor security roles ... • Generated Bean Code • security logic

  45. Building an EJB Application How do we build an EJB application? Client Database Application Server

  46. Step 1: Create Interfaces EJB Server Specifies the life cycle interfaces public interface AccountHome extends EJBHome{ public create(…) public findByPrimaryKey(..) Home I/F Client Database Specifies the interface provided to bean clients public interface Account extends EJBObject{ public getName(…) public setName(…) Remote I/F EJB specification This is generated You write this

  47. Step 2: Create Implementation EJB Server Home I/F Client Database Account implements EntityBean Implements bean interfaces public class AccountBean implements EntityBean { public void ejbActivate(...) {………} public void ejbPassivate(…) {……….} public getName(…) {……..} public setName(…) {…….. } Remote I/F EJB specification This is generated You write this

  48. Deployment descriptor Step 3: Deployment Descriptor EJB Server Home I/F Client Database Account implements EntityBean “Tells” the container how to deploy the bean (how to do DBMS access, transactions, security, naming, etc.) Remote I/F EJB specification This is generated You write this

  49. Deployment descriptor Step 4: Deploy EJB Server Home obj implements Home I/F Client Database Account implements EntityBean delegates Remote obj implements Remote I/F EJB specification This is generated You write this

  50. Entity Bean Inheritance - 1 Java.rmi.Remote Java.io.Serializable JDK EJBMetaData EnterpriseBean EJBObject EJB Spec EJBHome EntityBean Bean Provider (Wombat) Container Provider (Acme) Produced by Acme tools Extends or implements interface Extends implementation, code generation or delegation

More Related