JBoss AS 7 - YaJUG - nov. 2012

2,107 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,107
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
51
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

JBoss AS 7 - YaJUG - nov. 2012

  1. 1. Déployer sur terre et dans les nuagesnovembre 2012 Alexis Hassler
  2. 2. @AlexisHasslerDéveloppeur, formateur JavaIndépendantCo-leader du
  3. 3. AlexisHassler
  4. 4. JBoss AS 2.0légerpratique 2000cool
  5. 5. 5.x / 6.xlourdcompliqué 2010pas cool
  6. 6. Startup AS 6.050 s45 s AS 5.140 s35 s30 s25 s20 s AS 4.215 s AS 4.010 s 5s 0s
  7. 7. Startup Geronimo 2 GlassFish 290 s GlassFish 3 JBoss 580 s JBoss 670 s Weblogic 1060 s Websphere 750 s40 s30 s20 s10 s 0s http://tiny.cc/agoncal-as-startup (12/2009)
  8. 8. légerpratique 2012über-cool
  9. 9. Startup50 s AS 6.045 s AS 5.140 s35 s30 s25 s20 s15 s AS 4.0 AS 4.2 AS 7.110 s (full) 5s 0s
  10. 10. Lightweight Heap used180 Mo160 Mo140 Mo AS 5.1120 Mo AS 6.0100 Mo80 Mo60 Mo40 Mo AS 4.0 AS 4.2 AS 7.1 (full)20 Mo 0 Mo
  11. 11. JBoss Logging JSF - Mojarra JAX-WS - CXFJBoss Transaction Datasource JavaEE EJB CDI - Weld JPA - Hibernate Subsystems Naming ComposantsCache - Infinispan Core Infrastructure JMS - HornetQ JGroupsJAX-RS - RESTeasyJCA - IronJacamar ...
  12. 12. Architecture JBoss MSC DMR Controller Threads Modules Server Controller ServiceDeployers VFS Jandex Reflect Cache Repository Core Infrastructure Subsystems
  13. 13. Configuration simplifiéefind <profile_dir> -name *.xml | wc -l160140120 AS 5.1100 AS 6.0 80 60 40 AS 4.2 AS 4.0 20 AS 7.1 0
  14. 14. Configuration expressivestandalone/configuration/standalone.xml
  15. 15. Configuration expressiveserver/default/deploy/hdscanner-jboss-beans.xml server/default/conf/bootstrap/profile.xml
  16. 16. Déploiement binAutomatique bundles modules – idem AS <7 pour les archives standalone configuration – désactivé en mode explosé data deployments lib/extcp demo.war $JBOSS_HOME/standalone/deployments/17:12:24,923 INFO ... Deployed "demo.war"
  17. 17. 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.dodeploy17:12:24,923 INFO ... Deployed demo.war ...
  18. 18. Administration Console CLIHTTP / JSON Java API
  19. 19. jboss-cli.sh
  20. 20. 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" }
  21. 21. Java APIModelControllerClient 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");
  22. 22. JMXDomaine jboss.as
  23. 23. Administration XML Console CLIHTTP / JSON Java API JMX
  24. 24. Domain Server Server Group 1 Host Controller Server Host 1 Server Group 2 Domain Controller Host Server ControllerHost 0 Host 2 Host Server Controller Host 3
  25. 25. IDEEclipse 3.7+ avec JBoss ToolsIntelliJ IDEA 11+Netbeans 7.2
  26. 26. Killer featurehttp://www.ironmaidenwallpaper.com/
  27. 27. JBossModules
  28. 28. CLASSPATH HELL http://www.ironmaidenwallpaper.com/
  29. 29. Flat Classloader CLASSPATH JVMClassloader(s) SystemClassloader
  30. 30. Hierarchical Classloaders System Classloader JBossUCR Classloaders <conf>/lib Deployment ear /lib ClassloaderDeployment Sub-deployment war /WEB-INF/libClassloader Classloader /WEB-INF/classes
  31. 31. "Classpath is dead!" Mark Reinhold, JavaOne 2009http://java.sun.com/javaone/2009/general_sessions.jsp
  32. 32. Modules org.slf4j:1.5.10 org.slf4j:1.6.1org.springframework:3.1.2 org.hibernate.core:3.6.6 deployment.my.war
  33. 33. ModulesSLF4J org.slf4j:1.5.10 org.slf4j:1.6.1 fr.sewatech.swmsg-lib:1.0 deployment.swmsg-web.war
  34. 34. ModulesDatasourceDB v1 DB v2 some.driver:1.0 some.driver:2.0 first-ds second-ds
  35. 35. Cloud SaaS Software Software as a Service Runtime PaaS / Platform as a Service Middleware Hardware IaaS +Infrastructure as a Service OS
  36. 36. PaaS byJava, Perl, PHP, Python, Ruby
  37. 37. Java EE 6 - Full profileGitAS 7 ou EAP 6
  38. 38. Java EE 6 – Web Profile Déploiement par le JDK ou lAPI Cloudbees DD spécifiques Cloudbees
  39. 39. ?
  40. 40. Versions intermédiairesJBoss AS 7.0 CR1JBoss AS 7.0.0.Final…JBoss AS 7.1.1.Final
  41. 41. MigrationJBoss AS 6- => JBoss AS 7+ Modules Datasources, destinations JMS Noms JNDI Clients EJB (remote) ...
  42. 42. ModulesLogging modules org.slf4j:main Log4J / SLF4J Corrigé en 7.1.2 (pour Log4J) org.slf4j deployment.my.war war
  43. 43. AS / EAPJBoss 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.git cd jboss-as git checkout 7.1.2.Final ./build.sh -DskipTests cp -R build/target/jboss-as-7.1.2.Final /opt/java/
  44. 44. Messages derreur{"JBAS014653: Opération composite échouée et annulée. Étapes déficientes :" => {"Opération step-2" => {"JBAS014771: Servicesavec des dépendances manquantes/non disponibles" => ["jboss.deployment.unit."swmsg-web.war".jboss.security.jaccMissing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit."swmsg-web.war".component."org.apache.catalina.servlets.DefaultServlet".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageSecuredMissing[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 transitivedependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.ejb.MessageServiceMissing[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 transitivedependencies>]","jboss.naming.context.java.module.swmsg-web.swmsg-web.env.jms.SWqMissing[jboss.naming.context.java.queue.SWq]","jboss.deployment.unit."swmsg-web.war".component."com.sun.faces.config.ConfigureListener".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.deployment.unit."swmsg-web.war".component."javax.faces.webapp.FacetTag".STARTMissing[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 transitivedependencies>]","jboss.deployment.unit."swmsg-web.war".component."org.apache.jasper.servlet.JspServlet".STARTMissing[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 transitivedependencies>]","jboss.deployment.unit."swmsg-web.war".component."fr.sewatech.formation.appserv.web.MessageServlet".START Missing[JBAS014861: <one or more transitivedependencies>]","jboss.web.deployment.default-host./swmsg-web Missing[JBAS014861: <one or more transitivedependencies>]"]}}}
  45. 45. RoadmapJBoss AS 7.1 ➢ BaseJump ➢ WildFly JBoss AS 7.2 JBoss AS 8 ➢ Petasos ➢ Jberet JBoss AS 9 ➢ Jocon ➢ jFireAnt http://www.jboss.org/vote
  46. 46. RoadmapJavaEE 7Patch à chaudAccès au management, par rôlesMultiplexageAmélioration du MSCDéveloppement dextensions...
  47. 47. ConclusionServeurs dapplications modernes
  48. 48. http://www.jboss.org/as7.htmlhttp://www.jboss.org/openshift/
  49. 49. @AlexisHasslerhttp://alexis-hassler.comalexis.hassler@sewatech.frhttp://sewatech.fr
  50. 50. Auto-promotionhttp://www.sewatech.fr/formation-jboss-7.html 19 au 22 mars 2013 à Lyon
  51. 51. ?

×