· 1: jboss Introduction
Jboss is a complete set of solutions based on the j2ee framework, including JBoss/Server, JBoss/spyderMQ, JBoss/Jaws, JBoss/Zola, JBoss/Zoap, JBoss/Castor, JBoss/Tomcat. These products can reasonably build software products and software projects based on the j2ee framework. Although he was born more than a year ago, Like apache, he is completely open source code, he is a real life-powerful product and will become a successful Application server like other free software.
This article describes how to install the software product, how to configure its combination with Tomcat, and how to call Ejb through Tomcat Servlet. Finally, the comprehensive Web solution of Apache + Tomcat + jboss is completed. I personally met him just last Sunday. In just five days, I just learned about his functions and features. I am not very clear about most of his functions. If I have time, I will gradually introduce other content about jboss to you, but not now.
Now let's start our journey of Apache + Tomcat + Jboss.
(1) System Environment Introduction:
Hardware Platform:
PC 233 32 m ram 6 GHand Disk
Operating System:
Red head liunx 6.1 (jdk1.3 requires Version 6.1 or later, or upgrade glibc to version 2.1.2.11 or later .)
Application environment requirements:
Jdk1.3
Jaxp1.0.1
Apache 3.1.2
Tomcat 3.2 beta 4 (jakarta-ant, jakarta-servletapi, jakarta-tomcat)
JBoss 2.0 BETA-PROD-PRE-05
InterestEJB.tar.gz test the source code of EJB.
The installation process is described as follows:
Assume that the current directory is/home/liling.
The preparation is as follows:
Mkdir tomcat
Mkdir jboss
Cp j2sdk-1_3_0-linux-rpm.sh/home/liling /.
Cp jakarta-ant.tar/home/liling/tomcat /.
Cp jakarta-servletapi.tar/home/liling/tomcat /.
Cp jakarta-tomcat.ta/home/liling/tomcat /.
Cp jboss-cvs-sources.zip/home/liling/jboss
Cp interestEJB.tar.gz/home/liling/jboss
I. Install jdk1.3
Sh j2sdk-1_3_0-linux-rpm.sh
Rpm-iv j2sdk-1_3_0-linux-rpm
The/usr/java/jdk1.3 directory is displayed.
JAVA_HOME =/usr/java/jdk1.3
PATH = $ PATH:/usr/java/jdk1.3/bin
Export JAVA_HOME
Export PATH
Jar-xvf jaxp-1_0_1.zip
The jaxp1.0.1 directory is generated in the current directory.
CLASSPATH = $ CLASSPAHT:/home/liling/jaxp-1.0.1/jaxp. jar:/home/liling/jaxp-1.0.1/parser. jar
Export CLASSPATH
1. install Tomcat.
Tomcat installation includes ant and servletapi installation.
First, unpack jakarta-tomcat.tar.gz of Tomcat. Then read the README installation process.
Cd/home/liling/tomcat
Gz-d jakarta-tomcat.tar.gz
Tar-xvf jakarta-tomcat.tar
Cd jakarta-tomcat
Vi README
The following installation process is displayed:
Cd $ JAKARTA_HOME/jakarta-ant
./Bootstrap. sh <-- Unix
This shoshould result in the creation of a file "ant. jar" in the "lib"
Subdirectory, which will be used when building Watchdog.
Cd $ JAKARTA_HOME/jakarta-servletapi
./Build. sh dist <-- Unix
This shoshould result in the creation of a file "servlet. jar" in the "lib"
Subdirectory, which will be used when building Watchdog.
Cd $ JAKARTA_HOME/jakarta-tomcat
./Build. sh <-- Unix
After the installation is completed, the following directory will appear:
./Build
./Build/ant
./Build/serletapi
./Build/tomcat
./Dist
./Dist/servletapi/lib
Use./build/tomcat/bin/startup. sh and./build/tomcat/bin/shutdown. sh to start and stop tomcat.
· 2. Install jboss.
Configure the TOMCAT_HOME environment variable:
TOMCAT_HOME =/home/liling/tomcat/build/tomcat
Export TOMCAT_HOME
Cd/home/liling/jboss
Jar-xvf jboss-cvs-sources.zip
Cd src
Cd build
./Build. sh
· 3. Start jboss:
Cd/home/liling/jboss/dist/bin/
/Run. sh
· 4. Configure Tomcat and Jboss
Cd/home/liling/jboss/dist/conf
Vi jboss. conf
The following prompt is displayed:
Add the following content at the above prompt
<Mlet code = "org. jboss. tomcat. EmbeddedTomcatService" ARCHIVE = "jboss. jar" CODEBASE = ".../../lib/ext/">
& Lt; arg type = "int" VALUE = 8088 & gt;
</MLET>
The following prompt is displayed:
<! --
-- Uncomment this to add "Stand-alone Stack Tomcat support ".
-- This means that JSP and Servlets will work with EJB in different stacks and
-- Communicate through network invocation. If you benchmark j2ee please use "integrated stack ".
-- Also note that you cannot use the J2EE deployer with Tomcat in this configuration.
-- Be sure to set your 'tomcat _ home' environment variable before starting JBoss.
-- Note: this reads the server. xml configuration file of Tomcat, you can't use the j2ee deployer
--
-- Mlet code = "org. jboss. tomcat. TomcatService"
ARCHIVE = "jboss. jar" CODEBASE = ".../../lib/ext/">
--/MLET>
-->
Add the following content as prompted:
<Mlet code = "org. jboss. tomcat. EmbeddedTomcatService" ARCHIVE = "jboss. jar" CODEBASE = ".../../lib/ext/">
& Lt; arg type = "int" VALUE = 8088 & gt;
</MLET>
Now you can see the following prompt when starting jboss:
[EmbeddedTomcat] Starting
[EmbeddedTomcat] Testing if Tomcat is present ....
[EmbeddedTomcat] OK
[EmbeddedTomcat] ContextManager: Adding context Ctx ()
[EmbeddedTomcat] path = "": jsp: init
[EmbeddedTomcat] PoolTcpConnector: Starting HttpConnectionHandler on 8088
[EmbeddedTomcat] Started
This indicates that the Integrated Stack (fast) Tomcat support has been started successfully.
[Tomcat] Initializing
[Tomcat] Initialized
[Tomcat] Starting
[Tomcat] Testing if Tomcat is present ....
[Tomcat] OK
[Tomcat] Starting Tomcat...
[Tomcat] Starting tomcat. Check logs/tomcat. log for error messages
2000-11-21 08:26:02-ContextManager: Adding context Ctx (/examples)
2000-11-21 08:26:02-ContextManager: Adding context Ctx (/admin)
2000-11-21 08:26:02-ContextManager: Adding context Ctx ()
2000-11-21 08:26:02-ContextManager: Adding context Ctx (/test)
2000-11-21 08:26:04-PoolTcpConnector: Starting HttpConnectionHandler on 8080
[Tomcat] Started
This indicates that Stand-alone Stack Tomcat support has been started.