soft-shake.ch - jboss as 7, la révolution

Post on 02-Nov-2014

1.065 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

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.html

TRANSCRIPT

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

la révolution

Alexis Hassler

@AlexisHassler

AlexisHassler

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

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

JavaEE 6 - Pruning

JAX-RPC

JAXR

WebService

WebApplication

EJB 2 entity

Enterprise Application

Deployment

Java SE

Management& Security

JavaEE 6

Full P rofile

Web Profil e ++

Web Profil e.0

.0 preview

.1

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

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

...

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

...

Architecture AS7

Core Infrastructure

Subsystems

Deployers VFS Jandex Reflect Cache Repository

Server Controller Service

MSCJBoss

ModulesDMR Controller Threads

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

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)

Startup

http://community.jboss.org/wiki/AS7StartupTimeShowdown

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

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

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

Configuration

standalone/configutation/standalone.xml

Configuration

server/default/deploy/hdscanner-jboss-beans.xml

server/default/conf/bootstrap/profile.xml

✔ Configuration (réseau)✔ Démarrage

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"

Déploiement

État

.dodeploy

.isdeploying

.deployed .failed

.pending

.isundeploying

.undeployed

.skipdeploy

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 ...

✔ Déploiement automatique✔ Déploiement manuel

Administration

Console CLI

HTTP / JSON Java API

http://<host>:9990/console

jboss-admin.sh

Naviguer

– cd, ls, pwd

Lire la configuration

– :read-resource, :read-attribute,...

Modifier la configuration

– :add-namespace, :write-attribute,...

jboss-admin.sh

Datasource

Déploiement

– upload + deploy

– undeploy

✔ Datasource

Modules

"Classpath is dead!"

Mark Reinhold, JavaOne 2009

http://java.sun.com/javaone/2009/general_sessions.jsp

Modules

Java Module

– Projet Jigsaw

– JavaSE 8

OSGi

JBoss Module

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

Modules

Modules système

– Java EE

Modules user

Local Resource

Inter deployment dependencies

Déploiement

Séparation module / application

1 war => 1 module

– deployment.demo.war

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>

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>

✔ SLF4J

Domain

Host 1

HostController

Server

Server

Host 2

HostController

Server

Host 3

HostController

Server

Host 0

DomainController

Domain

Host 1

HostController

Server

Server

Host 2

HostController

Server

Host 3

HostController

Server

Host 0

DomainController

Server Group 1

Server Group 2

RHQ

Host 1

RHQAgent

JBoss AS

Httpd

Host 2

RHQAgent

...Host 0

RHQServer

MySQLOSMem, CPU, FS

...

...

...

IDE

Eclipse 3.7 + JBoss Tools

IntelliJ IDEA 11

Netbeans 7.0

Cloud

IaaSInfrastructure as a Service

PaaSPlatform as a Service

SaaSSoftware as a Service

Hardware+

OS

Runtime/

Middleware

Software

PaaS by redhat

Java, Perl, PHP, Python, Ruby

Express

– Git

– < Web profile

Flex

– Contrôle étendu

– Amazon EC2

✔ OpenShift Express

JBoss EAP 6

Q1 2012 (TBC)

Dérivé de AS 7.1

– JavaEE 6 full profile

… à suivre

Conclusion

Travaux en cours

– Full profile

– Documentation

Retour d'expérience

.0

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

http://www.jboss.org/as7.html

http://www.jboss.org/openshift/

Auto-promotion

http://www.sewatech.fr/formation-jboss-7.html

http://blog.alexis-hassler.com

top related