jboss as 7 - yajug - nov. 2012
DESCRIPTION
TRANSCRIPT
![Page 1: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/1.jpg)
Déployersur terre et dans les nuages
Alexis Hasslernovembre 2012
![Page 2: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/2.jpg)
@AlexisHassler
Développeur, formateur Java
Indépendant
Co-leader du
![Page 3: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/3.jpg)
AlexisHassler
![Page 4: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/4.jpg)
léger
pratique
cool
2000
JBoss AS 2.0
![Page 5: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/5.jpg)
lourd
compliqué
pas cool
2010
5.x / 6.x
![Page 6: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/6.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.0
AS 4.2
AS 5.1
AS 6.0
![Page 7: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/7.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 8: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/8.jpg)
léger
pratique
über-cool
2012
![Page 9: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/9.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.0 AS 4.2
AS 5.1
AS 6.0
AS 7.1(full)
![Page 10: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/10.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.1(full)
Heap used
![Page 11: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/11.jpg)
Composants
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 12: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/12.jpg)
Architecture
Core Infrastructure
Subsystems
Deployers VFS Jandex Reflect Cache Repository
Server Controller Service
MSCJBoss
ModulesDMR Controller Threads
![Page 13: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/13.jpg)
Configuration simplif iée
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.1
![Page 14: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/14.jpg)
Configuration expressive
standalone/configuration/standalone.xml
![Page 15: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/15.jpg)
Configuration expressive
server/default/deploy/hdscanner-jboss-beans.xml
server/default/conf/bootstrap/profile.xml
![Page 16: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/16.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 17: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/17.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 ... Deployed demo.war ...
![Page 18: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/18.jpg)
Administration
Console CLI
HTTP / JSON Java API
![Page 19: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/19.jpg)
![Page 20: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/20.jpg)
jboss-cl i .sh
![Page 21: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/21.jpg)
HTTP / JSON
http://localhost:9990/management/
curl http://localhost:9990/management --user alexis:hassler -–digest --header "Content-Type: application/json" -d '{ "operation":"change-root-log-level", "json.pretty":1, "address":["subsystem","logging","root-logger","ROOT"], "level":"ERROR" }'
![Page 22: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/22.jpg)
Java API
ModelControllerClient client=create(SERVER,NATIVE_ADMIN_PORT);
ModelNode operation = new ModelNode();operation.get("operation").set("change-root-log-level");operation.get("level").set("ERROR");
ModelNode rootLogger = operation.get("address");rootLogger.add("subsystem");rootLogger.add("logging");rootLogger.add("root-logger");rootLogger.add("ROOT");
client.execute(operation).get("result");
![Page 23: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/23.jpg)
JMX
Domaine jboss.as
![Page 24: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/24.jpg)
Console CLI
HTTP / JSON Java API
JMX
XML
Administration
![Page 25: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/25.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 26: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/26.jpg)
IDE
Eclipse 3.7+ avec JBoss Tools
IntelliJ IDEA 11+
Netbeans 7.2
![Page 27: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/27.jpg)
Killerfeature
http://www.ironmaidenwallpaper.com/
![Page 28: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/28.jpg)
JBossModules
![Page 29: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/29.jpg)
CLASSPATH
HELL
http://www.ironmaidenwallpaper.com/
![Page 30: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/30.jpg)
Flat Classloader
JVM Classloader(s)
System Classloader
CLASSPATH
![Page 31: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/31.jpg)
UCR
Hierarchical Classloaders
System Classloader
JBossClassloaders
DeploymentClassloader
DeploymentClassloader
Sub-deploymentClassloader
war /WEB-INF/lib /WEB-INF/classes
ear /lib
<conf>/lib
![Page 32: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/32.jpg)
"Classpath is dead!"
Mark Reinhold,
JavaOne 2009
http://java.sun.com/javaone/2009/general_sessions.jsp
![Page 33: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/33.jpg)
Modules
org.slf4j:1.5.10
org.hibernate.core:3.6.6
deployment.my.war
org.slf4j:1.6.1
org.springframework:3.1.2
![Page 34: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/34.jpg)
Modules
SLF4J
org.slf4j:1.5.10
deployment.swmsg-web.war
org.slf4j:1.6.1
fr.sewatech.swmsg-lib:1.0
![Page 35: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/35.jpg)
Modules
Datasource
first-ds second-ds
some.driver:1.0 some.driver:2.0DB v1 DB v2
![Page 36: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/36.jpg)
![Page 37: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/37.jpg)
Cloud
IaaSInfrastructure as a Service
Hardware+
OS
SaaSSoftware as a Service
Software
PaaSPlatform as a Service
Runtime/
Middleware
![Page 38: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/38.jpg)
PaaS by
Java, Perl, PHP, Python, Ruby
![Page 39: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/39.jpg)
Java EE 6 - Full profile
Git
AS 7 ou EAP 6
![Page 40: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/40.jpg)
Java EE 6 – Web Profile
Déploiement par le JDK ou l'API Cloudbees
DD spécifiques Cloudbees
![Page 41: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/41.jpg)
?
![Page 42: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/42.jpg)
Versions intermédiaires
JBoss AS 7.0 CR1
JBoss AS 7.0.0.Final
…
JBoss AS 7.1.1.Final
![Page 43: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/43.jpg)
Migration
JBoss AS 6- => JBoss AS 7+
Modules
Datasources, destinations JMS
Noms JNDI
Clients EJB (remote)
...
![Page 44: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/44.jpg)
Modules
Logging
Log4J / SLF4J
Corrigé en 7.1.2
(pour Log4J)
deployment.my.war
org.slf4j
war
modules
org.slf4j:main
![Page 45: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/45.jpg)
AS / EAP
JBoss AS 7.1.2 / 7.1.3
Base pour JBoss EAP 6.0.x
Pas de release binaire !
Build it yourself
git clone git://github.com/jbossas/jboss-as.gitcd jboss-asgit checkout 7.1.2.Final./build.sh -DskipTests
cp -R build/target/jboss-as-7.1.2.Final /opt/java/
![Page 46: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/46.jpg)
Messages d'erreur
{"JBAS014653: Opération composite échouée et annulée. Étapes déficientes :" => {"Opération step-2" => {"JBAS014771: Services avec des dépendances manquantes/non disponibles" => ["jboss.deployment.unit.\"swmsg-web.war\".jboss.security.jacc Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"org.apache.catalina.servlets.DefaultServlet\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageSecured Missing[jboss.naming.context.java.app.swmsg-web.swmsg-ejb3.\"MessageSecuredBean!fr.sewatech.formation.appserv.ejb3.MessageServiceLocal\"]","jboss.deployment.unit.\"swmsg-web.war\".component.\"javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageService Missing[jboss.naming.context.java.app.swmsg-web.swmsg-ejb3.\"MessageServiceBean!fr.sewatech.formation.appserv.ejb3.MessageServiceLocal\"]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jdbc.sewa-ds Missing[jboss.naming.context.java.SewaDS]","jboss.deployment.unit.\"swmsg-web.war\".jndiDependencyService Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jms.SWq Missing[jboss.naming.context.java.queue.SWq]","jboss.deployment.unit.\"swmsg-web.war\".component.\"com.sun.faces.config.ConfigureListener\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"javax.faces.webapp.FacetTag\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"javax.servlet.jsp.jstl.tlv.ScriptFreeTLV\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"org.apache.jasper.servlet.JspServlet\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"fr.sewatech.formation.appserv.web.PageFilter\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"fr.sewatech.formation.appserv.web.MessageServlet\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.web.deployment.default-host./swmsg-web Missing[JBAS014861: <one or more transitive dependencies>]"]}}}
{"JBAS014653: Opération composite échouée et annulée. Étapes déficientes :" => {"Opération step-2" => {"JBAS014771: Services avec des dépendances manquantes/non disponibles" => ["jboss.deployment.unit.\"swmsg-web.war\".jboss.security.jacc Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"org.apache.catalina.servlets.DefaultServlet\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageSecured Missing[jboss.naming.context.java.app.swmsg-web.swmsg-ejb3.\"MessageSecuredBean!fr.sewatech.formation.appserv.ejb3.MessageServiceLocal\"]","jboss.deployment.unit.\"swmsg-web.war\".component.\"javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageService Missing[jboss.naming.context.java.app.swmsg-web.swmsg-ejb3.\"MessageServiceBean!fr.sewatech.formation.appserv.ejb3.MessageServiceLocal\"]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jdbc.sewa-ds Missing[jboss.naming.context.java.SewaDS]","jboss.deployment.unit.\"swmsg-web.war\".jndiDependencyService Missing[JBAS014861: <one or more transitive dependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jms.SWq Missing[jboss.naming.context.java.queue.SWq]","jboss.deployment.unit.\"swmsg-web.war\".component.\"com.sun.faces.config.ConfigureListener\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"javax.faces.webapp.FacetTag\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"javax.servlet.jsp.jstl.tlv.ScriptFreeTLV\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"org.apache.jasper.servlet.JspServlet\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"fr.sewatech.formation.appserv.web.PageFilter\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"swmsg-web.war\".component.\"fr.sewatech.formation.appserv.web.MessageServlet\".START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.web.deployment.default-host./swmsg-web Missing[JBAS014861: <one or more transitive dependencies>]"]}}}
![Page 47: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/47.jpg)
Roadmap
JBoss AS 9
JBoss AS 7.1
http://www.jboss.org/vote
JBoss AS 7.2JBoss AS 8
➢ BaseJump➢ WildFly➢ Petasos➢ Jberet➢ Jocon➢ jFireAnt
![Page 48: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/48.jpg)
Roadmap
JavaEE 7
Patch à chaud
Accès au management, par rôles
Multiplexage
Amélioration du MSC
Développement d'extensions
...
![Page 49: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/49.jpg)
Conclusion
Serveurs d'applications modernes
![Page 50: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/50.jpg)
http://www.jboss.org/as7.html
http://www.jboss.org/openshift/
![Page 52: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/52.jpg)
Auto-promotion
http://www.sewatech.fr/formation-jboss-7.html
19 au 22 mars 2013 à Lyon
![Page 53: JBoss AS 7 - YaJUG - nov. 2012](https://reader034.vdocuments.site/reader034/viewer/2022050801/54582568af79594e128b4a97/html5/thumbnails/53.jpg)
?