Go Back to Cloning Documentation Index
KanseiGenie Webservices Installation and Configuration
The KanseiGenie Web Services component is split into two packages:
1) KG_Webservices_DEPENDENCIES.tar : This is a ~800MB package that contains the JBoss 4.2.3.GA source code, installed to /opt/javaApps/JBoss/jboss-4.2.3.GA/ . This large package should have the latest KanseiGenie Web Services component, named FirstEJB3Tutorial.jar
2) KG_Webservices_20YY-MM-DD.tgz : This is a smaller package, mainly containing the latest KanseiGenie Web Services component, FirstEJB3Tutorial.jar. Users who already have JBoss 4.2.3 installed may update to the latest version of KanseiGenie Web Services by moving FirstEJB3Tutorial.jar to /opt/javaApps/JBoss/jboss-4.2.3.GA/server/default/deploy/ .
1 Software Requirements
- JRE 1.5 (JBoss-4.2.3.GA does not work with JRE6 unless patched) for JBoss 4.2x (http://www.java.com/en/download/manual.jsp). Use:
update-alternatives --auto java
update-alternatives --config java
to switch between different versions of JRE if multiple JREs exist in the system.
- MySQL-5.0
- Download KG_Webservices_[RELEASE_DATE].tar.gz from http://kansei.cse.ohio-state.edu/KanseiGenie/Downloads/Packages/
2 Installation and Configuration
- Download everything in section 1 via the provided links.
- Unzip KanseiGenie.tar.gz to some folder <BASE>. The folder structure is as follows:
<BASE>
|-<scripts> : contains scripts to populate the database and validate JBoss setup
|-<lib> : contains jar files to compile java files in <BASE>/test
|-<test> : java files for test JBoss setup
|-README.txt : the same as this document
|-<jboss-4.2.3-GA> : JBoss source and binary files. To be deployed to $JBOSS_HOME
- Set environment variable <JBOSS_HOME> to /opt/javaApps/JBoss/jboss-4.2.3.GA/
- Install MySQL. Create a user and a database for JBoss. We assume the user to be <JBOSS_MYSQL_USER> with password <JBOSS_MYSQL_PWD> and the database to be <JBOSS_DB>.
Execute command 'mysql -u <JBOSS_MYSQL_USER> -p <JBOSS_MYSQL_PWD> <JBOSS_DB> < <BASE>/scripts/KG_ExpDB.sql'
- <jboss-4.2.3-GA> has the following folder structure:
<jboss-4.2.3-GA>
|- <bin>
|- run.sh
|- run_internet.sh
|- shutdown_internet.sh
|- <server>
|- <default>
|- <lib>
|- http-invoker.jar
|- mysql-connector-java-5.0.6-bin.jar
|- <deploy>
|- <http-uinvoker.sar>
|- <jbossws.sar>
|- <jms>
|- mysql-ds.xml
The files listed above are the ones that requires customizations to clone KanseiGenie.
Make the following modifications to customize JBoss for your network configuration:
- Modify <BASE>/<jboss-4.2.3-GA>/bin/run.sh by finding the following line:
###
JAVA_OPTS="-Dprogram.name=$PROGNAME $JAVA_OPTS -Djava.rmi.server.hostname=<YOUR_PUBLIC_IP> -Djava.rmi.server.useLocalHostname=false -Dpublic.firewall.address=<YOUR_PUBLIC_IP>"
###
Replace the place holder <YOUR_PUBLIC_IP> with the machine's public IP address. If the machine is behind a router and is accessed through services such as NAT, use the router's address.
- Modify <BASE>/<jboss-4.2.3-GA>/bin/run_internet.sh by finding the following line:
###
su kansei -c "cd /opt/javaApps/JBoss/jboss-4.2.3.GA/bin/; ./run.sh -b <YOUR_SUBNET_IP> &"
###
su kansei -c is to execute the succeeding command as user 'kansei' for security reasons.
If you do not have such user settings, you can modify the line to:
###
/opt/javaApps/JBoss/jboss-4.2.3.GA/bin/run.sh -b 192.168.1.4 &
###
Also, change the IP address '192.168.1.4' to the machine's IP in the subnet (not the public one). If your machine
is not behind any router, then the subnet IP should be the same as the public IP.
- Modify <BASE>/jboss-4.2.3.GA/server/default/deploy/http-invoker.sar/META-INF/jboss-service.xml,
again replace the two occurences of '140.254.4.52' with your public IP address, specifically in the <attribute name="InvokerURL"> tags.
- Modify <BASE>/jboss-4.2.3.GA/server/default/deploy/mysql-ds.xml, replace '192.168.1.4:3306' in the following line:
###
<connection-url>jdbc:mysql://192.168.1.4:3306/KG_ExpDB</connection-url>
###
to the corresponding values defined by 'bind-address' and 'port' defined
in /etc/mysql/my.cnf. Also replace 'KG_ExpDB' in the same line to <JBOSS_DB>.
Also modify 'KG_manager' and 'KG-Man-Ager' in
###
<user-name>KG_manager</user-name>
<password>KG-Man-Ager</password>
###
to <JBOSS_MYSQL_USER> and <JBOSS_MYSQL_PWD>, as defined in above.
- Copy folder <BASE>/<jboss-4.2.3-GA> to /opt/javaApps/JBoss/ to deploy JBoss. Make sure you have the
permissions setting for folders and executables configured correctly. Run
sudo $JBOSS_HOME/bin/run_internet.sh
to start JBoss.
3 Validation
- Go to http://YOUR_SUBNET_IP:8080/jmx-console in a web browser. If JBoss is configure correctly, you should see the JBoss admin page.
- Go to folder <BASE>/scripts/ and run shell command (environment variable $JBOSS_HOME$ must be set as described in section 2.3. Modify testJBoss.sh, change 99.129.111.206 to <YOUR_PUBLIC_IP>.
- Run shell commands:
chmod +x <BASE>/scripts/testJBoss.sh
<BASE>/scripts/testJBoss.sh
This test will return a list of all existing slices. If the list shows up, configuration of JBoss is successful.
|