Transfer an overview of JBoss

xiaoxiao2021-03-05  22

To do a deep-level study, you must start, distributed system, distribution, intermediate parts, distribution algorithms, to real middleware products ...

Finally, it is a line of literature, step by step, has a successful opportunity.

The following is read, and you need to look back.

This article will try to guide you to install a fully runable JBoss server through some necessary steps, and by solving additional information about JBoss. If you need more detailed information about JBoss configuration, you can access JBoss's Web site, http://www.jboss.org, where you can find a rich online document.

About JBoss

JBoss is the result of the world's developers work together, a application server based on J2EE-based open source. There is more than one million copies in less than 12 months. JBoss is the first J2EE application server. JBoss full realization of the service stack of J2EE: * 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 downloads JBoss's binary version of the JBoss Web site (http://www.jboss.org). 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 the file you downloaded to a directory (you choose), under Windows, you can use Winzip and other tools, under UNIX, you can use the following command: $ gunzip jboss-3.2.0.tar.gz $ TAR XF JBOOS-3.2.0.tar Sets the JBoss_Home environment variable to install the directory for your JBoss. Then go to the jboss_home / bin directory, run "start scripts": UNIX: $ ./run.sh windows: c: /jboss-3.2.0/bin> run.bat instance, JBoss binary version of 3.2.2, J2SDK The version is 1.4.1: Windows 2K system: J2SDK installed in C: / J2SDK, JBoss installed in C: / JBoss, environment variable settings as follows: java_home = c: / j2sdk classpath =% classpath%;% java_home% / lib / *.jar JBoss_HOME = C: / JBoss Path =% PATH%;% java_home% / bin;% jboss_home% / bin UNIX class: 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 directory structure of JBoss

Installing JBoss will create the following directory structure: Table 1.1 JBoss directory [PRE] -------------------------------- -------------------------------------------- Directory Description ---- -------------------------------------------------- ----------------------- bin launched and closes the Java library (JARS) DOCS configuration required by the JBoss communication with JBoss communication Document (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 library here) Server's various JBoss configurations. Each configuration must be placed in different subdirectors. The name of the subdirector 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 of configuration files for Server / Default / Conf jboss. 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 file or directory placed here will be automatically deployed by JBOSS. 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 in the server directory. A subdirectory containing the appropriate file. You can use the -c parameter to be started with the -c parameter: Windows: c: /jboss-3.2.0/bin> run.bat -c config-name unix $ ./run.sh -c config-name

The JBoss profile is like the last section, and the 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 changes in a special directory: $ 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

From version 3.0, JBoss has been built around some very powerful concepts, allowing users to customize and adjust their servers without being 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, transactions, security, name, messages, logs, etc. services. Other Application Server is generally like a single-chip integrated circuit, they always contain all J2EE platform services. JBoss uses a completely different way: Each service image is hotly deployed on 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 frequently used to build any applications that require powerful and reliable basis. 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 is based on the Sun-based JMX (Java Managerment Extensions) specification, which allows any deployed components to 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 is known as the first J2EE-based application server that supports thermal deployment and re-departers, and many application servers need to be restarted to update an application.

Thanks to the microconuclear architecture and revolutionary Java class loader, JBoss 3.0 and subsequent release versions further push this logic. Not only can you heat deployed and re-deploy applications, but they can be hotly deployed any service and track the dependence between services. 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 app anywhere in the network, as long as you specify a simple URL for JBoss Server Spine. This allows you to manage all configurations of a JBoss node cluster from a central web server. This gives a deep impression that the deployment of the new server is 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 reach all existing services and applications through this new call transmitter. JBoss 3.2 currently supports the following types of caller:

* RMI

* RMI Over HTTP

* IIOP

* JMS

* SOAP

* HA-RMI (Clustering Over RMI)

转载请注明原文地址:https://www.9cbs.com/read-39371.html

New Post(0)