0% found this document useful (0 votes)
6 views47 pages

Summer Training Java

CETPA INFOTECH PVT LTD is one of the IT education and training service provider brands of India that is preferably working in 3 most important domains. It includes IT Training services, software and embedded product development and consulting services.

Uploaded by

mjcetpa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views47 pages

Summer Training Java

CETPA INFOTECH PVT LTD is one of the IT education and training service provider brands of India that is preferably working in 3 most important domains. It includes IT Training services, software and embedded product development and consulting services.

Uploaded by

mjcetpa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

What is J2EE?

Challenges Portability Diverse Environments Time-to-market Core Competence Assembly Integration

Key Technologies J2SE J2EE JMS Servlet JSP Connector XML Data Binding XSLT

Products App Servers Web Servers Components Databases Object to DB tools

Legacy Systems Databases TP Monitors EIS Systems

Open and standard based platform for


developing, deploying and managing n-tier, Web-enabled, server-centric, and componentbased enterprise applications

Java Technology Enabled Devices

Java Technology Enabled Desktop

Workgroup Server

High-End Server

Java 2 Platform Micro Edition (J2METM)

Optional Packages

Optional Packages

Java 2 Enterprise Edition (J2EE)

Java 2 Standard Edition (J2SE)

Personal Basis Profile

Personal Profile

Foundation Profile
CDC

MIDP CLDC KVM


Java Card APIs
CardVM

JVM

* Under development in JCP

Use "component and container" model in which container provides system services in a well-defined and as industry standard J2EE is that standard that also provides portability of code because it is based on Java technology and standard-based Java programming APIs

Why J2EE?

Can use any J2EE implementation for development and deployment


Use production-quality standard implementation which is free for development/deployment Use high-end commercial J2EE products for scalability and fault-tolerance

Vast amount of J2EE community resources

Many J2EE related books, articles, tutorials, quality code you can use, best practice guidelines, design patterns etc.

Can use off-the-shelf 3rd-party business components

Vendors work together on specifications and then compete in implementations

In the areas of Scalability, Performance, Reliability, Availability, Management and development tools, and so on

Freedom to innovate while maintaining the portability of applications Do not have create/maintain their own proprietary APIs

Application portability Many implementation choices are possible based on various requirements
Price (free to high-end), scalability (single CPU to clustered model), reliability, performance, tools, and more Best of breed of applications and platforms

Large developer pool

J2EE APIs & Technologies

J2SE 1.4 (improved) JAX-RPC (new) Web Service for J2EE J2EE Management J2EE Deployment JMX 1.1 JMS 1.1 JTA 1.0

Servlet 2.4 JSP 2.0 EJB 2.1 JAXR Connector 1.5 JACC JAXP 1.2 JavaMail 1.3 JAF 1.0

JAX-WS 2.0 & JSR 181 Java Persistence EJB 3.0 JAXB 2.0 JavaSever Faces 1.2 new to Platform JSP 2.1 Unification w/ JSF 1.2 StAX Pull Parser new to Platform

Java objects which extend the functionality of a HTTP server Dynamic contents generation Better alternative to CGI, NSAPI, ISAPI, etc.
Efficient Platform and server independent Session management Java-based

Request CGI1 Request CGI1 Request CGI2 Request CGI2 Request CGI1 Request CGI1 Request Servlet1 Request Servlet1 Request Servlet2 Request Servlet2 Request Servlet1

Child for CGI1 Child for CGI1

CGI CGI Based Based Webserver Webserver

Child for CGI2 Child for CGI2 Child for CGI1 Child for CGI1

Servlet Based Webserver Servlet Based Webserver


JVM JVM Servlet1 Servlet1 Servlet2 Servlet2

Enables separation of business logic from presentation


Presentation is in the form of HTML or XML/XSLT Business logic is implemented as Java Beans or custom tags Better maintainability, reusability

Extensible via custom tags Builds on Servlet technology

A server-side component technology Easy development and deployment of Java technology-based application that are:

Transactional, distributed, multi-tier, portable, scalable, secure,

Leverages the benefits of component-model on the server side Separates business logic from system code
Container provides system services

Provides framework for portable components


Over different J2EE-compliant servers Over different operational environments

Enables deployment-time configuration


Deployment descriptor

Enterprise JavaBeans

Synchronous communication Session Bean Entity Bean

Asynchronous communication Message-Driven Bean

Stateless

Stateful

Bean managed Persistence (BMP)

Container managed Persistence (CMP)

Messaging systems (MOM) provide


De-coupled communication Asynchronous communication Plays a role of centralized post office

Benefits of Messaging systems

Flexible, Reliable, Scalable communication systems

Point-to-Point, Publish and Subscribe JMS defines standard Java APIs to messaging systems

Defines standard API for integrating J2EE technology with EIS systems

CICS, SAP, PeopleSoft, etc.

Before Connector architecture, each App server has to provide an proprietary adaptor for each EIS system

m (# of App servers) x n (# of EIS's) Adaptors

With Connector architecture, same adaptor works with all J2EE compliant containers

1 (common to all App servers) x n (# of EIS's) Adaptors

m
App Server1 App Server2 App Server3 App Server

n
SAP

EIS 2 EIS3

EIS4

Pluggable authentication framework


Userid/password Smartcard Kerberos Biometric

Application portability regardless of authentication schemes underneath


JAAS provides authentication scheme independent API Authentication schemes are specified Login configuration file, which will be read by JAAS

Java Naming and Directory Interface Utilized by J2EE applications to locate resources and objects in portable fashion
Applications use symbolic names to find object references to resources via JNDI The symbolic names and object references have to be configured by system administrator when the application is deployed.

Provides standard Java programming API to relational database

Uses SQL

Vendors provide JDBC compliant driver which can be invoked via standard Java programming API

Management applications should be able to discover and interpret the managed data of any J2EE platform Single management platform can manage multiple J2EE servers from different vendors Management protocol specifications ensure a uniform view by SNMP and WBEM management stations Leverages JMX

Tools
IDEs

Standard Deployment API (Universal Remote)

J2EE Platforms

Vendor Deploy Tools

Management Tools

JMX API into the J2EE 1.4 platform

Dynamic Deployment

JMX JMX App J2EE App Server

JMX defacto

A single technology for the J2EE platform

J2EE is an End-to-End Architecture

Web Tier

EJB Tier

J2EE Component & Container Architecture

Applet Container Applet


HTTP/ HTTPS

Web Container

EJB Container

JSP

Servlet
RMI/IIOP

RMI

EJB
JavaMail
RMI/IIOP

J2SE

JDBC

App Client Container App Client


HTTP/ HTTPS

JAF

JAF

J2SE

RMI
RMI/IIOP

J2SE

JDBC

JNDI

JMS

J2SE

Database

JDBC

JNDI

JMS

JTA

JNDI

JMS

JTA

JavaMail

Containers Handle

Components Handle

Concurrency Security Availability Scalability Persistence Transaction Life-cycle management Management

Presentation Business Logic

Containers do their work invisibly


No complicated APIs They control by interposition

Containers implement J2EE


Look the same to components

Vendors making the containers have great freedom to innovate

J2EE Application Anatomies

Web Server

EJB Server

DB & EIS Resources

Browser

Web Server

EJB Server

Stand-alone

4-tier J2EE applications


HTML client, JSP/Servlets, EJB, JDBC/Connector

3-tier J2EE applications


HTML client, JSP/Servlets, JDBC

3-tier J2EE applications


EJB standalone applications, EJB, JDBC/Connector

B2B Enterprise applications


J2EE platform to J2EE platform through the exchange of JMS or XML-based messages

Depends on several factors


Requirements of applications Availability of EJB tier Availability of developer resource

Common questions

Powered by AI

The container model in J2EE contributes to the efficiency of enterprise applications by providing essential system services in a standard way, such as security, transaction management, and life-cycle management, without developers having to implement these features manually. This allows developers to focus on business logic while the container handles underlying management tasks, leading to more efficient and streamlined application development .

The J2EE platform balances flexibility and standardization by offering a common set of APIs and components that abide by universal standards while allowing vendors the freedom to implement these in diverse ways. This ensures applications are portable across various server environments and can be developed with a consistent approach to tackle scalability, security, and transaction management. Meanwhile, flexibility is maintained by enabling use of off-the-shelf components and allowing additional customization through the cooperation of the vast J2EE developer community .

The Connector architecture offers several advantages within the J2EE environment, including integration flexibility, cost reduction, and simplification of application server interactions with Enterprise Information Systems (EIS). By standardizing the API for integrating J2EE technology with EIS systems, each application server no longer needs a separate proprietary adapter. This simplifies the architecture to a single, common adapter for all J2EE-compliant containers, reducing implementation complexity and enhancing maintainability across varied EIS platforms like SAP and PeopleSoft .

J2EE leverages Java Management Extensions (JMX) to enhance server management and deployment by providing a standardized management and monitoring framework. JMX enables management applications to discover and interpret data across different J2EE servers and environments, offering a uniform management interface. This framework supports diverse management tasks such as configuration and dynamic deployment through a unified protocol, which ensures compatibility across different vendors' management platforms .

Java Naming and Directory Interface (JNDI) in the J2EE ecosystem acts as a standard interface for connecting to named resources, such as databases and messaging systems, across a network. It allows J2EE applications to locate objects, reference resources, and perform directory operations in a portable and extensible manner. The symbolic names and object references configured by system administrators enhance resource accessibility and integration within applications .

Enterprise JavaBeans (EJB) play a critical role in ensuring transactional integrity and scalability in enterprise applications within J2EE by providing server-managed, component-based architecture. EJBs abstract complex system-level services like transaction control, concurrency, and security, enabling developers to focus on business logic. Their support for both synchronous and asynchronous operations facilitates scalable multi-tier applications, making them a key component in managing large-scale, distributed enterprise systems effectively .

Vendor collaboration impacts the development and deployment of J2EE applications by providing multiple implementation options that cater to diverse needs regarding scalability, fault-tolerance, and performance. Vendors work together to define specifications that ensure portability and compatibility across different implementations, fostering innovation while maintaining standardization. This competitive yet cooperative environment ensures a robust ecosystem with a variety of tools and platforms for developers to choose from .

The separation of business logic from presentation in the J2EE framework, often achieved using Java Beans or custom tags for business logic and technologies like Servlets or JSP for presentation, improves application maintainability by promoting code modularity and reusability. Changes to business logic or presentation layers can be made independently without affecting the other, leading to simpler updates and enhancements over time. This separation also aids in scaling and testing, as components can be isolated and reused effectively .

J2EE addresses application portability by being based on Java technology and standardized Java programming APIs, which allow applications to run on any J2EE-compliant server without the need for modification. This is achieved through a set of specifications that ensure applications can be deployed across different environments. Additionally, the extensive resources, including books, tutorials, and best practices available within the J2EE community, further support application portability .

Messaging systems within J2EE, such as JMS, benefit enterprise applications by decoupling communication, allowing for asynchronous interactions that enhance reliability and scalability. They operate like a centralized post office that manages message distribution and ensures messages are delivered securely and efficiently. These systems enable components to communicate across varied environments without direct dependencies, thus offering flexible, reliable, and scalable solutions for complex enterprise applications .

You might also like