jboss as 7, la révolution
DESCRIPTION
JBoss 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 et peu de cloud.TRANSCRIPT
![Page 1: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/1.jpg)
la révolution
Alexis Hassler
![Page 2: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/2.jpg)
@AlexisHassler
![Page 3: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/3.jpg)
![Page 4: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/4.jpg)
AlexisHassler
![Page 5: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/5.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 6: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/6.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 7: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/7.jpg)
JavaEE 6 - Pruning
JAX-RPC
JAXR
WebService
WebApplication
EJB 2 entity
Enterprise Application
Deployment
Java SE
Management& Security
![Page 8: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/8.jpg)
JavaEE 6
Full P rofile
Web Profil e ++
Web Profil e.0
.0 preview
.1
![Page 9: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/9.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 10: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/10.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 11: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/11.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 12: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/12.jpg)
Architecture AS7
Core Infrastructure
Subsystems
Deployers VFS Jandex Reflect Cache Repository
Server Controller Service
MSCJBoss
ModulesDMR Controller Threads
![Page 13: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/13.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 14: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/14.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 15: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/15.jpg)
Startup
http://community.jboss.org/wiki/AS7StartupTimeShowdown
![Page 16: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/16.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 17: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/17.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 18: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/18.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 19: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/19.jpg)
Configuration
standalone/configutation/standalone.xml
![Page 20: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/20.jpg)
Configuration
server/default/deploy/hdscanner-jboss-beans.xml
server/default/conf/bootstrap/profile.xml
![Page 21: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/21.jpg)
✔ Configuration (réseau)✔ Démarrage
![Page 22: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/22.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 23: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/23.jpg)
Déploiement
État
.dodeploy
.isdeploying
.deployed .failed
.pending
.isundeploying
.undeployed
.skipdeploy
![Page 24: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/24.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 25: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/25.jpg)
✔ Déploiement automatique✔ Déploiement manuel
![Page 26: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/26.jpg)
Administration
Console CLI
HTTP / JSON Java API
![Page 27: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/27.jpg)
http://<host>:9990/console
![Page 28: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/28.jpg)
jboss-admin.sh
Naviguer
– cd, ls, pwd
Lire la configuration
– :read-resource, :read-attribute,...
Modifier la configuration
– :add-namespace, :write-attribute,...
![Page 29: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/29.jpg)
jboss-admin.sh
Datasource
Déploiement
– upload + deploy
– undeploy
![Page 30: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/30.jpg)
✔ Datasource
![Page 31: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/31.jpg)
Modules
"Classpath is dead!"
Mark Reinhold, JavaOne 2009
http://java.sun.com/javaone/2009/general_sessions.jsp
![Page 32: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/32.jpg)
Modules
Java Module
– Projet Jigsaw
– JavaSE 8
OSGi
JBoss Module
![Page 33: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/33.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 34: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/34.jpg)
Modules
Modules système
– Java EE
Modules user
Local Resource
Inter deployment dependencies
![Page 35: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/35.jpg)
Déploiement
Séparation module / application
1 war => 1 module
– deployment.demo.war
![Page 36: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/36.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 37: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/37.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 38: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/38.jpg)
✔ SLF4J
![Page 39: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/39.jpg)
Domain
Host 1
HostController
Server
Server
Host 2
HostController
Server
Host 3
HostController
Server
Host 0
DomainController
![Page 40: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/40.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 41: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/41.jpg)
RHQ
Host 1
RHQAgent
JBoss AS
Httpd
Host 2
RHQAgent
...Host 0
RHQServer
MySQLOSMem, CPU, FS
...
...
...
![Page 42: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/42.jpg)
IDE
Eclipse 3.7 + JBoss Tools
IntelliJ IDEA 11
Netbeans 7.0
![Page 43: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/43.jpg)
![Page 44: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/44.jpg)
Cloud
IaaSInfrastructure as a Service
PaaSPlatform as a Service
SaaSSoftware as a Service
Hardware+
OS
Runtime/
Middleware
Software
![Page 45: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/45.jpg)
PaaS by redhat
Java, Perl, PHP, Python, Ruby
![Page 46: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/46.jpg)
Express
– Git
– < Web profile
Flex
– Contrôle étendu
– Amazon EC2
![Page 47: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/47.jpg)
![Page 48: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/48.jpg)
✔ OpenShift Express
![Page 49: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/49.jpg)
JBoss EAP 6
Q1 2012 (TBC)
Dérivé de AS 7.1
– JavaEE 6 full profile
… à suivre
![Page 50: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/50.jpg)
Conclusion
Travaux en cours
– Full profile
– Documentation
Retour d'expérience
.0
![Page 51: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/51.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 52: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/52.jpg)
http://www.jboss.org/as7.html
http://www.jboss.org/openshift/
![Page 53: JBoss AS 7, la révolution](https://reader034.vdocument.in/reader034/viewer/2022051109/54922320ac795925288b46f1/html5/thumbnails/53.jpg)
Auto-promotion
http://www.sewatech.fr/formation-jboss-7.html
http://blog.alexis-hassler.com