jboss as 7
DESCRIPTION
JBoss AS 7 'It's JBoss, but not as we know it' Presentation by Matt BrasierTRANSCRIPT
© C2B2 Consulting Limited 2011All Rights Reserved
JBoss AS 7
Its JBoss, but not as we know it
© C2B2 Consulting Limited 2011All Rights Reserved
Agenda
• Introduction• About Me• JBoss 7 – All change• Standalone mode• Domain mode• Command line interface
© 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
© C2B2 Consulting Limited 2011All Rights Reserved
C2B2
• Middleware services specialists– Consulting– Troubleshooting– Performance tuning– Managed services– Training
• In the UK and beyond
© C2B2 Consulting Limited 2011All Rights Reserved
Our Experience
© C2B2 Consulting Limited 2011All Rights Reserved
JBoss 7 – All change
© 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
© 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
© 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
© 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
© 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
© C2B2 Consulting Limited 2011All Rights Reserved
Standalone mode
© 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
© 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
© 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>
© 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>
© C2B2 Consulting Limited 2011All Rights Reserved
Deploying to standalone
• Drop the application into standalone/deployments– Deployment scanner
runs periodically
© C2B2 Consulting Limited 2011All Rights Reserved
Domain mode
© 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
© 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
© C2B2 Consulting Limited 2011All Rights Reserved
Domain mode processes
© 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
© 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
© 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.
© C2B2 Consulting Limited 2011All Rights Reserved
Command line interface
© 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)*] )]
© C2B2 Consulting Limited 2011All Rights Reserved
Example Bullet Slide
• Bullet 1
© C2B2 Consulting Limited 2011All Rights Reserved
Thank you