Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Session 1 Introduction to Enterprise Java Beans
Session Objectives <ul><li>Discuss Component Architecture </li></ul><ul><li>Describe Distributed Object Architecture </li>...
Component Architecture <ul><li>Components are building blocks of an application  </li></ul><ul><li>Provides a set of servi...
Evolution of Enterprise JavaBeans   <ul><li>EJB was developed so that it would:   </li></ul><ul><ul><ul><li>* Specialize i...
Distributed Object Architecture Running HTML and Java Script
RMI Architecture <ul><li>RMI Application consists of </li></ul><ul><li>* Server </li></ul><ul><li>* Client </li></ul><ul><...
RMI Layered Architecture R E M O T E R E G I S T R Y Transport Layer Object A Remote Reference Layer Object A Stub Transpo...
RMI Layers <ul><li>Stub and the Skeleton Layer </li></ul><ul><li>The stub forwards the request from the client to the remo...
The Transport Layer Transport Layer Client  Transport Layer Server TCP Protocol UDP Protocol Sockets
Remote Registry Remote Registry Registers Database of Objects SERVER
RMI  over IIOP Client Client Client Server Server Server RMI (Java only) RMI (Java only) RMI-IIOP (Java) RMI-IIOP (Java) C...
Java Naming and Directory Interface <ul><li>Java Naming and Directory Interface provides the naming and directory function...
The JNDI Architecture Client JNDI LDAP Service Provider NDS Service Provider RMI Application  Service Provider  Interface ...
Naming Concepts in JNDI Compound Composite Atomic The three types of  names in JNDI
Steps in JNDI Programming Looking up the Component/Object Creating the Initial Context Importing the JNDI classes Catching...
Initial Context Factory and the Directory Context <ul><li>Initial Context Factory is the point where all naming and direct...
Initial Context Factory and the Directory Context Initial Context Factory Initial Context Context Naming System Binding Co...
Java 2 Platform Enterprise Edition ( J2EE ) <ul><li>J2EE Technologies </li></ul><ul><li>* Enterprise Java Beans (EJB) </li...
Java 2 Platform  Enterprise Edition (J2EE) <ul><li>J2EE Technologies </li></ul><ul><li>*  Java Servlets and Java Server Pa...
New Features in EJB 2.0 <ul><li>Container-Managed Persistence  </li></ul><ul><li>Container-Managed Relationships  </li></u...
Summary <ul><li>The multi-tier application model focuses on three important areas: </li></ul><ul><li>* Programming busines...
Summary - 2 <ul><li>A component in EJB is an object that is deployed on any EJB server. </li></ul><ul><li>In a  distribute...
Summary - 3 <ul><li>The RMI API has mainly 5 packages </li></ul><ul><li>* java.rmi  * java.rmi.registry  </li></ul><ul><li...
Upcoming SlideShare
Loading in …5
×

Session 1 Tp1

1,138 views

Published on

Published in: Technology
  • Login to see the comments

Session 1 Tp1

  1. 1. Session 1 Introduction to Enterprise Java Beans
  2. 2. Session Objectives <ul><li>Discuss Component Architecture </li></ul><ul><li>Describe Distributed Object Architecture </li></ul><ul><li>Discuss RMI </li></ul><ul><li>Explain RMI-IIOP </li></ul><ul><li>Discuss the Java Naming and Directory Interface </li></ul>
  3. 3. Component Architecture <ul><li>Components are building blocks of an application </li></ul><ul><li>Provides a set of services or functions, such that it can easily interact with other applications or components </li></ul><ul><li>Consists mainly of Web components, business logic components, and service components. </li></ul><ul><li>Web components consist mainly of JSP and Servlets, the business logic component consists of EJB and the services component primarily consists of JavaMail, JNDI, JMS, JTS, JDBC, and RMI-IIOP. </li></ul>
  4. 4. Evolution of Enterprise JavaBeans <ul><li>EJB was developed so that it would: </li></ul><ul><ul><ul><li>* Specialize in handling the business logic of an application </li></ul></ul></ul><ul><li>* Be robust </li></ul><ul><li>* Be secure so that it cannot be tampered. </li></ul><ul><li>EJB Component has been designed to encapsulate business logic. </li></ul>
  5. 5. Distributed Object Architecture Running HTML and Java Script
  6. 6. RMI Architecture <ul><li>RMI Application consists of </li></ul><ul><li>* Server </li></ul><ul><li>* Client </li></ul><ul><li>RMI defines two types of objects </li></ul><ul><li>* Stubs </li></ul><ul><li>* Skeletons </li></ul><ul><li>Marshalling - process of converting data or objects into a byte-stream . </li></ul><ul><li>Unmarshalling - reverse process of converting the byte-stream back to the original data or objects. </li></ul>
  7. 7. RMI Layered Architecture R E M O T E R E G I S T R Y Transport Layer Object A Remote Reference Layer Object A Stub Transport Layer Object B Remote Reference Layer Object B Skeleton Client Server
  8. 8. RMI Layers <ul><li>Stub and the Skeleton Layer </li></ul><ul><li>The stub forwards the request from the client to the remote reference layer and then to the skeleton through transport layer. </li></ul><ul><li>Remote Reference Layer </li></ul><ul><li>Responsible for unicast point-to-point method invocation. </li></ul><ul><li>Transport Layer </li></ul><ul><li>Uses TCP/IP for communication. </li></ul>
  9. 9. The Transport Layer Transport Layer Client Transport Layer Server TCP Protocol UDP Protocol Sockets
  10. 10. Remote Registry Remote Registry Registers Database of Objects SERVER
  11. 11. RMI over IIOP Client Client Client Server Server Server RMI (Java only) RMI (Java only) RMI-IIOP (Java) RMI-IIOP (Java) CORBA (Any Language) CORBA (Any Language) JRMP JRMP IIOP IIOP
  12. 12. Java Naming and Directory Interface <ul><li>Java Naming and Directory Interface provides the naming and directory functionality to Java applications. </li></ul><ul><li>Provides a standard interface to locate the components, users,networks, and services placed across the network. </li></ul><ul><li>Bridges the gap between directory services and makes it possible for the developer to write portable naming and directory services </li></ul>
  13. 13. The JNDI Architecture Client JNDI LDAP Service Provider NDS Service Provider RMI Application Service Provider Interface CORBA Application
  14. 14. Naming Concepts in JNDI Compound Composite Atomic The three types of names in JNDI
  15. 15. Steps in JNDI Programming Looking up the Component/Object Creating the Initial Context Importing the JNDI classes Catching the Naming Exception Running the program Compiling the Program
  16. 16. Initial Context Factory and the Directory Context <ul><li>Initial Context Factory is the point where all naming and directory operations are first performed. </li></ul><ul><li>When the initial context is acquired, all information pertaining to this must be provided to JNDI. </li></ul><ul><li>The directory context or directory object is another type of context. It is used to define methods for inspecting and modifying attributes associated with a directory object . </li></ul>
  17. 17. Initial Context Factory and the Directory Context Initial Context Factory Initial Context Context Naming System Binding Context
  18. 18. Java 2 Platform Enterprise Edition ( J2EE ) <ul><li>J2EE Technologies </li></ul><ul><li>* Enterprise Java Beans (EJB) </li></ul><ul><li>* Remote Method Invocation (RMI) </li></ul><ul><li>* Java Naming and Directory Interface (JNDI) </li></ul><ul><li>* Java Database Connectivity (JDBC) </li></ul><ul><li>* Java Transaction API (JTA) and Java Transaction Service (JTS) </li></ul><ul><li>* Java Messaging Service (JMS ) </li></ul><ul><li>(cont…) </li></ul>
  19. 19. Java 2 Platform Enterprise Edition (J2EE) <ul><li>J2EE Technologies </li></ul><ul><li>* Java Servlets and Java Server Pages (JSP) </li></ul><ul><li>* Java IDL </li></ul><ul><li>* Java Mail </li></ul><ul><li>* Connectors </li></ul><ul><li>* Extensible Markup Language (XML) </li></ul>
  20. 20. New Features in EJB 2.0 <ul><li>Container-Managed Persistence </li></ul><ul><li>Container-Managed Relationships </li></ul><ul><li>Message-Driven Beans </li></ul><ul><li>Local Interface </li></ul><ul><li>Additional Methods on the Home-Interface </li></ul><ul><li>New Query Language (EJB QL) </li></ul>
  21. 21. Summary <ul><li>The multi-tier application model focuses on three important areas: </li></ul><ul><li>* Programming business logic </li></ul><ul><li>* Relying on backend services </li></ul><ul><li>* Providing user interaction using client-side applications </li></ul><ul><li>A software component is an individual unit of composition with no persistent state. </li></ul><ul><li>A software component can be deployed independently, and is subject to composition by third parties. </li></ul>
  22. 22. Summary - 2 <ul><li>A component in EJB is an object that is deployed on any EJB server. </li></ul><ul><li>In a distributed application, processing is distributed across multiple networked computers. </li></ul><ul><li>The J2EE Platform collects all the Enterprise APIs to form a total development platform that distributes object architectures. </li></ul>
  23. 23. Summary - 3 <ul><li>The RMI API has mainly 5 packages </li></ul><ul><li>* java.rmi * java.rmi.registry </li></ul><ul><li>* java.rmi.server * java.rmi.activation </li></ul><ul><li>* java.rmi.dgc </li></ul><ul><li>JNDI is used by Enterprise JavaBeans to perform a look-up to distribute objects in a network. </li></ul><ul><li>The point where all naming and directory operations are first performed is called the Initial Context Factory. </li></ul>

×