SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
Déployer une application Java EE
dans Azure
José Paumard @JosePaumard
Sébastien Pertus @SebastienPertus
tech.days 2015#mstechdays #JEEAzure
#JEEAzure
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Podcast « les casts codeurs »
http://lescastcodeurs.com/2014/10/26/lcc-111-interview-sur-microsoft-
azure-avec-patrick-chanezon-et-benjamin-guinebertiere/
 MOOC sur MVA
http://www.microsoftvirtualacademy.com/training-courses/deploiement-
application-java-dans-microsoft-azure
 Patterns !
https://github.com/Azure/azure-sdk-for-java
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Pourquoi vouloir déployer une application Java EE
dans Azure ?
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Pourquoi vouloir déployer une application Java EE
dans Azure ?
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Pour une application Java EE :
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Outils de développement pour le « Javaiste »
 IHM de gestion d’Azure, configuration, monitoring
 Gestion de données structurées / non structurées
 Application jouet
 Modes de déploiement de l’application
 Démo de l’application
 Q / R
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Eclipse Java EE « classique »
 + plugin spécifique Azure
 Ressource Github
https://github.com/azure
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Java EE = jeu de spécifications
 Java EE = du papier !
 Du papier + une implémentation de référence
 JPA → EclipseLink
 JAX-RS → Jersey
 JSF → Mojara
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Organisation
Déployer une application Java EE dans Azure
Portable
extensions
JSP 2.3 JSF 2.2 JAX RS 2 EL 3
Servlet 3.1
Managed Beans 1.0 EJB 3.2
JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0
Interceptors 1.1 CDI 1.1
Common
annotations 1.1
BeanValidation1.1
Concurrency
utilities
Batch
applications
Java API
for JSON
Java API
for Websocket
tech.days 2015#mstechdays #JEEAzure
 Organisation
Déployer une application Java EE dans Azure
Portable
extensions
JSP 2.3 JSF 2.2 JAX RS 2 EL 3
Servlet 3.1
Managed Beans 1.0 EJB 3.2
JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0
Interceptors 1.1 CDI 1.1
Common
annotations 1.1
BeanValidation1.1
Concurrency
utilities
Batch
applications
Java API
for JSON
Java API
for Websocket
tech.days 2015#mstechdays #JEEAzure
 Organisation
Déployer une application Java EE dans Azure
Portable
extensions
JSP 2.3 JSF 2.2 JAX RS 2 EL 3
Servlet 3.1
Managed Beans 1.0 EJB 3.2
JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0
Interceptors 1.1 CDI 1.1
Common
annotations 1.1
BeanValidation1.1
Concurrency
utilities
Batch
applications
Java API
for JSON
Java API
for Websocket
tech.days 2015#mstechdays #JEEAzure
 Organisation
Déployer une application Java EE dans Azure
Portable
extensions
JSP 2.3 JSF 2.2 JAX RS 2 EL 3
Servlet 3.1
Managed Beans 1.0 EJB 3.2
JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0
Interceptors 1.1 CDI 1.1
Common
annotations 1.1
Concurrency
utilities
Batch
applications
Java API
for JSON
Java API
for Websocket
BeanValidation1.1
tech.days 2015#mstechdays #JEEAzure
 JPA, EJB, JAX-RS, JAX-WS
 JSF (si on l’utilise)
 JMS ?
 Java Mail ?
 Journalisation ?
→ On peut utiliser directement des services cloud
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
SQL Database
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Deux versions de Java EE
 Tomcat implémente le « web profile »
 Wildfly (JBoss), Glassfish, Weblogic, Websphere,
implémentent le « full profile »
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Accès aux données (JPA)
 Couche de service (EJB)
 Services REST (JAX-RS)
 IHM (JSF)
 Stockage d’images en BLOB
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
public class Musician {
private String name ;
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
public class Musician {
private Long id ;
private String name ;
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@Id
private Long id ;
private String name ;
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Long id ;
private String name ;
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Long id ;
private String name ;
@Temporal(TemporalType.DATE)
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Long id ;
@Column(name="name")
private String name ;
@Temporal(TemporalType.DATE)
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Long id ;
@Column(name="name")
private String name ;
@Temporal(TemporalType.DATE)
private Date dateOfBirth ;
@Enumerated(EnumType.STRING)
private MusicType musicType ;
// getters / setters
}
public enum MusicType {
JAZZ, CLASSICAL, ROCK, FOLK
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@OneToMany
private List<Instrument> instruments ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@OneToMany
private List<Instrument> instruments ;
@ManyToMany
private List<Orchestra> orchestras ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@OneToMany
private List<Instrument> instruments ;
@ManyToMany
private List<Orchestra> orchestras ;
@Embedded
private Address address ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@OneToMany
private List<Instrument> instruments ;
@ManyToMany
private List<Orchestra> orchestras ;
@Embedded
private Address address ;
@Column(name="email", length=80)
private String email ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 « Entité » JPA
Déployer une application Java EE dans Azure
@Entity
public class Musician {
@OneToMany
private List<Instrument> instruments ;
@ManyToMany
private List<Orchestra> orchestras ;
@Embedded
private Address address ;
@Column(name="email", length=80) @Email
private String email ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 Gestion des relations *:*
 Gestion de l’héritage
 Génération du schéma
 Adaptation à un schéma existant
 Gestion des requêtes SQL / JPQL
 Configuration par annotations ou XML
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
 Injection / production
@Stateless
public class EntityManagerProvider {
@PersistenceContext(unitName="DataService")
private static EntityManager entityManager ;
}
tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
 Injection / production
@Stateless
public class EntityManagerProvider {
@Produces
@PersistenceContext(unitName="DataService")
private static EntityManager entityManager ;
}
tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
 Injection / production
@Stateless
public class EntityManagerProvider {
@Produces
@PersistenceContext(unitName="DataService")
private static EntityManager entityManager ;
}
@Stateless
public class MusicianService {
@Inject
private EntityManager em ;
}
tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
 Injection / production
@Stateless
public class EntityManagerProvider {
@Produces @DBProd
@PersistenceContext(unitName="DataService")
private static EntityManager entityManager ;
}
@Stateless
public class MusicianService {
@Inject @DBProd
private EntityManager em ;
}
tech.days 2015#mstechdays #JEEAzure
 Implémentées par des EJB
Déployer une application Java EE dans Azure
public class MusicianService {
private EntityManager em ;
public Musician findById(long id) {
return em.find(Musician.class, id) ;
}
public List<Musician> findByName(String name) {
Query q = em.createNamedQuery("Musician.byName") ;
q.setParam("name", name) ;
return q.getResultList() ;
}
}
tech.days 2015#mstechdays #JEEAzure
 Implémentées par des EJB
Déployer une application Java EE dans Azure
@Stateless
public class MusicianService {
@Inject
private EntityManager em ;
public Musician findById(long id) {
return em.find(Musician.class, id) ;
}
public List<Musician> findByName(String name) {
Query q = em.createNamedQuery("Musician.byName") ;
q.setParam("name", name) ;
return q.getResultList() ;
}
}
tech.days 2015#mstechdays #JEEAzure
 Implémentées par des EJB
Déployer une application Java EE dans Azure
@Stateless
public class MusicianService {
@Inject
private EntityManager em ;
@Transactionnal(TxType.SUPPORTS)
public Musician findById(long id) {
return em.find(Musician.class, id) ;
}
@Transactionnal(TxType.SUPPORTS)
public List<Musician> findByName(String name) {
Query q = em.createNamedQuery("Musician.byName") ;
q.setParam("name", name) ;
return q.getResultList() ;
}
}
tech.days 2015#mstechdays #JEEAzure
 JAX-RS
Déployer une application Java EE dans Azure
public class MusicianRestService {
private MusicianService musicianService ;
public Response getById( long id) {
Musician musician = musicianService.findById(id) ;
if (musician == null) {
return Response.status(Status.NOT_FOUND).build() ;
} else {
return Response.ok(musician).build() ;
}
}
}
tech.days 2015#mstechdays #JEEAzure
 JAX-RS
Déployer une application Java EE dans Azure
@Path("musician")
public class MusicianRestService {
@Inject
private MusicianService musicianService ;
@Path("{id}") // /musician/23
public Response getById( long id) {
Musician musician = musicianService.findById(id) ;
if (musician == null) {
return Response.status(Status.NOT_FOUND).build() ;
} else {
return Response.ok(musician).build() ;
}
}
}
tech.days 2015#mstechdays #JEEAzure
 JAX-RS
Déployer une application Java EE dans Azure
@Path("musician")
public class MusicianRestService {
@Inject
private MusicianService musicianService ;
@Path("{id}") // /musician/23
public Response getById(@PathParam("id") long id) {
Musician musician = musicianService.findById(id) ;
if (musician == null) {
return Response.status(Status.NOT_FOUND).build() ;
} else {
return Response.ok(musician).build() ;
}
}
}
tech.days 2015#mstechdays #JEEAzure
 JAX-RS
Déployer une application Java EE dans Azure
@Path("musician")
public class MusicianRestService {
@Inject
private MusicianService musicianService ;
@Path("{id}") // /musician/23
@GET
public Response getById(@PathParam("id") long id) {
Musician musician = musicianService.findById(id) ;
if (musician == null) {
return Response.status(Status.NOT_FOUND).build() ;
} else {
return Response.ok(musician).build() ;
}
}
}
tech.days 2015#mstechdays #JEEAzure
 JAX-RS
Déployer une application Java EE dans Azure
@Path("musician")
public class MusicianRestService {
@Inject
private MusicianService musicianService ;
@Path("{id}") // /musician/23
@GET @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_JSON})
public Response getById(@PathParam("id") long id) {
Musician musician = musicianService.findById(id) ;
if (musician == null) {
return Response.status(Status.NOT_FOUND).build() ;
} else {
return Response.ok(musician).build() ;
}
}
}
tech.days 2015#mstechdays #JEEAzure
 JAX-RS / JAXB
Déployer une application Java EE dans Azure
@XmlRootElement @XmlAccessorType(XmlAccessType.FIELD)
public class Musician {
@XmlAttribute
private Long id ;
@XmlElement
private String name ;
@XmlElement(name="date-of-birth")
private Date dateOfBirth ;
private MusicType musicType ;
// getters / setters
}
tech.days 2015#mstechdays #JEEAzure
 Présentation de l’IHM (MVC)
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
IaaS / PaaS
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
Application CRUD
Service REST
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Azure offre une solution de déploiement
d’application Java
 Techniquement très complète et « à jour »
 Commercialement supportée
 Donc oui, évaluer Azure lorsque l’on veut déployer
du Java dans le cloud, c’est intéressant !
Déployer une application Java EE dans Azure
tech.days 2015#mstechdays #JEEAzure
 Questions ? Commentaires ? Interrogations ?
@JosePaumard
@SebastienPertus
Déployer une application Java EE dans Azure
© 2015 Microsoft Corporation. All rights reserved.
tech days•
2015
#mstechdays techdays.microsoft.fr

Contenu connexe

Tendances

Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - ZenikaPrésentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Zenika
 
Introduction à Zend Framework 2
Introduction à Zend Framework 2Introduction à Zend Framework 2
Introduction à Zend Framework 2
Mickael Perraud
 
Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)
Eric SIBER
 

Tendances (20)

Gradle_NormandyJUG
Gradle_NormandyJUGGradle_NormandyJUG
Gradle_NormandyJUG
 
Spring ioc
Spring iocSpring ioc
Spring ioc
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Presentation JPA
Presentation JPAPresentation JPA
Presentation JPA
 
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - ZenikaPrésentation Gradle au LyonJUG par Grégory Boissinot - Zenika
Présentation Gradle au LyonJUG par Grégory Boissinot - Zenika
 
Environnement java
Environnement javaEnvironnement java
Environnement java
 
5 android web_service
5 android web_service5 android web_service
5 android web_service
 
Gradle_BordeauxJUG
Gradle_BordeauxJUGGradle_BordeauxJUG
Gradle_BordeauxJUG
 
Introduction à Zend Framework 2
Introduction à Zend Framework 2Introduction à Zend Framework 2
Introduction à Zend Framework 2
 
Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)Spring Meetup Paris - Back to the basics of Spring (Boot)
Spring Meetup Paris - Back to the basics of Spring (Boot)
 
gradle_nantesjug
gradle_nantesjuggradle_nantesjug
gradle_nantesjug
 
Rapport tp1 j2ee
Rapport tp1 j2eeRapport tp1 j2ee
Rapport tp1 j2ee
 
Jpa(1)
Jpa(1)Jpa(1)
Jpa(1)
 
gradle_lavajug
gradle_lavajuggradle_lavajug
gradle_lavajug
 
Introduction à JPA (Java Persistence API )
Introduction à JPA  (Java Persistence API )Introduction à JPA  (Java Persistence API )
Introduction à JPA (Java Persistence API )
 
Introduction aspnet
Introduction aspnetIntroduction aspnet
Introduction aspnet
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring boot
 
Gradle_ToursJUG
Gradle_ToursJUGGradle_ToursJUG
Gradle_ToursJUG
 
Les dessous du framework spring
Les dessous du framework springLes dessous du framework spring
Les dessous du framework spring
 
Gradle_ToulouseJUG
Gradle_ToulouseJUGGradle_ToulouseJUG
Gradle_ToulouseJUG
 

En vedette

En vedette (11)

Linked to ArrayList: the full story
Linked to ArrayList: the full storyLinked to ArrayList: the full story
Linked to ArrayList: the full story
 
API Asynchrones en Java 8
API Asynchrones en Java 8API Asynchrones en Java 8
API Asynchrones en Java 8
 
Java 8 Stream API and RxJava Comparison
Java 8 Stream API and RxJava ComparisonJava 8 Stream API and RxJava Comparison
Java 8 Stream API and RxJava Comparison
 
Les Streams sont parmi nous
Les Streams sont parmi nousLes Streams sont parmi nous
Les Streams sont parmi nous
 
Java SE 8 for Java EE developers
Java SE 8 for Java EE developersJava SE 8 for Java EE developers
Java SE 8 for Java EE developers
 
50 new things we can do with Java 8
50 new things we can do with Java 850 new things we can do with Java 8
50 new things we can do with Java 8
 
ArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateauArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateau
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 
50 nouvelles choses que l'on peut faire avec Java 8
50 nouvelles choses que l'on peut faire avec Java 850 nouvelles choses que l'on peut faire avec Java 8
50 nouvelles choses que l'on peut faire avec Java 8
 
JFokus 50 new things with java 8
JFokus 50 new things with java 8JFokus 50 new things with java 8
JFokus 50 new things with java 8
 
Java 8 Streams and Rx Java Comparison
Java 8 Streams and Rx Java ComparisonJava 8 Streams and Rx Java Comparison
Java 8 Streams and Rx Java Comparison
 

Similaire à Déploiement d'une application Java EE dans Azure

Play framework - Human Talks Grenoble - 12.02.2013
Play framework - Human Talks Grenoble - 12.02.2013Play framework - Human Talks Grenoble - 12.02.2013
Play framework - Human Talks Grenoble - 12.02.2013
Xavier NOPRE
 

Similaire à Déploiement d'une application Java EE dans Azure (20)

Spring Boot RestApi.pptx
Spring Boot RestApi.pptxSpring Boot RestApi.pptx
Spring Boot RestApi.pptx
 
Frameworks JavaScript en environnement MS
Frameworks JavaScript en environnement MSFrameworks JavaScript en environnement MS
Frameworks JavaScript en environnement MS
 
GtugDakar AppEngine, Gwt
GtugDakar AppEngine, GwtGtugDakar AppEngine, Gwt
GtugDakar AppEngine, Gwt
 
Quand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsQuand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les rails
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSP
 
Play framework - Human Talks Grenoble - 12.02.2013
Play framework - Human Talks Grenoble - 12.02.2013Play framework - Human Talks Grenoble - 12.02.2013
Play framework - Human Talks Grenoble - 12.02.2013
 
Introduction à GWT - GTI780 & MTI780 - ETS - A08
Introduction à GWT - GTI780 & MTI780 - ETS - A08Introduction à GWT - GTI780 & MTI780 - ETS - A08
Introduction à GWT - GTI780 & MTI780 - ETS - A08
 
Présentation DevoxxFR 2015 sur GWT
Présentation DevoxxFR 2015 sur GWTPrésentation DevoxxFR 2015 sur GWT
Présentation DevoxxFR 2015 sur GWT
 
Devoxx fr
Devoxx frDevoxx fr
Devoxx fr
 
Gwt intro-101
Gwt intro-101Gwt intro-101
Gwt intro-101
 
Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)
 
Architecture j2 ee
Architecture j2 eeArchitecture j2 ee
Architecture j2 ee
 
spring-api-rest.pdf
spring-api-rest.pdfspring-api-rest.pdf
spring-api-rest.pdf
 
Gab2015 vincent thavonekham_alm_devops_complète_en30_min_et_comment_gérer_la_...
Gab2015 vincent thavonekham_alm_devops_complète_en30_min_et_comment_gérer_la_...Gab2015 vincent thavonekham_alm_devops_complète_en30_min_et_comment_gérer_la_...
Gab2015 vincent thavonekham_alm_devops_complète_en30_min_et_comment_gérer_la_...
 
Annotation Processor, trésor caché de la JVM
Annotation Processor, trésor caché de la JVMAnnotation Processor, trésor caché de la JVM
Annotation Processor, trésor caché de la JVM
 
Javavs net
Javavs netJavavs net
Javavs net
 
Java entreprise edition et industrialisation du génie logiciel par m.youssfi
Java entreprise edition et industrialisation du génie logiciel par m.youssfiJava entreprise edition et industrialisation du génie logiciel par m.youssfi
Java entreprise edition et industrialisation du génie logiciel par m.youssfi
 
Introduction à GWT - GTI780 & MTI780 - ETS - A09
Introduction à GWT - GTI780 & MTI780 - ETS - A09Introduction à GWT - GTI780 & MTI780 - ETS - A09
Introduction à GWT - GTI780 & MTI780 - ETS - A09
 
Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)
 
Être productif avec JHipster - Devoxx France 2017
Être productif avec JHipster - Devoxx France 2017Être productif avec JHipster - Devoxx France 2017
Être productif avec JHipster - Devoxx France 2017
 

Plus de José Paumard

Plus de José Paumard (20)

Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19
 
From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdf
 
The Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern MatchingThe Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern Matching
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Designing functional and fluent API: application to some GoF patterns
Designing functional and fluent API: application to some GoF patternsDesigning functional and fluent API: application to some GoF patterns
Designing functional and fluent API: application to some GoF patterns
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of Flattery
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of Flattery
 
Designing functional and fluent API: example of the Visitor Pattern
Designing functional and fluent API: example of the Visitor PatternDesigning functional and fluent API: example of the Visitor Pattern
Designing functional and fluent API: example of the Visitor Pattern
 
Construire son JDK en 10 étapes
Construire son JDK en 10 étapesConstruire son JDK en 10 étapes
Construire son JDK en 10 étapes
 
Java Keeps Throttling Up!
Java Keeps Throttling Up!Java Keeps Throttling Up!
Java Keeps Throttling Up!
 
Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2
 
Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Java Full Throttle
Java Full ThrottleJava Full Throttle
Java Full Throttle
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
 
Collectors in the Wild
Collectors in the WildCollectors in the Wild
Collectors in the Wild
 
Streams in the wild
Streams in the wildStreams in the wild
Streams in the wild
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 
L'API Collector dans tous ses états
L'API Collector dans tous ses étatsL'API Collector dans tous ses états
L'API Collector dans tous ses états
 

Dernier

Copie de Engineering Software Marketing Plan by Slidesgo.pptx.pptx
Copie de Engineering Software Marketing Plan by Slidesgo.pptx.pptxCopie de Engineering Software Marketing Plan by Slidesgo.pptx.pptx
Copie de Engineering Software Marketing Plan by Slidesgo.pptx.pptx
ikospam0
 
Bilan énergétique des chambres froides.pdf
Bilan énergétique des chambres froides.pdfBilan énergétique des chambres froides.pdf
Bilan énergétique des chambres froides.pdf
AmgdoulHatim
 

Dernier (20)

La mondialisation avantages et inconvénients
La mondialisation avantages et inconvénientsLa mondialisation avantages et inconvénients
La mondialisation avantages et inconvénients
 
658708519-Power-Point-Management-Interculturel.pdf
658708519-Power-Point-Management-Interculturel.pdf658708519-Power-Point-Management-Interculturel.pdf
658708519-Power-Point-Management-Interculturel.pdf
 
Intégration des TICE dans l'enseignement de la Physique-Chimie.pptx
Intégration des TICE dans l'enseignement de la Physique-Chimie.pptxIntégration des TICE dans l'enseignement de la Physique-Chimie.pptx
Intégration des TICE dans l'enseignement de la Physique-Chimie.pptx
 
CompLit - Journal of European Literature, Arts and Society - n. 7 - Table of ...
CompLit - Journal of European Literature, Arts and Society - n. 7 - Table of ...CompLit - Journal of European Literature, Arts and Society - n. 7 - Table of ...
CompLit - Journal of European Literature, Arts and Society - n. 7 - Table of ...
 
Formation qhse - GIASE saqit_105135.pptx
Formation qhse - GIASE saqit_105135.pptxFormation qhse - GIASE saqit_105135.pptx
Formation qhse - GIASE saqit_105135.pptx
 
Cours Généralités sur les systèmes informatiques
Cours Généralités sur les systèmes informatiquesCours Généralités sur les systèmes informatiques
Cours Généralités sur les systèmes informatiques
 
les_infections_a_streptocoques.pptkioljhk
les_infections_a_streptocoques.pptkioljhkles_infections_a_streptocoques.pptkioljhk
les_infections_a_streptocoques.pptkioljhk
 
Télécommunication et transport .pdfcours
Télécommunication et transport .pdfcoursTélécommunication et transport .pdfcours
Télécommunication et transport .pdfcours
 
Echos libraries Burkina Faso newsletter 2024
Echos libraries Burkina Faso newsletter 2024Echos libraries Burkina Faso newsletter 2024
Echos libraries Burkina Faso newsletter 2024
 
Apolonia, Apolonia.pptx Film documentaire
Apolonia, Apolonia.pptx         Film documentaireApolonia, Apolonia.pptx         Film documentaire
Apolonia, Apolonia.pptx Film documentaire
 
RAPPORT DE STAGE D'INTERIM DE ATTIJARIWAFA BANK
RAPPORT DE STAGE D'INTERIM DE ATTIJARIWAFA BANKRAPPORT DE STAGE D'INTERIM DE ATTIJARIWAFA BANK
RAPPORT DE STAGE D'INTERIM DE ATTIJARIWAFA BANK
 
L application de la physique classique dans le golf.pptx
L application de la physique classique dans le golf.pptxL application de la physique classique dans le golf.pptx
L application de la physique classique dans le golf.pptx
 
Conférence Sommet de la formation 2024 : Développer des compétences pour la m...
Conférence Sommet de la formation 2024 : Développer des compétences pour la m...Conférence Sommet de la formation 2024 : Développer des compétences pour la m...
Conférence Sommet de la formation 2024 : Développer des compétences pour la m...
 
L'expression du but : fiche et exercices niveau C1 FLE
L'expression du but : fiche et exercices  niveau C1 FLEL'expression du but : fiche et exercices  niveau C1 FLE
L'expression du but : fiche et exercices niveau C1 FLE
 
Formation échiquéenne jwhyCHESS, parallèle avec la planification de projet
Formation échiquéenne jwhyCHESS, parallèle avec la planification de projetFormation échiquéenne jwhyCHESS, parallèle avec la planification de projet
Formation échiquéenne jwhyCHESS, parallèle avec la planification de projet
 
Copie de Engineering Software Marketing Plan by Slidesgo.pptx.pptx
Copie de Engineering Software Marketing Plan by Slidesgo.pptx.pptxCopie de Engineering Software Marketing Plan by Slidesgo.pptx.pptx
Copie de Engineering Software Marketing Plan by Slidesgo.pptx.pptx
 
Neuvaine de la Pentecôte avec des textes de saint Jean Eudes
Neuvaine de la Pentecôte avec des textes de saint Jean EudesNeuvaine de la Pentecôte avec des textes de saint Jean Eudes
Neuvaine de la Pentecôte avec des textes de saint Jean Eudes
 
Bilan énergétique des chambres froides.pdf
Bilan énergétique des chambres froides.pdfBilan énergétique des chambres froides.pdf
Bilan énergétique des chambres froides.pdf
 
STRATEGIE_D’APPRENTISSAGE flee_DU_FLE.pdf
STRATEGIE_D’APPRENTISSAGE flee_DU_FLE.pdfSTRATEGIE_D’APPRENTISSAGE flee_DU_FLE.pdf
STRATEGIE_D’APPRENTISSAGE flee_DU_FLE.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI DẠY BUỔI 2) - TIẾNG ANH 6, 7 GLOBAL SUCCESS (2...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI DẠY BUỔI 2) - TIẾNG ANH 6, 7 GLOBAL SUCCESS (2...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI DẠY BUỔI 2) - TIẾNG ANH 6, 7 GLOBAL SUCCESS (2...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI DẠY BUỔI 2) - TIẾNG ANH 6, 7 GLOBAL SUCCESS (2...
 

Déploiement d'une application Java EE dans Azure

  • 1. Déployer une application Java EE dans Azure José Paumard @JosePaumard Sébastien Pertus @SebastienPertus
  • 2. tech.days 2015#mstechdays #JEEAzure #JEEAzure Déployer une application Java EE dans Azure
  • 3. tech.days 2015#mstechdays #JEEAzure  Podcast « les casts codeurs » http://lescastcodeurs.com/2014/10/26/lcc-111-interview-sur-microsoft- azure-avec-patrick-chanezon-et-benjamin-guinebertiere/  MOOC sur MVA http://www.microsoftvirtualacademy.com/training-courses/deploiement- application-java-dans-microsoft-azure  Patterns ! https://github.com/Azure/azure-sdk-for-java Déployer une application Java EE dans Azure
  • 4. tech.days 2015#mstechdays #JEEAzure  Pourquoi vouloir déployer une application Java EE dans Azure ? Déployer une application Java EE dans Azure
  • 5. tech.days 2015#mstechdays #JEEAzure  Pourquoi vouloir déployer une application Java EE dans Azure ? Déployer une application Java EE dans Azure
  • 6. tech.days 2015#mstechdays #JEEAzure  Pour une application Java EE : Déployer une application Java EE dans Azure
  • 7. tech.days 2015#mstechdays #JEEAzure  Outils de développement pour le « Javaiste »  IHM de gestion d’Azure, configuration, monitoring  Gestion de données structurées / non structurées  Application jouet  Modes de déploiement de l’application  Démo de l’application  Q / R Déployer une application Java EE dans Azure
  • 8. tech.days 2015#mstechdays #JEEAzure  Eclipse Java EE « classique »  + plugin spécifique Azure  Ressource Github https://github.com/azure Déployer une application Java EE dans Azure
  • 9. tech.days 2015#mstechdays #JEEAzure  Java EE = jeu de spécifications  Java EE = du papier !  Du papier + une implémentation de référence  JPA → EclipseLink  JAX-RS → Jersey  JSF → Mojara Déployer une application Java EE dans Azure
  • 10. tech.days 2015#mstechdays #JEEAzure  Organisation Déployer une application Java EE dans Azure Portable extensions JSP 2.3 JSF 2.2 JAX RS 2 EL 3 Servlet 3.1 Managed Beans 1.0 EJB 3.2 JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0 Interceptors 1.1 CDI 1.1 Common annotations 1.1 BeanValidation1.1 Concurrency utilities Batch applications Java API for JSON Java API for Websocket
  • 11. tech.days 2015#mstechdays #JEEAzure  Organisation Déployer une application Java EE dans Azure Portable extensions JSP 2.3 JSF 2.2 JAX RS 2 EL 3 Servlet 3.1 Managed Beans 1.0 EJB 3.2 JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0 Interceptors 1.1 CDI 1.1 Common annotations 1.1 BeanValidation1.1 Concurrency utilities Batch applications Java API for JSON Java API for Websocket
  • 12. tech.days 2015#mstechdays #JEEAzure  Organisation Déployer une application Java EE dans Azure Portable extensions JSP 2.3 JSF 2.2 JAX RS 2 EL 3 Servlet 3.1 Managed Beans 1.0 EJB 3.2 JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0 Interceptors 1.1 CDI 1.1 Common annotations 1.1 BeanValidation1.1 Concurrency utilities Batch applications Java API for JSON Java API for Websocket
  • 13. tech.days 2015#mstechdays #JEEAzure  Organisation Déployer une application Java EE dans Azure Portable extensions JSP 2.3 JSF 2.2 JAX RS 2 EL 3 Servlet 3.1 Managed Beans 1.0 EJB 3.2 JCA 1.7 JPA 2.1 JTA 2.1 JMS 2.0 Interceptors 1.1 CDI 1.1 Common annotations 1.1 Concurrency utilities Batch applications Java API for JSON Java API for Websocket BeanValidation1.1
  • 14. tech.days 2015#mstechdays #JEEAzure  JPA, EJB, JAX-RS, JAX-WS  JSF (si on l’utilise)  JMS ?  Java Mail ?  Journalisation ? → On peut utiliser directement des services cloud Déployer une application Java EE dans Azure
  • 15. tech.days 2015#mstechdays #JEEAzure SQL Database Déployer une application Java EE dans Azure
  • 16. tech.days 2015#mstechdays #JEEAzure  Deux versions de Java EE  Tomcat implémente le « web profile »  Wildfly (JBoss), Glassfish, Weblogic, Websphere, implémentent le « full profile » Déployer une application Java EE dans Azure
  • 17. tech.days 2015#mstechdays #JEEAzure  Accès aux données (JPA)  Couche de service (EJB)  Services REST (JAX-RS)  IHM (JSF)  Stockage d’images en BLOB Déployer une application Java EE dans Azure
  • 18. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure public class Musician { private String name ; private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 19. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure public class Musician { private Long id ; private String name ; private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 20. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @Id private Long id ; private String name ; private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 21. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id ; private String name ; private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 22. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id ; private String name ; @Temporal(TemporalType.DATE) private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 23. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id ; @Column(name="name") private String name ; @Temporal(TemporalType.DATE) private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 24. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id ; @Column(name="name") private String name ; @Temporal(TemporalType.DATE) private Date dateOfBirth ; @Enumerated(EnumType.STRING) private MusicType musicType ; // getters / setters } public enum MusicType { JAZZ, CLASSICAL, ROCK, FOLK }
  • 25. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @OneToMany private List<Instrument> instruments ; // getters / setters }
  • 26. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @OneToMany private List<Instrument> instruments ; @ManyToMany private List<Orchestra> orchestras ; // getters / setters }
  • 27. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @OneToMany private List<Instrument> instruments ; @ManyToMany private List<Orchestra> orchestras ; @Embedded private Address address ; // getters / setters }
  • 28. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @OneToMany private List<Instrument> instruments ; @ManyToMany private List<Orchestra> orchestras ; @Embedded private Address address ; @Column(name="email", length=80) private String email ; // getters / setters }
  • 29. tech.days 2015#mstechdays #JEEAzure  « Entité » JPA Déployer une application Java EE dans Azure @Entity public class Musician { @OneToMany private List<Instrument> instruments ; @ManyToMany private List<Orchestra> orchestras ; @Embedded private Address address ; @Column(name="email", length=80) @Email private String email ; // getters / setters }
  • 30. tech.days 2015#mstechdays #JEEAzure  Gestion des relations *:*  Gestion de l’héritage  Génération du schéma  Adaptation à un schéma existant  Gestion des requêtes SQL / JPQL  Configuration par annotations ou XML Déployer une application Java EE dans Azure
  • 31. tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure  Injection / production @Stateless public class EntityManagerProvider { @PersistenceContext(unitName="DataService") private static EntityManager entityManager ; }
  • 32. tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure  Injection / production @Stateless public class EntityManagerProvider { @Produces @PersistenceContext(unitName="DataService") private static EntityManager entityManager ; }
  • 33. tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure  Injection / production @Stateless public class EntityManagerProvider { @Produces @PersistenceContext(unitName="DataService") private static EntityManager entityManager ; } @Stateless public class MusicianService { @Inject private EntityManager em ; }
  • 34. tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure  Injection / production @Stateless public class EntityManagerProvider { @Produces @DBProd @PersistenceContext(unitName="DataService") private static EntityManager entityManager ; } @Stateless public class MusicianService { @Inject @DBProd private EntityManager em ; }
  • 35. tech.days 2015#mstechdays #JEEAzure  Implémentées par des EJB Déployer une application Java EE dans Azure public class MusicianService { private EntityManager em ; public Musician findById(long id) { return em.find(Musician.class, id) ; } public List<Musician> findByName(String name) { Query q = em.createNamedQuery("Musician.byName") ; q.setParam("name", name) ; return q.getResultList() ; } }
  • 36. tech.days 2015#mstechdays #JEEAzure  Implémentées par des EJB Déployer une application Java EE dans Azure @Stateless public class MusicianService { @Inject private EntityManager em ; public Musician findById(long id) { return em.find(Musician.class, id) ; } public List<Musician> findByName(String name) { Query q = em.createNamedQuery("Musician.byName") ; q.setParam("name", name) ; return q.getResultList() ; } }
  • 37. tech.days 2015#mstechdays #JEEAzure  Implémentées par des EJB Déployer une application Java EE dans Azure @Stateless public class MusicianService { @Inject private EntityManager em ; @Transactionnal(TxType.SUPPORTS) public Musician findById(long id) { return em.find(Musician.class, id) ; } @Transactionnal(TxType.SUPPORTS) public List<Musician> findByName(String name) { Query q = em.createNamedQuery("Musician.byName") ; q.setParam("name", name) ; return q.getResultList() ; } }
  • 38. tech.days 2015#mstechdays #JEEAzure  JAX-RS Déployer une application Java EE dans Azure public class MusicianRestService { private MusicianService musicianService ; public Response getById( long id) { Musician musician = musicianService.findById(id) ; if (musician == null) { return Response.status(Status.NOT_FOUND).build() ; } else { return Response.ok(musician).build() ; } } }
  • 39. tech.days 2015#mstechdays #JEEAzure  JAX-RS Déployer une application Java EE dans Azure @Path("musician") public class MusicianRestService { @Inject private MusicianService musicianService ; @Path("{id}") // /musician/23 public Response getById( long id) { Musician musician = musicianService.findById(id) ; if (musician == null) { return Response.status(Status.NOT_FOUND).build() ; } else { return Response.ok(musician).build() ; } } }
  • 40. tech.days 2015#mstechdays #JEEAzure  JAX-RS Déployer une application Java EE dans Azure @Path("musician") public class MusicianRestService { @Inject private MusicianService musicianService ; @Path("{id}") // /musician/23 public Response getById(@PathParam("id") long id) { Musician musician = musicianService.findById(id) ; if (musician == null) { return Response.status(Status.NOT_FOUND).build() ; } else { return Response.ok(musician).build() ; } } }
  • 41. tech.days 2015#mstechdays #JEEAzure  JAX-RS Déployer une application Java EE dans Azure @Path("musician") public class MusicianRestService { @Inject private MusicianService musicianService ; @Path("{id}") // /musician/23 @GET public Response getById(@PathParam("id") long id) { Musician musician = musicianService.findById(id) ; if (musician == null) { return Response.status(Status.NOT_FOUND).build() ; } else { return Response.ok(musician).build() ; } } }
  • 42. tech.days 2015#mstechdays #JEEAzure  JAX-RS Déployer une application Java EE dans Azure @Path("musician") public class MusicianRestService { @Inject private MusicianService musicianService ; @Path("{id}") // /musician/23 @GET @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_JSON}) public Response getById(@PathParam("id") long id) { Musician musician = musicianService.findById(id) ; if (musician == null) { return Response.status(Status.NOT_FOUND).build() ; } else { return Response.ok(musician).build() ; } } }
  • 43. tech.days 2015#mstechdays #JEEAzure  JAX-RS / JAXB Déployer une application Java EE dans Azure @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class Musician { @XmlAttribute private Long id ; @XmlElement private String name ; @XmlElement(name="date-of-birth") private Date dateOfBirth ; private MusicType musicType ; // getters / setters }
  • 44. tech.days 2015#mstechdays #JEEAzure  Présentation de l’IHM (MVC) Déployer une application Java EE dans Azure
  • 45. tech.days 2015#mstechdays #JEEAzure IaaS / PaaS Déployer une application Java EE dans Azure
  • 46. tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
  • 47. tech.days 2015#mstechdays #JEEAzureDéployer une application Java EE dans Azure
  • 48. tech.days 2015#mstechdays #JEEAzure Application CRUD Service REST Déployer une application Java EE dans Azure
  • 49. tech.days 2015#mstechdays #JEEAzure  Azure offre une solution de déploiement d’application Java  Techniquement très complète et « à jour »  Commercialement supportée  Donc oui, évaluer Azure lorsque l’on veut déployer du Java dans le cloud, c’est intéressant ! Déployer une application Java EE dans Azure
  • 50. tech.days 2015#mstechdays #JEEAzure  Questions ? Commentaires ? Interrogations ? @JosePaumard @SebastienPertus Déployer une application Java EE dans Azure
  • 51. © 2015 Microsoft Corporation. All rights reserved. tech days• 2015 #mstechdays techdays.microsoft.fr