JBoss
7 is the new version of JBoss Server with lot of additional
Facilities. In this new version , it allows us the ability to manage
multiple JBoss AS instances from a Single Point of Control.
This
Article tells about JBoss Servers modes in the new JBoss 7 Version.
JBoss
Servers can operate in 2 modes
Stand
Alone & Domain
Stand
Alone Mode : In "standalone" mode each JBoss
Application Server instance is an independent process .This
Independent process can be some times added to a Cluster environment.
The necessary files needed for running this Stand alone process can
be found under the /standalone directory.
There
are scripts that allow us to start the JBoss Server. The Stand Alone
JBoss server can be started using the “standalone.sh” script
available in the /bin location.
Domain
Mode
For
understanding the Domain mode ,there are few other terms that we need
to familiar with
Server
Groups : Each Host ( Physical Machine) can contain JBoss servers.
These JBoss Servers can be a part of a server group. A Server group
is a combination of multiple JBoss Servers which are managed as one.
All the Servers in the Server group share the same configuration
since they belong to a Server Group. These should all be configured
with the same profile and they should have the same deployment
content deployed. This can be considered as a Cluster in weblogic.
The
Server Groups configurations look some thing like this ,
<server-group
name="main-server-group" profile="full">
<jvm
name="default">
<heap size="1303m"
max-size="1303m"/>
<permgen
max-size="256m"/>
</jvm>
<socket-binding-group
ref="full-sockets"/>
</server-group>
A
server-group configuration includes the following required
attributes:
name
-- the name of the server group
profile
-- the name of the profile the servers in the group should run
In
addition to the above , we can have
In
addition, the following optional elements are available:
socket-binding
information, deployment information,System-properties information and
also JVM information
An
Example Scenario would be
Domain
Controller
The
Domain Controller manages the Server groups. The Domain Controller
manages these for performing deployments , configuration changes
e.t.c. The Domain Controller acts as Central management Control
point.
As we said that every server belong to a Server group, Domain Controller ensures that the servers that belong to a Server groups are configured according the management policy.
The
primary responsibilities of the domain controller are
Managed
the domain's central management policy
Ensure
all host controllers are aware of its current contents
Assist
the host controllers in ensuring that all running JBoss Enterprise
Application Platform instances are configured in accordance with this
policy
The
Configuration File for Domain Controller is
/jboss-eap-6.1/domain/configuration/domain.xml.
The
Domain.xml file contians the profiles. These profiles say about
things that can be run on the server instance inside that domain.The
domain.xml also says about the sub systems (an
embedded JBoss Web instance is a subsystem; a JBoss TS transaction
manager is a subsystem),
Socket Configurations e.t.c.
Host
Controller
Host
Controller ( One Or more) : A Host Controller running on a host
where domain.sh script is running. The host controller job is to
perform tasks on behalf of the Domain Controller. The tasks of the
Domain Controller are normally Delegated to the Host Controller. The
Host controller on each host connects to the Domain Controller for
managing the instances runnings on the Host and also to help the
domain controller to manage them.
Note
: Multiple host Controller can be run a single Physical host with
different ports if you were maintaining different server groups
If
we need to make a Host controller act as a Domain Controller , the
domin.xml file should be located in /domain/configuration/ of the
host controller .
The
Host Controller Configuration file is
/jboss-eap-6.1/domain/configuration/hosts.xml.Each Host Controller by
default reads its configuration file.This contains information about
the servers runnings that host,finding and contacting the remote
Domain Controller .
The
hosts.xml file contains
1.configuration
of how the Host Controller is to contact the Domain Controller to
register itself and access the domain configuration
2.configuration
of items that are specific to the local physical installation
Note
: One Host Controller instance
is configured to act as the central management point for the entire
domain, i.e. to be the Domain Controller.
Here
is how the Entire Structure looks,
Happy
learning :-)