introduction to java ee (j2ee) - inf.mit.bme.hu · • jsp 2.1 – unification w/ jsf 1.2
TRANSCRIPT
![Page 1: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/1.jpg)
INTRODUCTION TOJAVA EE (J2EE)
![Page 2: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/2.jpg)
ChallengesPortabilityDiverse EnvironmentsTime-to-marketCore CompetenceAssemblyIntegration
Key TechnologiesJ2SE™
J2EE™
JMSServletJSPConnector
XMLData BindingXSLT
ProductsApp ServersWeb ServersComponents DatabasesObject to DB tools
LegacySystems
DatabasesTP MonitorsEIS Systems
Enterprise Computing
![Page 3: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/3.jpg)
What Is the J2EE?• Open and standard based platform for
• developing, deploying and managing • n-tier, Web-enabled, server-centric, and component-based
enterprise applications
![Page 4: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/4.jpg)
The Java™ Platform
High-EndServer
Java Technology Enabled Desktop
WorkgroupServer
Java Technology Enabled Devices
![Page 5: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/5.jpg)
THE JAVATM PLATFORM
OptionalPackages
Java 2Enterprise
Edition(J2EE)
Java 2StandardEdition(J2SE)
JVM
Java Card APIs
CardVM
OptionalPackages
Personal Basis Profile
Personal Profile
Foundation Profile
CDC
MIDP
CLDC
KVM
Java 2 Platform Micro Edition(J2METM)
* Under development in JCP
![Page 6: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/6.jpg)
Open and Standard Solution• 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
![Page 7: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/7.jpg)
J2EE TECHNOLOGIES
![Page 8: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/8.jpg)
J2EE 1.4 APIs and 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
![Page 9: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/9.jpg)
Java EE 5• 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
![Page 10: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/10.jpg)
What is a Servlet? • 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
![Page 11: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/11.jpg)
What is JSP Technology?• 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
![Page 12: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/12.jpg)
EJBEnterprise Java Beans
![Page 13: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/13.jpg)
What is EJB Technology?• A server-side component technology • Easy development and deployment of Java technology-
based application that are:• Transactional, distributed, multi-tier, portable, scalable, secure, …
![Page 14: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/14.jpg)
Why EJB Technology?
![Page 15: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/15.jpg)
Why EJB Technology?
● Leverages the benefits of component-model on the server side
![Page 16: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/16.jpg)
Why EJB Technology?
● Leverages the benefits of component-model on the server side
● Separates business logic from system code− Container provides system services
![Page 17: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/17.jpg)
Why EJB Technology?
● 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
![Page 18: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/18.jpg)
Why EJB Technology?
● 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
![Page 19: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/19.jpg)
EJB Architecture
![Page 20: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/20.jpg)
Enterprise JavaBeansEnterprise JavaBeans
Entity Bean Message-Driven Bean
Synchronous communication Asynchronous communication
Stateless Stateful
Bean managedPersistence
(BMP)
Container managedPersistence
(CMP)
Session Bean
![Page 21: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/21.jpg)
N-tier J2EE Architecture
![Page 22: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/22.jpg)
JND
I
J2SE
JMS
RM
I/IIO
P
JDB
C
Database
AppClient
App Client Container
HTTP/HTTPS
J2SE
RMI
J2SE
JND
I
JMS
RM
I/IIO
P
JDB
C
JTA JavaMail
JAF JND
I
JMS
RM
I/IIO
P
JDB
C
JTA
JavaMail
JAF
HTTP/HTTPS
Applet Container
Applet JSP Servlet EJB
Web Container EJB Container
RMI
J2SE
J2EE Containers & Components
![Page 23: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/23.jpg)
ComponentsHandle
l Concurrencyl Securityl Availabilityl Scalabilityl Persistencel Transactionl Life-cycle
managementl Management
l Presentationl Business Logic
ContainersHandle
![Page 24: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/24.jpg)
Containers & Components
![Page 25: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/25.jpg)
Containers & Components
• Containers do their work invisibly– No complicated APIs– They control by interposition
![Page 26: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/26.jpg)
Containers & Components
• 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
![Page 27: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/27.jpg)
DB & EISResources
Browser
Stand-alone
Web Server EJB Server
Web Server EJB Server
Typical J2EE applications
![Page 28: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/28.jpg)
J2EE Application Architectures● 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
![Page 29: Introduction to Java EE (J2EE) - inf.mit.bme.hu · • JSP 2.1 – Unification w/ JSF 1.2](https://reader034.vdocuments.us/reader034/viewer/2022050902/5ad967a77f8b9aee348b6149/html5/thumbnails/29.jpg)
Which One to Use?
● Depends on several factors− Requirements of applications− Availability of EJB tier− Availability of developer resource