About JBoss
JBoss is the result of the world's developers work together, a application server based on J2EE-based open source. Not
There are more than one million copies from 12 months. JBoss is the first J2EE application server.
JBoss fully implements J2EE's service stack:
* EJB (Enterprise JavaBeans)
* JMS (Java Message Service)
* JTS / JTA (Java Transaction Service / Java Transaction API)
* Servlet and JSP (JavaServer Pages)
* JNDI (Java Naming and Directory Interface)
It also provides some advanced features, such as clusters, JMX, Web Service.
It also integrates IIOP (Internet Inter-ORB Protocol).
Because JBoss code follows the LGPL license, you can use it for free in any commercial app without paying the fee.
LGPL - GNU Lesser General Public License,
reference
http://www.gnu.org/copyleft/LESSER.txt.
Install JBoss application server
First, make sure you have installed J2SE JDK 1.3 or higher, and the correct configuration is performed.
This is found, you need to configure the following environment variables:
* Java_home
* ClassPath
* Path
Then go to JBoss's Web site (
Http://www.jboss.org Download the binary version of JBoss.
You will find that all current binary versions are divided into zip and tar.gz format files.
ZIP is suitable for Windows systems, while tar.gz is suitable for UNIX classes, choosing your best to your version.
Unzip your downloaded files to a directory (you choose), under Windows, you can use Winzip, etc.
Tools, under UNIX, you can use the following command:
$ Gunzip jboss-3.2.0.tar.gz
$ TAR XF JBOOS-3.2.0.tar
Set the JBoss_Home environment variable to install the directory for your JBoss.
Then go to the jboss_home / bin directory, run "Start Script":
UNIX:
$ ./Run.sh
Windows:
C: /jboss-3.2.0/bin> run.bat
Example, JBoss binary version is 3.2.2, and the J2SDK version is 1.4.1:
Windows 2K system:
J2SDK installed in C: / J2SDK, JBoss installed in C: / JBoss, the settings of environment variables are as follows:
Java_Home = C: / J2SDK
ClassPath =% classpath%;% java_home% / lib / *. Jar;% java_home% / jre / lib / *. Jar
JBoss_Home = C: / JBoss
Path =% PATH%;% java_home% / bin;% jboss_home% / bin
Under UNIX system:
J2SDK installed in / OPT / J2SDK, JBoss installed in / opt / jboss, the settings of environment variables are as follows:
Java_Home = / OPT / J2SDK
ClassPath = $ ClassPath: $ java_home / lib / *. Jar: $ java_home / jRE / lib / *. Jar
JBoss_Home = / OPT / JBOSS
Path = $ PATH: $ java_home / bin: $ jboss_home / bin explores the JBoss directory structure
Install JBoss creates the following directory structure:
Table 1.1 JBoss catalog
[PRE] ----------------------------------------------- -------------------------------
Directory description
-------------------------------------------------- ----------------------------
BIN started and closes JBoss scripts
Client client with Java libraries required to communicate with JBOSS (JARS)
DOCS configuration sample file (database configuration, etc.)
DOC / DTD DTD of various XML files used in JBoss.
LIB Some JARs, JBOSS is loaded and shared by all JBoss configurations.
(Don't put your stay here)
Server Various JBoss configurations. Each configuration must be placed in different subdirectors. Subdirectory
The name indicates the name of the configuration.
JBoss contains 3 default configurations: Minimial, Default, and ALL.
Server / All JBoss fully configured, launching all services, including clusters and iiop.
The default configuration of Server / Default JBoss.
Use when you specify a configuration name in the JBoss command to specify.
Server / Default / conf. profile. The next section will learn more about its content.
Server / Default / Data JBoss database file. For example, embedded databases, or JBossmq.
The hot deployment catalog of Server / Default / Deploy JBoss. Any document or directory placed here will be automatically automated by JBOSS
deploy. EJB, WAR, EAR, and even service.
Some Server / Default / Lib Some JARs, JBOSs load them when starting a specific configuration.
(All and minimial configuration also include this and the following two directories.)
Server / Default / Log JBoss log file.
Temporary files for Server / Default / TMP JBoss.
-------------------------------------------------- ---------------------------- [/ pre]
If you want to define your own configuration, you must first create a new subdirectory containing the appropriate file in the Server directory.
You can use the -c parameter when started to specify the configuration you want to start:
Windows:
C: /jboss-3.2.0/bin> run.bat -c config-name
Unix
$ ./Run.sh -c config-name
JBoss configuration file
Just like the last section, JBoss's server directory can contain any number of directory, each representing a different JBoss configuration. The server / config-name / conf directory contains the JBoss configuration file. Table 1.2 These different files are given: Table 1.2, JBoss configuration file [pre] -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- File Description ------------------------------------------------ ------------------------------ JACORB.PROPERTIES JBOSS IIOP Configuration JBossmq-State.xml JBossmq (JMS Implementation) User Configuration JBoss -service.xml The definition of the JBoss service running time (Class Loader, JNDi, Deployer et al. log4j.xml log4j Configuration Login-Config.xml JBoss Security Configuration (JBOSSSX) Standardjaws.xml JBoss's legacy CMP 1.1 engine default Configuration. Contains mapping information for jdbc-to-sql of various databases, default CMP settings, log configurations, etc. Standardjbosscmp-JDBC.XML is the same as Standardjaws.xml except for the JBoss's CMP 2.0 engine, --------------------------- -------------------------------------------------- - [/ pre] JBoss deployment
The deployment process in JBoss is very simple and straightforward. In each configuration, JBoss constantly scans a special purpose.
Record changes: $ jboss_home / server / config-name / deploy
This directory is generally referred to as "deployment directory".
You can copy the following files to this directory:
* Any JAR library (where the class will be automatically added to the ClassPath of JBoss)
* EJB JAR
* WAR (Web Appliction Arrchive)
* EAR (Enterprise Application Archive)
* Contains XML files defined by JBoss MBean
* A directory that contains EJB JAR, WAR or EAR, and ends with .jar, .war or. Peer.
To re-deploy any of the above files (JAR, WAR, EAR, XML, etc.), you can overwrite the new version of the file.
. JBoss discovers changes based on the time of comparison files, writes in previous files, and then deploy new files.
To re-deploy a directory, update his modification, such as Touch.
Quickly browse JBoss's internal structure
Starting from version 3.0, JBoss has been built around some very powerful concepts, allowing users to customize and adjust him.
Our servers, not limited to J2EE.
Flexibility allows JBOSS to be available in different environments, ranging from embedded systems to a very large server cluster.
The following sections will briefly introduce some of these concepts.
Micron core architecture
JBoss is based on a microelectronuclear design, that is, the component can insert it at runtime to extend its behavior. This design is ideal for J2EE platforms, an essentially service-based platform. This platform contains persistent, transaction,
Security, name, message, log, etc.
Other Application Server is generally like a single-chip integrated circuit, they always contain all J2EE platform services. JBoss
Use a completely different way: Each service image is hot and deployed above a very simple kernel, called
JBoss Server SPINE. In addition, users are encouraged to implement their own services that run on JBoss.
Therefore, JBoss application servers are not limited to J2EE applications, and he is often used to build any powerful and reliable basis.
Applications. Therefore, the core of JBoss is also considered to be WebOS.
Figure 1.1 JBoss Server SPINE and some hot deployment services
[pre] JMS User Service A EJB Container
(Jbossmq) |
| | | | |
-----------------------------------
| | |
| Jboss server spine |
| | |
-----------------------------------
| | | | |
JNDI JNDI |
(Jbossns) (jbossns) servlet / jsp
[/ pre]
JBoss Server Spine Based on Sun's JMX (Java Managerment Extensions) specification,
Any deployed component can be managed in a standard manner.
In JMX habits, a deployed service in JBoss is called a MBean (a managed bean).
More information about JMX specification can be found at Sun's Web site:
http://java.sun.com/products/javamanagement
Hot deployment
Since 2.0 release, JBoss has been the first J2EE-based application server that supports thermal deployment and re-departers.
It is known, and many application servers need to be restarted to update an application.
Thanks to the micron nuclear architecture and revolutionary Java class loader, JBoss 3.0 and the subsequent release version further promote this
logic. Not only can you heat deployed and re-deploy applications, but they can deploy any services and track clothes.
Dependence between our work.
These features make JBoss can be used in a very harsh environment, such as a telecommunications system.
Network boot
JBoss can guide yourself and your application anywhere in the network, as long as JBoss Server SPINE is specified
A simple URL. This allows you to manage all configurations of a JBoss node cluster from a central web server. This
Manectivities given to people make the deployment of the new server very simple.
JBoss's bootstrap code is only about 50K, which is suitable for many embedded systems.
Separate caller
JBoss completely separated the processor of the protocol, and the call received from the target service will eventually serve the request. Therefore, when a new processor (called a JBoss caller) is deployed to JBoss, you can automatically pass
This new call transmitter reaches all existing services and applications.
JBoss 3.2 currently supports the following types of caller:
* RMI
* RMI Over HTTP
* IIOP
* JMS
* SOAP
* HA-RMI (Clustering Over RMI)