SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie Développez et déployez votre application Java dans Azure

Frameworks JavaScript en environnement MS
Frameworks JavaScript en environnement MSFrameworks JavaScript en environnement MS
Frameworks JavaScript en environnement MSSébastien Ollivier
 
GtugDakar AppEngine, Gwt
GtugDakar AppEngine, GwtGtugDakar AppEngine, Gwt
GtugDakar AppEngine, Gwthkairi
 
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 railsArnaud Héritier
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPYouness Boukouchi
 
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.2013Xavier NOPRE
 
Introduction à GWT - GTI780 & MTI780 - ETS - A08
Introduction à GWT - GTI780 & MTI780 - ETS - A08Introduction à GWT - GTI780 & MTI780 - ETS - A08
Introduction à GWT - GTI780 & MTI780 - ETS - A08Claude Coulombe
 
Présentation DevoxxFR 2015 sur GWT
Présentation DevoxxFR 2015 sur GWTPrésentation DevoxxFR 2015 sur GWT
Présentation DevoxxFR 2015 sur GWTDNG Consulting
 
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)Celinio Fernandes
 
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_...Vincent Thavonekham-Pro
 
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 JVMRaphaël Brugier
 

Ähnlich wie Développez et déployez votre application Java 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
 
gradle_nantesjug
gradle_nantesjuggradle_nantesjug
gradle_nantesjug
 
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
 
Gradle_ToulouseJUG
Gradle_ToulouseJUGGradle_ToulouseJUG
Gradle_ToulouseJUG
 
Gradle_ToursJUG
Gradle_ToursJUGGradle_ToursJUG
Gradle_ToursJUG
 
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
 
Gradle_LyonJUG
Gradle_LyonJUGGradle_LyonJUG
Gradle_LyonJUG
 
gradle_lavajug
gradle_lavajuggradle_lavajug
gradle_lavajug
 
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
 

Mehr von Microsoft

Uwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuUwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuMicrosoft
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaSMicrosoft
 
Tester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileTester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileMicrosoft
 
Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Microsoft
 
Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Microsoft
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
Créer un bot de A à Z
Créer un bot de A à ZCréer un bot de A à Z
Créer un bot de A à ZMicrosoft
 
Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft
 
Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Microsoft
 
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Microsoft
 
Administration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsAdministration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsMicrosoft
 
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Microsoft
 
Plan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryPlan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryMicrosoft
 
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Microsoft
 
Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Microsoft
 
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Microsoft
 
Introduction à ASP.NET Core
Introduction à ASP.NET CoreIntroduction à ASP.NET Core
Introduction à ASP.NET CoreMicrosoft
 
Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Microsoft
 
Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Microsoft
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursMicrosoft
 

Mehr von Microsoft (20)

Uwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuUwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieu
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaS
 
Tester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileTester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobile
 
Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo
 
Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
Créer un bot de A à Z
Créer un bot de A à ZCréer un bot de A à Z
Créer un bot de A à Z
 
Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?
 
Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016
 
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
 
Administration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsAdministration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs Analytics
 
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
 
Plan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryPlan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site Recovery
 
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
 
Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.
 
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
 
Introduction à ASP.NET Core
Introduction à ASP.NET CoreIntroduction à ASP.NET Core
Introduction à ASP.NET Core
 
Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?
 
Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeurs
 

Développez et déployez votre application Java 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