jboss as 7

28
© C2B2 Consulting Limited 2011 All Rights Reserved JBoss AS 7 Its JBoss, but not as we know it

Upload: c2b2-consulting

Post on 09-Dec-2014

11.138 views

Category:

Documents


4 download

DESCRIPTION

JBoss AS 7 'It's JBoss, but not as we know it' Presentation by Matt Brasier

TRANSCRIPT

Page 1: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

JBoss AS 7

Its JBoss, but not as we know it

Page 2: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Agenda

• Introduction• About Me• JBoss 7 – All change• Standalone mode• Domain mode• Command line interface

Page 3: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Who am I?

• Matt Brasier• Head of Consulting at C2B2• 7 years experience in middleware

consulting– 5 years using JBoss

Page 4: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

C2B2

• Middleware services specialists– Consulting– Troubleshooting– Performance tuning– Managed services– Training

• In the UK and beyond

Page 5: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Our Experience

Page 6: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

JBoss 7 – All change

Page 7: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

All Change

• Major rewrite of the application server– Much bigger change than JBoss 4 to 5

• Key features– Module based services– Modular Service Container– Domain mode and Standalone mode– Everything has changed

Page 8: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Focus on configuration

• Make JBoss a solid platform for enterprise deployment of server side java applications– Deployment and

management across multiple servers

• Focus on providing enterprise-scale features

Page 9: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Directory Structure

• bin– Scripts for starting and stopping JBoss

• docs– Documentation, schemas, examples etc

• modules– Modules used by/available to the server

• domain– Files for running in domain mode

• standalone– Files for running in stand alone mode

Page 10: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Modules

• Pluggable components of the application server– Referenced from profiles– module.xml

• Basis of classloading in JBoss AS 7

Page 11: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Standalone vs Domain

• Standalone mode– Each JBoss server

has its own configuration

– Single JVM process

• Domain mode– Central configuration

for multiple servers– Central control of

multiple servers

Page 12: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Standalone mode

Page 13: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Standalone mode

• Similar to the old JBoss approach– Independent servers

• Centralised configuration– Based on profiles– configuration/standalone.xml

• Domain mode processes collapsed into a single JVM

Page 14: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Single configuration

• All configuration is now centralised in the standalone.xml file– No sar archives with jboss-service.xml– No *-ds.xml files– No JMS destinations-service.xml files– No tomcat server.xml

• One-stop-shop for configuring your server

Page 15: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Standalone.xml<subsystem xmlns="urn:jboss:domain:threads:1.0">

<scheduled-thread-pool name="remoting">

<max-threads count="10" per-cpu="20"/>

<keepalive-time time="10" unit="seconds"/>

</scheduled-thread-pool>

<bounded-queue-thread-pool name="jca-short-running" blocking="true">

<core-threads count="10" per-cpu="20"/>

<queue-length count="10" per-cpu="20"/>

<max-threads count="10" per-cpu="20"/>

<keepalive-time time="10" unit="seconds"/>

</bounded-queue-thread-pool>

<bounded-queue-thread-pool name="jca-long-running" blocking="true">

<core-threads count="10" per-cpu="20"/>

<queue-length count="10" per-cpu="20"/>

<max-threads count="10" per-cpu="20"/>

<keepalive-time time="10" unit="seconds"/>

</bounded-queue-thread-pool>

Page 16: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Datasources in standalone.xml<subsystem xmlns="urn:jboss:domain:datasources:1.0">

<datasources>

<datasource jndi-name="java:/H2DS" enabled="true" use-java-context="true" pool-name="H2DS">

<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

<driver-class>org.h2.Driver</driver-class>

<driver>org.h2.Driver#1.2</driver>

<pool></pool>

<security>

<user-name>sa</user-name>

<password>sa</password>

</security>

<validation></validation>

<timeout></timeout>

<statement></statement>

</datasource>

</datasources>

<drivers>

<driver module="com.h2database.h2"/>

</drivers>

</subsystem>

Page 17: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Deploying to standalone

• Drop the application into standalone/deployments– Deployment scanner

runs periodically

Page 18: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Domain mode

Page 19: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Domain mode

• Multiple servers controlled centrally• Multiple processes/JVMs per instance

– Domain controller– Process controller– Server

• Domain can define multiple profiles– Different servers can run different profiles

Page 20: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Domain mode

• Domain.xml– Configures all the profiles available in the

domain– Standard across the domain

• Host.xml– Configures the host controller on a host– Unique to each host

Page 21: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Domain mode processes

Page 22: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Host controller

• Process responsible for controlling the lifecycle of servers

• At most one host controller in a domain is the domain controller– Responsible for performing configuration and

administration operations

Page 23: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Process Controller

• Lightweight process responsible for starting and stopping other processes– Keep the parent process of a server very

lightweight

Page 24: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Deploying to domain mode

• Via the command line interface

[domain@localhost:9999 /] deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar --all-server-groups 'test-deployment.sar' deployed successfully.

Page 25: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Command line interface

Page 26: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Command line interface

• Connects to the domain controller process• Execute operations on the domain

controller• The format for the operation requests is

– [node-type=node-name (,node-type=node-name)*] : operation-name [( [parameter-name=parameter-value (,parameter-name=parameter-value)*] )]

Page 27: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Example Bullet Slide

• Bullet 1

Page 28: JBoss AS 7

© C2B2 Consulting Limited 2011All Rights Reserved

Thank you