• Aucun résultat trouvé

Java Enterprise Edition

N/A
N/A
Protected

Academic year: 2022

Partager "Java Enterprise Edition"

Copied!
29
0
0

Texte intégral

(1)

Java Enterprise Edition

Malik SAHEB

malik.saheb@gmail.com,

saheb@ece.fr

(2)

Course Objectives

Understanding the value propositions of Java EE

Getting a big picture of Java EE architecture and platform

Getting high-level exposure of APIs and Technologies that constitute Java EE

Developing Java EE Applications, using Eclipse

Knowing the big actors in the market

Going beyond Java EE and discovering Solutions for complete

integration or SOA solutions around Java

(3)

Introduction

What is Java EE ?

What are Java EE components ?

How applications are packaged ? En quoi consiste une application Java EE empaquetée ?

Java EE in the market?

(4)

History

In the beginning, there was darkness and cold. Then, …

Centralized, non-distributed

terminals mainframe

terminals

(5)

And then

In the 90’s, systems should be client-server

(6)

These days

Today, most enterprise applications use the

multi-tier model

(7)

Typical Scenario

Create a web application that is secure, reliable and can serve large quantities of data to thousands of concurrent users.

One Solution:

Hire lots of programmers to implement security, scalability, database features

Difficult to find skillset

High cost to build and maintain application

Could be error prone

(8)

Key Observations

Key observation made by application server vendors

Most web applications require similar features such as database access, security, scalability, etc.

Provide these features that are fully tested in a container to be leveraged by application developers

Similar to Java and C++ libraries

Allows application programmers to focus on business logic instead of writing all features from scratch

(9)

Java EE play into the game

Java EE stand for Java Enterprise Edition

Prefered Java EE and JEE

(https://java.net/projects/javaee-spec/pages/JEE)

It is a public specification that embodies several technologies

JNDI, JMS, JTA, JPA, EJB, JSP/Servlet, JCA, JAXRS, ...

JEE defines a model for developing multi-tier, web based, enterprise applications with distributed components

Current version is Java EE 6, and Java EE 7 in progress

Main goal of JEE 6 : simplify development. Using annotations and less XML configuration, more Plain Old Java Objects (POJOs), and simplified packaging.

(10)

Java EE an Architecture for Multitiered Applications

Image source : http://docs.oracle.com/javaee/6/tutorial/doc/bnaay.html

EIS = Enterprise information system-tier software runs on the EIS server, ex. ERP

Java EE Components

Client Components

Web Components

Business Components

(11)

Java EE Servers and Containers

Image source : http://docs.oracle.com/javaee/6/tutorial/doc/bnabo.html

(12)

Services Provided by Java EE

Web Services

Remote Invocations for distributed applications

Load balancing / clustering

Database integration

Persistence

Transaction

System, memory management

Message-oriented middleware

Security

Dynamic deployment

and many others….

(13)

Packaging Applications

A Java EE application is a component delivered as an archive:

Java Archive (JAR) (file with .jar extension)

Web Archive (WAR), (file with .war extension)

Enterprise Archive (EAR) (file with .ear extension)

Archives allow to assemble a number of different Java EE applications using some of the same components.

Ex : An EAR file contains Java EE modules and, optionally, deployment descriptors.

A deployment descriptor, (.xml file), describes the deployment settings of an application, a module, or a component.

Descriptor information can be changed without the need to modify the source code. Such information read at runtime by Java EE

server.

(14)

Packaging Applications

app.ear

classes

META-INF

application.xml

app.war

app.jar

index. html

Servlet1.class

META-INF

ejb-jar.xml vendor.xml Servlet2.class

EJB1.class EJB2.class

support.jar

WEB-INF

web.xml vendor.xml

file.jsp

lib

(15)

Java EE Roles

Java EE Product Provider

the company/organisation that designs and makes available the Java EE platform

Tool Provider

Application Component Provider

Enterprise Bean Developer

Web Component Developer

Application Client Developer

Application Assembler

Application Deployer and Administrator

(16)

Relationship among Java EE Containers

Several defined Java EE APIs, used by all some or all container

Web Container : JSP, JSF, Servlet, Bean Validation, Java Persistence, Connectors, Web Services, ..

EJB Container : EJB, Bean Validation, Java Persistence, Connectors, Web Services, JTA, JMS, ..

(17)

Architecture Java EE – A typical scenario

Client Web

Navigateur

Niveau Web Servlet

JSP

Client autonome

App Java

Serveur d'applications (JBoss) JNDI

Entité

Entité Session

avec état Session sans état

JMS JMX

Bean session avec état

Bean session sans état

Bean entité

Bean entité

Serveur BdD Base de données

HTTP HTTP

JDBC JDBC

(18)

Vendors

Traditional vendors (closed source)

IBM WebSphere Application Server

Oracle WebLogic

Open Source

JBoss Application Server / Red Hat

Apache Tomcat (only a web container)

Apache Geronimo

ObjectWeb JoNas

(19)

Alternatives to Java EE

Spring / Hibernate solution

Spring and Hibernate are good tools but not standardized

Widely used due to the complexity of previous Java EE specification

A better productivity is delivered by Java EE 6

Microsoft .Net

Similar functionality

Forced into one platform and one vendor

One of the key features of web services is the interoperability of .Net and Java EE.

(20)

Java EE est un standard dominant

Plusieurs fournisseurs:

Large gamme de prix (gratuit à exorbitant).

Le marché est dominé par une poignée de fournisseurs (IBM, Oracle, Red Hat)

JBoss domine le secteur open source

Jeu de composants mature développé sur une plate-forme mature (Java).

Portabilité des applications entre plusieurs systèmes d’exploitation et implémentations de serveur.

Code écrit une fois et exécuté sur plusieurs serveurs d’applications.

Les outils de fournisseurs tiers profitent de la portabilité d’une

plate-forme standardisée.

(21)

Discovering

The JBoss Application Server

(22)

22

Jboss Architecture

Fully Compliant to Java EE 6 – support profile Full et Web

(23)

23

Utilisable sur toute environnement Intégré avec OpenShift (PaaS)

Outils de Management/Supervision

Déploiement/ Provisioning

Monitoring

Console / scripts

Auto scale & Performance

Services utilisés à la demande

Plusieurs modèles de programmation

EE, Spring, OSGi, Ruby

Monitor

Manage Deploy

JBoss EAP 6: Meilleure gestion des Applications

On-premise and in the Cloud

(24)

24

Standalone servers

Équivalent EAP 5/4/3

Full features (clusters,...)

Domains

Nouveauté EAP 6

Controlleur de domaine

Gestion centralisée

Configurations & déploiements multi-serveurs

Full features (clusters,...)

Modes d'Exploitation de JBoss EAP 6

(25)

25

Technologies Modernes

(26)

26

JBoss Developer Studio (JBDS)

Agile, Flexible, Pour développer vos applications Eclipse by

Red Hat

• Java EE6

• HTML 5 and Mobile • Maven Support

WFK 2

• Spring 2.5, 3.0, 3.1 • GWT 1.7, 2.4

• RichFaces 2.4

• TorqueBox (TP)

(27)

27

Cloud Ready Platform

(28)

28

Web Console for administration

JBoss provides also a command line interface for scripting

(29)

Lab 1

Installation JBoss

Références

Documents relatifs

There is code to validate informal assertions specified as AIDA sentences [4]; code for creating index nanopublications to define small or large sets of nanopublications [5]; code

Izul uṯaras netta ḏ tameggit iness, it wassen zzays, qqarn-asd zzays ḏi twacunt nnes ṯamezyant niɣ ḏi ṯwacunt tameqrant ḏeg ayḍuḍ niġ deg talesa (humanité) u netta ḏ

Une classe est l’abstraction d’un ensemble d’objets qui possèdent une structure identique (attributs) et un même comportement (opérations, méthodes). Un objet est une

Specifically, this Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Upgrade and Migration Guide details Sun Java System Application Server 8.1 August 22,

Pour pouvoir compiler, notre application requiert l’utilisation de cer- taines librairies du serveur GlassFish (toutes les classes et annotations de Java EE 5 importées dans

JTA/JTS (Java Transaction API/Java Transaction Services) est un API définissant des interfaces standard avec un gestionnaire de transactions. JCA (J2EE Connector Architecture) est

Fournisseur fourn; // Remote interface, pas le bean // appel JNDI pour obtenir une référence à l’interface Home. ref

Il faut des classes final (ou record) pour maintenir la restriction de hi´ erarchie (branche) ou non−selead (mais cela limitera le