soft-shake.ch - jboss as 7, la révolution
DESCRIPTION
Alexis HasslerJBoss AS 7 est sorti pendant l’été 2011. Cette version est une véritable révolution pour tous les utilisateurs JBoss : temps de démarrage et de déploiement record, techniques d’administration renouvelées, configuration simplifiée et plus expressive,…Dans cette présentation, j’explique ces nouveautés et je les montre avec des vrais morceaux de ligne de commande.http://soft-shake.ch/2011/conference/sessions/java/2011/09/13/jboss.htmlTRANSCRIPT
![Page 1: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/1.jpg)
cocktail d’expérience informatiquesGenève 3 & 4 octobre 2011
Seconde édition
Track
Auteur
Session
Java
Alexis HASSLER
JBoss Application Server 7
soft-shake.ch
![Page 2: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/2.jpg)
![Page 3: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/3.jpg)
la révolution
Alexis Hassler
![Page 4: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/4.jpg)
@AlexisHassler
![Page 5: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/5.jpg)
![Page 6: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/6.jpg)
AlexisHassler
![Page 7: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/7.jpg)
JavaEE 6
JAX-RS
JAX-WSJAX-WS
Ent. WS
WS Metadata
JAX-RPC
JAXM
JAXR
JAXB
Managed Beans
WebService
Servlet
JAX-WSJSF
EL
JSTL
Debugging
JSP
WebApplication
CDI
EJB
Interceptors
Bean Validation
Enterprise Application
JCACommon
Annotations
JMS
JTA
DI
JPA
JavaMail
Auth. SPI
JAX-WSJACC
Management
JMX StAX
JDBC
JAF
Deployment
Java SE
JAXP
Management& Security
![Page 8: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/8.jpg)
JavaEE 6 – Web Profi le
Managed Beans
CDI
EJB 3 lite
Interceptors
Bean Validation
Enterprise Application
JTA
DI
JPA
Servlet
JAX-WSJSF
EL
JSTL
JSP
WebApplication
Debugging
![Page 9: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/9.jpg)
JavaEE 6 - Pruning
JAX-RPC
JAXR
WebService
WebApplication
EJB 2 entity
Enterprise Application
Deployment
Java SE
Management& Security
![Page 10: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/10.jpg)
JavaEE 6
Full P rofile
Web Profil e ++
Web Profil e.0
.0 preview
.1
![Page 11: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/11.jpg)
Historique
1999
2001
2000
2002
2003
2005
2004
2006
2007
2009
2008
2010
2011
JBoss Group LLC
JBoss Inc
RedHat
2.22.0
3.03.24.0
4.25.05.16.07.0, 6.1, 7.1
![Page 12: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/12.jpg)
Composants AS7
Core Infrastructure
SubsystemsD
atas
ourc
e
Java
EE
EJB
CDI -
Wel
d
JPA
- H
iber
nate
Nam
ing
Cach
e -
Infi
nisp
an
JMS
- H
orne
tQ
JGro
ups
JAX
-RS
- RE
STea
sy
JCA
- Ir
onJa
cam
ar
JBos
s Tr
ansa
ctio
n
JBos
s Lo
ggin
g
JSF
- M
ojar
ra
JAX
-WS
- CX
F
...
![Page 13: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/13.jpg)
Composants AS6
Micro container
ServicesD
atas
ourc
e
Java
EE
EJB
CDI -
Wel
d
JPA
- H
iber
nate
Nam
ing
Cach
e -
Infi
nisp
an
JMS
- H
orne
tQ
JGro
ups
JAX
-RS
- RE
STea
sy
JCA
JBos
s Tr
ansa
ctio
n
JBos
s Lo
ggin
g
JSF
- M
ojar
ra
JAX
-WS
- CX
F
...
![Page 14: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/14.jpg)
Architecture AS7
Core Infrastructure
Subsystems
Deployers VFS Jandex Reflect Cache Repository
Server Controller Service
MSCJBoss
ModulesDMR Controller Threads
![Page 15: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/15.jpg)
Startup
0 s
5 s
10 s
15 s
20 s
25 s
30 s
35 s
40 s
45 s
50 s
AS 4.0AS 4.2
AS 5.1
AS 6.0
AS 7.0
![Page 16: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/16.jpg)
Startup
0 s
10 s
20 s
30 s
40 s
50 s
60 s
70 s
80 s
90 s
Geronimo 2
GlassFish 2
GlassFish 3
JBoss 5
JBoss 6
Weblogic 10
Websphere 7
http://tiny.cc/agoncal-as-startup (12/2009)
![Page 17: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/17.jpg)
Startup
http://community.jboss.org/wiki/AS7StartupTimeShowdown
![Page 18: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/18.jpg)
Lightweight
0 Mo
20 Mo
40 Mo
60 Mo
80 Mo
100 Mo
120 Mo
140 Mo
160 Mo
180 Mo
AS 4.0 AS 4.2
AS 5.1
AS 6.0
AS 7.0
Heap used
![Page 19: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/19.jpg)
Configuration
find <profile_dir> -name *.xml | wc -l
0
20
40
60
80
100
120
140
160
AS 4.0 AS 4.2
AS 5.1
AS 6.0
AS 7.0
![Page 20: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/20.jpg)
bin
bundles
modules
standalone
domain
welcome-content
configuration
data
deployments
lib/ext
docs
bin
client
lib
server
common
docs
deploylib
default
standardalljbossweb-standaloneminimal
confdatadeploy
libdeployers
Configuration
![Page 21: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/21.jpg)
Configuration
standalone/configutation/standalone.xml
![Page 22: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/22.jpg)
Configuration
server/default/deploy/hdscanner-jboss-beans.xml
server/default/conf/bootstrap/profile.xml
![Page 23: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/23.jpg)
✔ Configuration (réseau)✔ Démarrage
![Page 24: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/24.jpg)
Déploiement
bin
bundles
modules
standalone
configuration
data
deployments
lib/ext
Automatique
– idem AS <7 pour les archives
– désactivé en mode explosé
cp demo.war $JBOSS_HOME/standalone/deployments/
17:12:24,923 INFO ... Deployed "demo.war"
![Page 25: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/25.jpg)
Déploiement
État
.dodeploy
.isdeploying
.deployed .failed
.pending
.isundeploying
.undeployed
.skipdeploy
![Page 26: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/26.jpg)
Déploiement
Manuel
– auto-deploy-zipped="false"
cp demo.war $JBOSS_HOME/standalone/deployments/
17:12:24,923 INFO ... Found demo.war ...
touch $JBOSS_HOME/standalone/deployments/demo.war.dodeploy
17:12:24,923 INFO ... Found demo.war ...
![Page 27: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/27.jpg)
✔ Déploiement automatique✔ Déploiement manuel
![Page 28: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/28.jpg)
Administration
Console CLI
HTTP / JSON Java API
![Page 29: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/29.jpg)
http://<host>:9990/console
![Page 30: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/30.jpg)
jboss-admin.sh
Naviguer
– cd, ls, pwd
Lire la configuration
– :read-resource, :read-attribute,...
Modifier la configuration
– :add-namespace, :write-attribute,...
![Page 31: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/31.jpg)
jboss-admin.sh
Datasource
Déploiement
– upload + deploy
– undeploy
![Page 32: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/32.jpg)
✔ Datasource
![Page 33: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/33.jpg)
Modules
"Classpath is dead!"
Mark Reinhold, JavaOne 2009
http://java.sun.com/javaone/2009/general_sessions.jsp
![Page 34: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/34.jpg)
Modules
Java Module
– Projet Jigsaw
– JavaSE 8
OSGi
JBoss Module
![Page 35: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/35.jpg)
Modules
Hiérarchie Modularité
System Classloader
JBossClassloaders
DeploymentClassloader
DeploymentClassloader
Sub-deploymentClassloader
UCR
deployment.my.war
org.hibernate.core
org.slf4j
org.jboss.weld
org.javassist
![Page 36: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/36.jpg)
Modules
Modules système
– Java EE
Modules user
Local Resource
Inter deployment dependencies
![Page 37: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/37.jpg)
Déploiement
Séparation module / application
1 war => 1 module
– deployment.demo.war
![Page 38: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/38.jpg)
Déploiement
1 ear => n modules
– ear/lib
– war
– ear
<!-- config globale --><subsystem xmlns="urn:jboss:domain:ee:1.0" > <ear-subdeployments-isolated> false </ear-subdeployments-isolated></subsystem>
<!-- jboss-deployment-structure.xml--><jboss-deployment-structure> <ear-subdeployments-isolated> true </ear-subdeployments-isolated></jboss-deployment-structure>
![Page 39: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/39.jpg)
Module global
standalone.xml ou domain.xml
– Slot = version
<subsystem xmlns="urn:jboss:domain:ee:1.0" > <global-modules> <module name="org.javassist" slot="main" /> </global-modules></subsystem>
![Page 40: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/40.jpg)
✔ SLF4J
![Page 41: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/41.jpg)
Domain
Host 1
HostController
Server
Server
Host 2
HostController
Server
Host 3
HostController
Server
Host 0
DomainController
![Page 42: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/42.jpg)
Domain
Host 1
HostController
Server
Server
Host 2
HostController
Server
Host 3
HostController
Server
Host 0
DomainController
Server Group 1
Server Group 2
![Page 43: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/43.jpg)
RHQ
Host 1
RHQAgent
JBoss AS
Httpd
Host 2
RHQAgent
...Host 0
RHQServer
MySQLOSMem, CPU, FS
...
...
...
![Page 44: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/44.jpg)
IDE
Eclipse 3.7 + JBoss Tools
IntelliJ IDEA 11
Netbeans 7.0
![Page 45: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/45.jpg)
![Page 46: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/46.jpg)
Cloud
IaaSInfrastructure as a Service
PaaSPlatform as a Service
SaaSSoftware as a Service
Hardware+
OS
Runtime/
Middleware
Software
![Page 47: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/47.jpg)
PaaS by redhat
Java, Perl, PHP, Python, Ruby
![Page 48: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/48.jpg)
Express
– Git
– < Web profile
Flex
– Contrôle étendu
– Amazon EC2
![Page 49: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/49.jpg)
![Page 50: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/50.jpg)
✔ OpenShift Express
![Page 51: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/51.jpg)
JBoss EAP 6
Q1 2012 (TBC)
Dérivé de AS 7.1
– JavaEE 6 full profile
… à suivre
![Page 52: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/52.jpg)
Conclusion
Travaux en cours
– Full profile
– Documentation
Retour d'expérience
.0
![Page 53: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/53.jpg)
Conclusion
1999
2001
2000
2002
2003
2005
2004
2006
2007
2009
2008
2010
2011
Glassfish 3
2.22.0
3.03.24.0
4.25.05.16.07.0, 6.1, 7.1
Glassfish 2
![Page 54: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/54.jpg)
http://www.jboss.org/as7.html
http://www.jboss.org/openshift/
![Page 55: soft-shake.ch - JBoss AS 7, la révolution](https://reader034.vdocuments.site/reader034/viewer/2022051208/54582564b1af9fba5d8b4b7f/html5/thumbnails/55.jpg)
Auto-promotion
http://www.sewatech.fr/formation-jboss-7.html
http://blog.alexis-hassler.com