JBoss Version: 3.0.1 RC1
Petstore Version: 1.1.2
J2SE Version: 1.4
J2EE Version: 1.3.1
Java Pet Store Application Version: 1.1.2
1. Download Java 2 Standard Edition 1.4 SDK
http://java.sun.com/j2se/1.4/download.html
2. Download Java 2 Enterprise Edition 1.3.1 SDK
http://java.sun.com/j2ee/sdk_1.3/
3. Download JBoss application server source code:
http://prdownloads.sourceforge.net/jboss/jboss-3.0.1RC1-src.tgz?download
4. Download Java Petstore Sample Application
http://developer.java.sun.com/developer/releases/petstore/petstore1_1_2.html
5. Download the JBoss Pet Store patch file
http://www.jboss.org/docs/manual/files/jps112-01.zip
2. Install the J2EE SDK. Follow instructions on site:
http://java.sun.com/j2ee/sdk_1.3/install.html
3. Unpack the JBoss software anywhere on your home directory:
gunzip jboss-3.0.1RC1-src.tgz
tar -xvf jboss-3.0.1RC1.tar
The root directory of the JBoss source installation will be referred to as $JBOSS_SOURCE
4. Build the JBoss application server
cd $JBOSS_SOURCE/build
sh build.sh
Application will probably compile with warnings... just ignore. Within the build directory, an output directory should have been created. Change directory to this output directory:
cd output
Within the output directory is the JBoss installation. From now on this directory will be referred to as $JBOSS_HOME
5. Unzip the Java Petstore anywhere in your home directory:
unzip jps-1_1_2.zip
The root directory of the Pet Store demo will be referred to below as
$PETSTORE
6. Install the JBoss Pet Store patch file: Copy jps-rr-patch.tar to root directory $PETSTORE of the the pet store installation. Change to the this directory and untar the file. Select replace [A]ll when prompted.
cd $PETSTORE
tar -xvf
jps-rr-patch.tar
1. Open up your .cshrc file
2. Add the following environment variables:
setenv
JAVA_HOME [directory where you installed j2sdk]
ex: "/usr/java/j2sdk1.4.0"
setenv J2EE_HOME
[directory
where you installed j2sdkee] ex: "/usr/java/j2sdkee1.3.1"
setenv JBOSS_HOME
[directory
where you jboss was compiled] "~/jboss-3.0.1RC1-src/build/output/jboss-3.0.1RC1"
Your PATH should also include the bin directories of the J2EE SDK and J2SE
3. Save and close file
4. Refresh environment:
source .cshrc
1. Rebuild Pet Store application:
cd $PETSTORE/src/petstore/src
sh build.sh
cp cloudscape-service.xml $JBOSS_HOME/server/default/deploy
2. Copy login-config.xml to $JBOSS_HOME/server/default/conf directory. Replace the current login.xml file.
cp login-config.xml $JBOSS_HOME/server/default/conf
3. Change directory to $JBOSS_HOME/server/default/conf directory:
cd $JBOSS_HOME/server/default/conf
Edit the "jboss-minimal.xml" and "jboss-service.xml" files. Change the port number for the NamingService from 1099 to 1097. This change is needed because of port conflicts between cloudscape and the JBoss naming service:
Original:
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming">
<attribute name="Port">1099</attribute>
</mbean>
New:
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming">
<attribute name="Port">1097</attribute>
</mbean>
4. Add JARS to JBoss:
a. Copy cloudscape.jar, cloudutil.jar, cloudclient.jar,
RmiJdbc.jar to $JBOSS_HOME/server/default/lib
cp
$J2EE_HOME/lib/system/cloudscape.jar $JBOSS_HOME/server/default/lib
cp $J2EE_HOME/lib/system/cloudutil.jar
$JBOSS_HOME/server/default/lib
cp
$J2EE_HOME/lib/cloudscape/cloudclient.jar $JBOSS_HOME/server/default/lib
cp $J2EE_HOME/lib/cloudscape/RmiJdbc.jar
$JBOSS_HOME/server/default/lib
5. Copy petstore application to deploy directory:
cp $PETSTORE/src/petstore/build/petstore.ear
$JBOSS_HOME/server/default/deploy
1. Start up cloudscape database in a separate terminal window:
$J2EE_HOME/bin/cloudscape -start
cd $JBOSS_HOME/bin
2. Start JBoss
sh run.sh
1. Point your browser to http://localhost:8080/estore
to start the pet store.