Stan Silvert [
http://community.jboss.org/people/stan.silvert%40jboss.com] modified the
document:
"JBoss AS7 User Guide"
To view the document, visit:
http://community.jboss.org/docs/DOC-16068
--------------------------------------------------------------
This is a brief guide intended to help users who wish to experiment with JBoss AS 7 as it
undergoes development. Feedback on its content is most appreciated, either via comments on
this page, via forum posts in this "JBoss AS7 Development" section of the wiki,
or by posts to the
https://lists.jboss.org/mailman/listinfo/jboss-development
jboss-development mailing list.
AS 7 is currently in "Alpha" status, so users should not expect all (or even
most) of the capabilities of more stable AS 5 and 6 releases to be present. Users should
also be aware that significant changes may be made from one alpha release to another.
h2. Getting JBoss AS 7
AS 7 is available from the
http://www.jboss.org/jbossas/downloads.html jboss.org download
page. As in earlier JBoss AS releases, installation consists of unzipping the release
distribution.
Users are encouraged to check out the AS 7 source and build it themselves. This is quite
quick and painless once git is installed on your system, and getting git set up is also
quite easy to do. See the
http://community.jboss.org/docs/DOC-15596 Hacking On JBoss AS
7 wiki page for more details on working with the AS 7 source.
h2. Quick Start
Once you have the distribution unzipped, you need to decide whether you want to work in
"domain mode" or "standalone mode". See "Domain Mode vs.
Standalone Mode" below for more on what those choices mean.
If you want to work in domain mode, open a terminal and cd into the distribution's bin
directory, and run the "domain" launch script:
$ cd bin
$ ./domain.sh
On Windows:
cd bin
domain.bat
This will launch a total of 5 processes on your system: three JBoss AS server instances; a
Domain Controller process that acts as a central management point for all servers that
belong to the same "domain"; and a lightweight Process Controller process that
is responsible for spawning the other 4 processes and monitoring their lifecycle.
If you want to work in standalone mode, open a terminal and cd into the distribution's
bin directory, and run the "standalone" launch script:
$ cd bin
$ ./standalone.sh
On Windows:
cd bin
standalone.bat
This will launch a single process on your system, a standalone JBoss AS server instance.
If you have the AS 7 source checked out, there are a number of demos that can be run from
the source checkout's demos module. See below for details.
h2. Domain Mode vs. Standalone Mode
One of the primary new features of AS 7 is the ability to manage multiple AS instances
from a single control point. A collection of such servers are referred to as members of a
"domain", with a single Domain Controller process acting as the management
control point. Domains can span multiple physical (or virtual) machines, with all AS
instances on a given host under the control of a Host Controller process. The Host
Controllers interact with the Domain Controller to control the lifecycle of the AS
instances running on that host and to assist the Domain Controller in managing them.
When you launch JBoss AS in "domain mode" (via the domain.sh or domain.bat
launch scripts) your intent is to launch a Domain Controller, a Host Controller and
usually at least one AS instance.
For more on running servers in domain mode, a roughly 20 minute video is available online
(divided in two pieces):
http://www.youtube.com/watch?v=phV3QiKQf2E http://www.youtube.com/watch?v=phV3QiKQf2E
http://www.youtube.com/watch?v=gCeQ2KIO0qc http://www.youtube.com/watch?v=gCeQ2KIO0qc
For many use cases, the centralized managment capability available via domain mode is not
necessary. For these use cases, the AS can also be run in "standalone mode". In
standalone mode each AS instance is an independent process, much like an AS 3, 4, 5, or 6
instance is. Standalone instances can be launched via the standalone.sh or standalone.bat
launch scripts.
If more than one standalone instance is launched and multi-server management is desired,
it is the user's responsibility to coordinate management across the servers.
The current AS 7 alpha release does not support HA functionality. However, it's
important to understand that once HA functionality is added, it will be orthogonal to
"domain mode" vs. "standalone mode". That is, a group of servers
running in standalone mode will be able to be configured to form an HA cluster. The domain
and standalone modes determine how the servers are managed, not what capabilities they
provide.
A given server instance cannot be switched between domain mode and standalone mode; i.e.
you cannot launch domain.sh, stop the processes, and then launch standalone.sh and expect
any relationship between what was running. The configurations are separate. We may in
future releases include some tooling to ease the task of translating a given server
configuration from domain mode to standalone mode.
h2. Contents of the AS 7 Distribution
The AS 7 distribution includes the following directories:
*bin* -- location of the launch scripts
*docs* -- license files, documentation, schemas, examples, etc. The amount of content in
this directory will increase as development continues.
*modules* -- AS 7 is based on a modular classloading architecture. The various modules
used in the server are stored here. Generally speaking, this is not an area that would be
modified by end users.
*domain* -- only relevant when domain mode is used. Configuration files, deployment
content, and writeable areas used by the domain mode processes that run off of this
installation. See below for further details.
*standalone* -- only relevant when standalone mode is used. Configuration files,
deployment content, and writeable areas used by the single standalone server that runs off
this installation. See below for further details.
h3. Contents of the "domain" Directory
Only relevant when domain mode is used.
*configuration* -- configuration files for the domain and for the Host Controller and any
servers running off of this installation. If we've done our jobs well, these
configuration files are the only configuration files end users should need to touch
(outside of deployment descriptors in their own application deployments). See below for
more on these files.
*content* -- an internal working area for the Host Controller that controls this
installation. This is where it internally stores deployment content. This directory is not
meant to be manipulated by end users.
*log* -- location where the Process Controller and Host Controller write their log files.
*servers* -- writeable area used by each AS instance. Each AS instance will have its own
subdirectory, created when the server is first started. In each server's subdirectory
there will be the following subdirectories:
data -- information written by the server that needs to survive a restart of the server
log -- the server's log files
tmp -- location for temporary files written by the server
*system-content* -- an internal working area. Storage for non-end-user deployments; i.e.
deployments that the subsystems that comprise a running AS themselves deploy into the
runtime as part of the service they provide.
h3. Contents of the "standalone" Directory
Only relevant when standalone mode is used.
*configuration* -- configuration files for the standalone server that runs off of this
installation. If we've done our jobs well, these configuration files are the only
configuration files end users should need to touch (outside of deployment descriptors in
their own application deployments). See below for more on these files.
*data* -- information written by the server that needs to survive a restart of the server
*deployments* -- an area where end user deployment content can be placed if automatic
detection and deployment of that content into the server's runtime is desired. The
server's management API exposes other means for installing deployment content, and use
of that API in preference to the deployments directory is preferred. We realize however,
that at this early stage in AS 7's development the tooling around the deployment API
is in its infancy, so many users will utilize the deployments directory to deploy content.
Note that "domain mode" does not support deploying content based on scanning a
filesystem.
*log* -- the server's log files
*tmp* -- location for temporary files written by the server
*system-content* -- an internal working area. Storage for non-end-user deployments; i.e.
deployments that the subsystems that comprise a running AS themselves deploy into the
runtime as part of the service they provide.
h2. "Domain Mode" Configuration Files
Located in the *domain/configuration* directory.
*domain.xml* -- primary configuration file for the domain. Among other things, includes
the configuration of the various "profiles" that AS instances can be configured
to run. A profile configuration includes the detailed configuration of the various
subsystems that comprise that profile (e.g. an embedded JBoss Web instance is a subsystem;
a JBoss TS transaction manager is a subsystem, etc). Includes the definition of groups of
sockets that those subsystems may open. And includes definition of "server
groups", to which a profile, a group of socket definitions and zero or more
deployments are mapped. Each individual server will be mapped (in host.xml, see below) to
a server group; the configuration of that server group largely defines the configuration
of the individual server.
A domain.xml file must be located in the domain/configuration directory of an installation
that's meant to run the Domain Controller. It does not need to be present in
installations that are not meant to run a Domain Controller; i.e. those whose Host
Controller is configured to contact a remote Domain Controller. The presence of a
domain.xml file on such a server does no harm; it will be ignored.
Users are encouraged to have a look at the
https://github.com/jbossas/jboss-as/blob/master/domain/src/main/resources...
AS 7 configuration schema, starting with the <domain> element, to learn more about
configuration of a Domain Controller.
*host.xml* -- configuration file for the Host Controller that runs off of this particular
installation. Each installation must have a host.xml file. Contains configuration
information that is specific to the particular installation. Primarily:
* the listing of the names of the actual AS server instances that are meant to run off of
this installation, along with the server group they belong to.
* configuration of how the Host Controller is to contact the Domain Controller to register
itself and access the domain configuration. This may either be configuration of how to
find and contact a remote Domain Controller, or a configuration telling the Host
Controller to itself act as the Domain Controller.
* configuration of items that are specific to the local physical installation. For
example, named interface definitions declared in domain.xml can be mapped to an actual
machine-specific IP address in host.xml. Abstract path names in domain.xml can be mapped
to actual filesystem paths in host.xml.
Users are encouraged to have a look at the
https://github.com/jbossas/jboss-as/blob/master/domain/src/main/resources...
AS 7 configuration schema, starting with the <host> element, to learn more about
configuration of a Host Controller.
*logging.properties* -- Contains the logging configuration for the Host Controller and
Process Controller that run off of this installation. Also defines the initial bootstrap
logging configuration for each individual AS instance. This boostrap logging configuration
is replaced with the logging configuration specified in the domain.xml file once the
server boot has reached the point where that configuration is available.
h2. "Standalone Mode" Configuration Files
Located in the *standalone/configuration* directory.
*standalone.xml* -- primary configuration file for the AS instance. Among other things,
includes the configuration of the "profile" that the AS instance is configured
to run. A profile configuration includes the detailed configuration of the various
subsystems that comprise that profile (e.g. an embedded JBoss Web instance is a
subsystem; a JBoss TS transaction manager is a subsystem, etc). Also includes the
definition of the sockets that those subsystems may open.
Users are encouraged to have a look at the
https://github.com/jbossas/jboss-as/blob/master/domain/src/main/resources...
AS 7 configuration schema, starting with the <server> element, to learn more about
configuration of a standalone AS instance.
*logging.properties* -- Contains the initial bootstrap logging configuration for the AS
instance. This boostrap logging configuration is replaced with the logging configuration
specified in the standalone.xml file once the server boot has reached the point where that
configuration is available.
h2.
Available Subsystems
AS 7 is under active development. Not all capabilities present in more mature releases of
the AS 5 and 6 series are available in AS 7 yet. Following is a brief listing of the
subsystems available in the various AS 7 releases. Items listed below may not be entirely
feature complete.
h4. 7.0.0.Alpha1
* logging -- configuration of logging appenders, categories, etc
* threads -- thread pool management
* sockets -- socket binding management
* naming -- local JNDI. Note that direct remote access to JNDI is not supported in Alpha1
(see the client.jms demo for an example of a clever hack to get remote access to JNDI via
an MBeanServerConnection)
* transactions -- JTA
* jmx -- MBeanServer with remote access capability
* web -- basic servlet and JSP support
* messaging -- HornetQ server
* JMS -- JMS queues, topics and connection factories
* JCA connectors
* Datasources
* JCA resource adapter deployments
* osgi -- OSGI bundle deployment
* remoting -- JBoss Remoting 3 connectors
* managed beans -- EE 6 managed bean deployments
* SAR deployments -- both legacy mbean deployments and those based on the JDK 6
ServiceLoader concept. Note that not all legacy sar capabilities are supported
* Filesystem based hot deployment scanning (standalone mode only) -- note that exploded
deployments are not currently supported
h2. Demos in the Source Checkout
The source checkout includes a "demos" module that includes a number of demos
that can be run from maven. Building the module from the /demos directory will output a
usage note that explains how to run the demos:
usage:
[echo] To run an example:
[echo] 1) In a separate console window,start either a standalone JBoss AS instance or
a JBoss AS domain
[echo] 2) Run mvn package -Dexample=<example.name> where "exammple.name is
the name of the example
[echo]
[echo] Valid example names to run against a standalone JBoss AS instance are
[echo] sar - deploys mbeans packaged in a sar
[echo] managedbean - deploys a managed bean
[echo] serviceloader - deploys a serviceloader style service
[echo] messaging - deploys HornetQ native sender and receiver
[echo] jms - deploys HornetQ JMS sender and receiver
[echo] jms.client - Uses HornetQ JMS API from the client
[echo] rar - deploys a resource adapter
[echo] ds - deploys a test bean for data sources
[echo] war - deploys a simple servlet and connects to it
[echo] client.messaging - creates a HornetQ core queue using the management API
[echo] client.jms - creates a JMS queue using the management API
[echo] web.connector - creates and removes a jboss web connector
[echo]
[echo] Valid example names to run against a JBoss AS domain are
[echo] domain.configs - reads the domain config and any available host
controller configs
[echo] domain.ds - deploys deploys a test bean for data sources
[echo] domain.messaging - deploys HornetQ native sender and receiver
[echo] domain.rar - deploys deploys a resource adapter
[echo] domain.servers - shows domain, host controller and server configs,
starts/stops servers
The primary point of the demos is to look at the source code and see how they use the
AS's management API to deploy content and/or alter the configuration of the running
server(s). To see how an example works, look at the relevant
demos/src/main/java/org/jboss/as/demos/<example.name>/runner.ExampleRunner.java
file.
--------------------------------------------------------------
Comment by going to Community
[
http://community.jboss.org/docs/DOC-16068]
Create a new document in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=102&am...]