Introduction to J2EE Dr. N. A. Joshi.

Slides:



Advertisements
Similar presentations
Apache Struts Technology
Advertisements

Objectives In this session, you will learn to:
An architecture for webb applications, J2EE
Introduction to Java 2 Enterprise Edition About myself –Neutrinos, Cancer Research, IT Applications Today’s topic: J2EE –Context –Advantages –Components.
 Java  Python  Bigtable(Bt) is a distributed storage system for managing structured data that is designed to scale to a very large size.  Query Language.
Technical Architectures
Distributed System Using Java 2 Enterprise Edition (J2EE) B.Ramamurthy.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Layers & Tiers Umair Javed Lec - 41.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
Java 2 Platform, Enterprise Edition (J2EE). Source: Computer, August 2000 J2EE and Other Java 2 Platform Editions.
J2EE vs..NET Nigam Patel. Topics Background –Web Services, J2EE and.NET Similarities Differences Conclusion –Pros and Con (J2EE and.NET)
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
Nikolaos Korfiatis The Java 2 Enterprise Edition Platform Dept. of Management & Technology-Athens University of Economics and Business Java 2 Platform.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
CS 483 Enterprise and Web Application Programming
Apache Struts Technology A MVC Framework for Java Web Applications.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Distributed System Using Java 2 Enterprise Edition (J2EE)
INTRODUCING THE JAVA EE PLATFORM Ch-5. Introduction Java is a  platform-independent programming language  secure and robust applications  may run on.
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
Introduction to Java EE (J2EE)
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Distributed Multitiered Applications The J2EE platform uses a multitiered distributed application model. Application logic is divided into components 1.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.
Chapter 4: Core Web Technologies
Enterprise Java Beans CS-422. Application Servers In the late 1980s and though the mid 1990s a number of corporations (Broadvision, Netscape…) marketed.
Bayu Priyambadha, S.Kom. What is J2EE? * Open and standard based platform for developing, deploying and managing n-tier, Web-enabled, server-centric,
Enterprise Computing COSC 617 Jeff Schmitt September 7,2006.
Jaeki Song ISQS6337 JAVA Lecture 16 Other Issues in Java.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
Introduction to J2EE Architecture Portions by Kunal Mehta.
Java-Based Middleware IT 490 Stan Senesy IT Program NJIT.
第十四章 J2EE 入门 Introduction What is J2EE ?
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Java 2 Enterprise Edition Presented by: Reem Osama Shehata Supervised by: Dr. Sherif Aly 16 th March 2006.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Introduction to Java EE (J2EE). CSE, IITB Umesh Bellur Session Objectives Understanding the value propositions of J2EE Getting a big picture of J2EE architecture.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
©NIIT Introducing Enterprise JavaBeans (EJB) Lesson 1A / Slide 1 of 43J2EE Server Components Objectives In this lesson, you will learn about: The features.
Apache Struts Technology A MVC Framework for Java Web Applications.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
Intro to J2EE Concepts Mimi Opkins Fall 2016 CECS493.
J2EE Platform Overview (Application Architecture)
Introduction to J2EE Architecture
Enterprise Application Architecture
Distributed System Using Java 2 Enterprise Edition (J2EE)
Lecture 1: Multi-tier Architecture Overview
JavaServer Faces: The Fundamentals
Intro to J2EE Concepts.
Presentation transcript:

Introduction to J2EE Dr. N. A. Joshi

Agenda Section A: Introduction to Java Evolution Components Section B: Enterprise architecture Types 2-tier, 3-tier, n-tier Goals of enterprise applications Introduction to J2EE Platform Features J2EE5 APIs Architecture Java EE Containers; & Container architecture

Section A: Introduction to Java

Introduction to Java Platform-independent programming language Used to create robust and secure applications, which can run on single computer or can be distributed among servers and clients 4 aspects of Java Java Programming Language (JDK) Java Runtime Environment (JRE) Java Virtual Machine (JVM) Java Platform

Java Programming Language An object oriented language Syntax is similar to C, C++ Fulfills following primary goals of object oriented language: Uses the object-oriented methodology Allows the same program to be executed on multiple operating systems Contains built in support for using computer networks Executes code securely from remote sources It is widely used standard in enterprise programming

Java Runtime Environment (JRE) Also known as Java Runtime Part of Java Development Kit (JDK) JDK is a set of programming tools required for developing Java apps JRE consists of- Java libraries Java Virtual Machine Other components essential for running java applications

JVM It is an application that actually executes the java program When JVM is installed on a computer, It can run Java programs. Java programs therefore needn’t be self-sufficient, and they don’t have to include all the machine-level code that actually runs on the computer. Instead, Java programs are compiled into compact bytecodes, and the JVM reads and interprets these bytecodes to run your program. E.g. when you are downloading and applet from internet, you are actually downloading a bytecode JVM ensures that Java programs include less code, because all the machine-level code to run your program is already on the target computer and doesn’t need to be downloaded.

JVM JIT Compiler Initially java programs were interpreted- i.e. executed bytecode by bytecode Interpretation can be a slow process To solve this, Java2 comes with JIT compiler- It actually reads your bytecodes in sections and compiles them interactively into machine language, so that the program can run faster (the whole program is not compiled at once because java performs runtime checks on various sections of the code)

The Java Platform Over the years, the Java platform evolved into three major editions, each addressing a distinct set of programming needs: The Java Platform, Standard Edition (Java SE) Most commonly used among the three editions Used for developing desktop and console-based applications It consists of: A runtime environment Set of APIs, to build a wide variety of applications comprising standalone applications that can run on various platforms- Windows, Linux, Solaris The Java Platform, Enterprise Edition (Java EE) Used for building server-side applications, by using its component-based approach The Java Platform, Micro Edition (Java ME) Used for computing micro devices- handheld devices- PDAs, mobile phones – with limited display and memory support

Section B: Enterprise Architecture

Enterprise Architecture Helps in understanding the structure of an enterprise application It can be broken down into three fundamental logical layers: User interface layer Displays data elements to the users and collecting data from the users Often called the ‘presentation’ layer- it includes the part of the software that creates and controls the user interface and validates the user’s actions Processing layer Helps an application to work and handle processing of business logic Also called the ‘business layer’ Data storage & access Helps the processing layer to read and store data

Enterprise Architecture Types An enterprise application can be designed in many ways, but, here we discuss the following types of enterprise architectures: Single-tier architecture 2-tier architecture 3-tier architecture n-tier architecture

Single-tier Architecture It consists of the presentation, the business rules, and the data access layers in a single computing layer. Such applications are relatively easy to manage, and implement data consistency, since data is stored in a single location Problem- Such applications can’t be scaled up to handle multiple users, and they do not provide an easy means of sharing data across enterprise

2-tier Architecture It separates the data and business logic. the application resides entirely on the local machine, and the database is deployed at a specific and secured location. In 2-tier application (a. k. a. client-server application), the processing load is entrusted with the client, while the server simply controls the traffic between the application and data Data Layer Data Access Layer 1st Layer Presentation Logic Business Logic Database

2-tier Architecture

3-tier Architecture In 3-tier architecture, an application is virtually split into three separate logical layers

3-tier Architecture Layers: First tier: ‘presentation layer’- consists of a GUI to interact with the user Middle tier: ‘business layer’- consists of the application (or business) logic; Third tier: ‘data layer’ – contains data access logic needed for the application. This separation of application logic from the user interface adds enormous flexibility, as compared to the 2-tier system, to the design of an application. By using this architecture, multiple user interfaces can be built and deployed without changing the application logic; provided it defines a clear interface to the presentation layer.

2-tier vs. 3-tier

n-tier Architecture There can be numerous layers in this kind of architectures. In this model, The user interface logic is retrieved from the application running on the desktop. The application on the desktop is responsible for presenting the user interface to the end user and for communicating to the business logic tier. It is no longer responsible for enforcing business rules or accessing databases. There is no hard & fast way to define an application in this architecture. In fact, n-tier architecture can support a number of different configurations.

n-tier Architecture It can be virtually distributed in to the following segments:

n-tier Architecture Advantages Improved maintainability Consistency Such applications are easier to maintain Consistency By means of component designing and their association with the layer in the architecture where they are providing functionality Interoperability Such applications are highly interoperable, as we can implement components in different layers to support different technologies and platforms Flexibility Developer is free to design and develop various types of components for different layers with all flexibility Scalability We can add new components without affecting the performance of the existing application

Goals of enterprise applications Ensure robustness Ensure scalability and performance Implement OO design principles Avoid complexity Ensure maintainability and extensibility Ensure ease of testing Promote reuse of applications Support for multiple client types portability

Section C: Java EE Platform

Applications Development Requirement Platform independence - Do not get caught in complexity of operating systems Develop Once, run every Strong framework, ensure repeatability – Ensure building blocks Flexibility in individual implementation over common rules Internationalization requirements Access of business rules including data and methods Reduced dependency on database Organization component modelling Standardization with Business entities Technology Portability Ability to change business rules easily J2SE (Java 2 Standard Edition) : JVM, tools, Libraries and Doc J2EE Java 2 Enterprise Edition J2EE adds additional specifications, libraries, documentation and tools Standard based: The J2EE Connector Architecture defines a standard, transactionally capable, scalable, and secure architecture for leveraging EIS investment -- thereby simplifying integration with such mainframe applications as Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) systems. Some of the J2EE Application Servers available are Apache (Servelet/ JSP container Only) IBM WebSphere JRun JBoss BEA WebLogic TCS Internal

What is J2EE? J2EE is a standard based platform for developing, deploying and managing multitier, web-enabled, server centric and component based enterprise applications J2EE enhances J2SE with: Enterprise JavaBeans components Java Servlets API Java Server Pages XML This suite is the Java 2 Enterprise Edition, commonly known as J2EE. J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble and deploy enterprise applications. It provides a distributed, component-based, loosely coupled, reliable and secure, platform independent and responsive application environment. J2EE environment provides a framework for bundling together the components into an application and provide the applications necessary common services such as persistence, security, mail, naming and directory service etc. Java 2 Platform, Enterprise Edition (J2EE) defines the standard for developing component-based multi-tier distributed enterprise applications. A J2EE component is a self-contained functional software unit that is assembled into a J2EE application along with related components. Application logic is divided into components according to function J2SE (Java 2 Standard Edition) : JVM, tools, Libraries and Doc J2EE Java 2 Enterprise Edition J2EE adds additional specifications, libraries, documentation and tools Standard based: The J2EE Connector Architecture defines a standard, transactionally capable, scalable, and secure architecture for leveraging EIS investment -- thereby simplifying integration with such mainframe applications as Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) systems. Some of the J2EE Application Servers available are Apache (Servelet/ JSP container Only) IBM WebSphere JRun JBoss BEA WebLogic TCS Internal

Exploring the Java EE5 platfom It comprises of the following: A runtime infrastructure for managing and hosting applications. All runtime applications are hosted in this server. A set of Java APIs to build applications. These Java APIs describe the programming model for Java EE appliations.

The Runtime Infrastructure It includes numerous services to manage enterprise applications. The Java EE architecture provides the uniform means of accessing platform-level services via its runtime environment. These services include: messaging, security and distributed transactions

The Java EE APIs In the enterprise services, the distributed applications require server access for running. These enterprise services include transaction processing, managing, multithreading, and database access. J2EE5 unifies access to such services in its enterprise service APIs. The j2ee5 application program can access these APIs through the containers such as Web and EJB,

Java EE APIs

EJB 3.0 An enterprise bean is a server-side piece of code with fields and methods to implement the modules of the business logic. It is a building block that can be used alone or with other enterprise beans to execute the business logic on the Java EE server It is a component based architecture for developing, deploying, and managing reliable enterprise applications

Java Servlet Technology It allows you to define HTTP-specific servlet-classes. A servlet class extends the capabilities of servers that host the applications accessed by the way of request-response programming model.

Java Server Pages & JSP Tag Library(JSTL) It allows you to integrate the combined snippets of Java code with static markup in a text-based document. It is a text-based document that contains two types of text: Static template data, which can be expressed in any text-based format such as HTML or XML JSP elements, which determine how the page constructs the dynamic content JSTL provides a set of standard tags that can be used in a JSP page It provides tags to use java code embedded in a JSP page It includes various tags to control the flow of execution, to support internationalization and to access database using SQL

Java Server Faces Provides component based API for building rich user interfaces for web applications. Used in conjunction with JSP and servlets They handle all the complexities of managing the UI, enabling the developer to concentrate on the business logic.

Java Message Service (JMS) The JMS API is a messaging standard that allows Java EE application components to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.

Java Transaction API(JTA) JTA is used to manage distributed transactions. This API specifies a standard java interface for a transaction manager to interact with the resource manager, application server, and transactional appliacations.

JavaMail API Many enterprise applications need to send email notifications. Java EE platform includes the JavaMail API with a JavaMail Service provider that application components can use to send emails. It has two parts: An application-level interface used by the application components to send emails A service provider interface

JavaBeans Activation Framework (JAF) it provides the standard services – to determine the type of an arbitrary to encapsulate access to it to identify the operations available on it, and to instantiate appropriate JavaBean components to perform these operations

Java API for XML Processing (JAXP) it enables applications to parse, transform, validate, and query XML documents This API is independent of XML processor implementation

Java API for XML Web Services(JAX-WS) The JAX-WS specification helps create web service endpoints and client components to access the web services. It also describes the deployment information of web services and clients. It also supports JAXB JAXB API is used to bind XML data to java objects.

Java Architecture for XML Binding(JAXB) It helps on binding an XML schema with a java object in a simple and easy way. It helps in marshalling java content tree into XML instance documents, and vice versa.

JDBC API The Java DataBase Connectivity API helps execute SQL commands from Java programs. JDBC API can be used with Enterprise java beans, JSP, Servlets, and Java classes

Java Persistence API (JPA) In Java EE, a solution for persistence has been provided in the form of JPA. An object relational mapping, which is used by persistence, is used for bringing an OO model and relational database model together. JPA consist of the Persistence API, query language, and object/relational mapping metadata.

Java Naming and Directory Interface (JNDI) It provides the naming and directory functionality. It provides Java EE applications with the methods to perform standard directory operations, such as associating attributes with the objects and searching for the objects by using their attributes. Using JNDI, a Java EE application can store and retrieve any type of named Java objects.

Java Authentication and Authorization Service (JAAS) JAAS provides a way for a Java EE application to authenticate and authorize a specific user or group of users. JAAS is a Java based standard Pluggable Authentication Module (PAM) framework, which extends the Java platform security architecture to support user-based authorization.

J2EE Suite (summary) Core technology: Container infrastructure, language and environment support XML technology The Java API for XML Processing (JAXP) The Java API for XML-based RPC (JAX-RPC) SOAP with Attachments API for Java (SAAJ) The Java API for XML Registries (JAXR) Web Technology Java Servlets JavaServer Pages JavaServer Pages Standard Tag Library Enterprise Java Bean (EJB) technology Session beans Entity beans Enterprise JavaBeans Query Language Message-driven beans Platform services Security Transactions Resources Connectors Java Message Service

Architecture of Java EE 5

Distributed Multi-tiered Applications Services, clients (people and application) and data are distributed geographically across many platforms and many machines. Multiple tiers: Client-tier (browser or client-application) Web-tier (web-server: Java Server Pages) Business-tier (logic; Examples: Enterprise Java Beans) Enterprise-Information-System (EIS) tier (database)

Enterprise Application Model

J2EE Multi-tier Framework EJB Container JSP/Servlet Container WEB CLIENT Database/Legacy Systems ANY CLIENT Client Tier EIS Tier Web Business Machine J2EE Server Database Server / Legacy Business logic is in EJB (Enterprise Java Bean) container and can be accessed either by a web client (browser) or any other client. These clients include swing based GUI applications, other applications developed in other platform and programming languages, applications running on PDAs (Personal Digital Assistant) and mobile phones etc. EIS – Enterprise Information Systems (legacy systems). Container is a logical concept which holds components. Client is a software sitting on the desktop interacting with server through network using some protocol.

J2EE Architecture CLIENTS TIER BACK END External Clients from INTERNET (Browsers , WAP etc.) Applets Internal Clients from INTRANET (Browsers , Desk top Applications etc.) Applets, Javabeans BACK END J2EE WEB APPLICATION SERVER TIER PRESENTATION LOGIC (Web Components) BUSINESS LOGIC (EJB Container ) ENTERPRISE SERVICES HTML JDBC XML SERVLETS JSP WML EJB JNDI JMS JTS RMI - IIOP Enterprise Information Systems (Databases, ERP, Legacy Systems) Applets : An applet is a small client application written in the Java programming language that executes in the Java virtual machine installed in the Web browser. client systems will likely need the Java Plug-in and possibly a security policy file in order for the applet to successfully execute in the Web browser. Application clients: Swing bases rich GUI. Either can access data tier directly or through HTTP socket connection. Web clients: A web client consists of two parts: Dynamic Web pages containing various types of markup language (HTML, XML, and so on), which are generated by Web components running in the Web tier, and A Web browser, which renders the pages received from the server. A Web client is sometimes called a thin client. Thin clients usually do not query databases, execute complex business rules, or connect to legacy applications. When you use a thin client, such heavyweight operations are off-loaded to enterprise beans executing on the J2EE server, where they can leverage the security, speed, services, and reliability of J2EE server-side technologies. Web tier consists of servlets and JSP pages. It is also called presentation layer/logic/tier. Enterprise Java Beans capture the business logic. They are kept in EJB containers. Apart from these, J2EE provides some common services like, messaging, mail, lookup etc. Various devices can interact with application in XML (Extensible Markup Language), HTML and WML (Wireless Markup Language) format

J2EE-based Application The J2EE APIs enable distributed systems and applications through the following: Unified application model across tiers with enterprise beans Simplified response and request mechanism with JSP pages and servlets Reliable security model with JAAS XML-based data interchange integration with JAXP Simplified interoperability with the J2EE Connector Architecture Easy database connectivity with the JDBC API Enterprise application integration with message-driven beans and JMS, JTA, and JNDI

J2EE Technology Architecture html Web clients Application clients IIOP, others Java Server pages Servlets Enterprise Java Beans Components Server platform JTS JMAPI JNDI JMS JAXP JDBC JAAS …

J2EE offerings for Developer Java Server Pages JavaMail API Enterprise Java Beans Java Authentication & Authorization Service Java Naming & Directory Interface JAXP – JAXB – JAXR – JAXRPC Java Servlet Technology JDBC Java Message Service J2EE Java Transaction API & Service JTA + JTS SAAJ (Web Services) Enterprise Java Beans is used to capture business logic. Servlets and JSP provides a mechanism to communicate between clients (browsers) and servers. JDBC is the middle tier used to talk to underlying database. Naming service is used to lookup various components dynamically during runtime. Authentication and authorization service is used to provide role based access to various users. Messaging service is used form inter-component communication. Transaction is used to ensure that atomicity is maintained for each transaction.

J2EE Application Components J2EE applications comprises various components. Client Components Built using applets which runs on client machine Web Compoents Built using Java Servlet technology and JSP technology which runs on server. Business Compnents Built using EJB technolgy which runs on server. Web clients Dynamic web pages with HTML, rendered by web browsers. Can include applets. Communicates with server typically using HTTP. Application clients User interface using GUI components such as Swing and AWT. Directly accesses the business logic tier. Components are self contained software modules which can be used for plug-and-play kind of software development. If want to change one functionality, the current component can be replaced by another component without affecting the whole application.

Web Components J2EE Web components can be either servlets or JSP pages Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content Static HTML pages and applets are bundled with Web components during application assembly, but are not considered Web components by the J2EE specification. Server-side utility classes can also be bundled with Web components and, like HTML pages, are not considered Web components.

Web Tier As shown in the next slide Figure the Web tier, like the client tier, might include a JavaBeans component to manage the user input and send that input to enterprise beans running in the business tier for processing

Business Tier Business code, which is logic that solves or meets the needs of a particular business domain such as banking, retail, or finance, is handled by enterprise beans running in the business tier.

Java 2 Enterprise Edition (J2EE) Example Java 2 Enterprise Edition (J2EE) (continued) An EJB Container is a run-time environment that controls the enterprise beans and provide system-level services such as: Transaction management, security (through deployment descriptors) Remote client connectivity (through Java RMI over IIOP protocol) Life cycle management such as creating and removing the beans, and maintaining the beans in their active and passive states Database connection pooling to maintain a pool of database connections, thus reducing the cost and time involved in obtaining database connections. A database is a persistent storage for the data. Instructor Note The details of servlets and JSPs are covered in other courses. Do not discuss them here in detail. Various terms introduced here such as deployment descriptors and life cycle management are discussed in detail in the following lessons. J2EE server Web Container HTTP Request Servlet HTTP Response Client (Browser) Bean1 Bean2 EJB Container Database

Containers Containers are a central theme in J2EE architecture. Containers are like the rooms in the house- People and things exist in the rooms, and interface with the infrastructure through well-defined interfaces. In an application server, Web and business components exist inside the containers and interface with the Java EE infrastructure through well-defined interfaces.

J2EE Containers What is a Container Containers are the interface between a component and the low-level platform specific functionality that supports the component. How does it work Container settings are specified for each component during assembly process before deployment. What do I get Support for security, transaction management, JNDI lookup, Remote connectivity. Here are some of the highlights: The J2EE security model lets you configure a Web component or enterprise bean so that system resources are accessed only by authorized users. The J2EE transaction model lets you specify relationships among methods that make up a single transaction so that all methods in one transaction are treated as a single unit. JNDI lookup services provide a unified interface to multiple naming and directory services in the enterprise so that application components can access naming and directory services. The J2EE remote connectivity model manages low-level communications between clients and enterprise beans. After an enterprise bean is created, a client invokes methods on it as if it were in the same virtual machine.

J2EE Containers (cont..) Manage life cycle of objects Manage transactions Provide security Resource optimization DB pooling Compiled JSP Caching Persistence support CMP (EJB-QL) Here are some of the highlights: The J2EE security model lets you configure a Web component or enterprise bean so that system resources are accessed only by authorized users. The J2EE transaction model lets you specify relationships among methods that make up a single transaction so that all methods in one transaction are treated as a single unit. JNDI lookup services provide a unified interface to multiple naming and directory services in the enterprise so that application components can access naming and directory services. The J2EE remote connectivity model manages low-level communications between clients and enterprise beans. After an enterprise bean is created, a client invokes methods on it as if it were in the same virtual machine. CMP – Container Managed Persistence EJB–QL – Enterprise Java Bean Query Language (similar to SQL).

Types of Containers EJB Container Web Container Application Client Container Applet Container

Compilation and Deployment Compilation (building the executables) uses build tool such as Apache Ant. The components of the various tiers are packaged: .jar, .war, .ear Declarative resources are added. A deploy tool or management tool is used to deploy the packaged units into a J2EE server (container).

Thank You