ObjectWeb Consortium

Advanced Search - Powered by Google

  Consortium     Activities     Projects     Forge     Events 


Project Links
· Home
· Download
· Documentation
· Mailing List
· Experimental Results
· License
· History

Developers' Corner
· Getting Involved
· ObjectWeb Forge Site
· CVS Repository

· Contacts
· Team


Configuring Apache HTTP server

PHP version

If you want to use the default properties file provided with RUBiS, you just have to set your DocumentRoot (in Apache's conf/httpd.conf file) to RUBiS distribution home directory.

Example: DocumentRoot /home/RUBiS

If you don't want to modify your DocumentRoot, RUBiS PHP directory must be accessible through a certain path that you'll have to set in the rubis.properties file.

Servlets and EJB versions

Ensure that the Servlet_HTML or ejb_rubis_web directories are accessible through your Apache server (same procedure as for PHP). Then configure the Tomcat servlet server.

Configure mod_jk:

  • Add the file mod_jk.so and mod_webapp.so to the /etc/httpd/libexec directory.
  • At the end of your httpd.conf add:

LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile ${CATALINA_HOME}/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel info
JkMount /ejb_rubis_web/servlet/* ajp13
JkMount /servlet/* ajp13
Include ${CATALINA_HOME}/conf/auto/mod_jk.conf

Configuring Tomcat servlets server

Follow Tomcat documentation if you want to install RUBiS in a specific directory without using default settings nor having RUBiS servlets in your classpath, else just run the start/stop scripts provided with RUBiS.

Configure ${CATALINA_HOME}/conf/server.xml

In ${CATALINA_HOME}/conf/server.xml uncomment the line regarding AJP 1.3 connector if needed:

<Connector className="org.apache.ajp.tomcat4.Ajp13Connector" port="8009" minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/>

After the line:

<Server port="8005" shutdown="SHUTDOWN" debug="0">


<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" jkDebug="info" workersConfig="catalina_home/conf/workers.properties" jkLog="/catalina_home/logs/mod_jk.log"/>

Define a context for rubis like this:

<Context path="/ejb_rubis_web/servlet"
reloadable="false" >
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_rubis_ejb_log." suffix=".txt"
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
append="true" />

<Context path="/servlet"
reloadable="false" >
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_rubis_servlet_log." suffix=".txt"
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
append="true" />

Configure workers.properties (mod_jk)

In the ${CATALINA_HOME}/conf/worker.properties file, configure:
worker.ajp13.host=machine running tomcat

Set classpath

In ${CATALINA_HOME}/bin/setclasspath.sh replace




so that the existing classpath will be taken in account

Specifying the EJB server and naming factory for the EJB version

This is done in the tomcat_start.sh script by setting the CATALINA_OPTS environment variable.

According to the problem size you may also have to set the heap and stack sizes to prevent Tomcat from running out of memory.

Example to use Tomcat with JOnAS using RMI on pouet.cs.rice.edu on default port 1099, using a maximum heap size of 512MB for Tomcat and a 16KB stack for each thread:

export CATALINA_OPTS="-Xmm512m -Xss16k -Djava.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory -Djava.naming.provider.url=rmi://pouet.cs.rice.edu:1099 -Djava.naming.factory.url.pkgs=org.objectweb.jonas.naming"

Configuring JBoss EJB server

Edit the ${JBOSS_DIST}/server/default/conf/standardjbosscmp-jdbc.xml (EJB 2.0) and/or standardjaws.xml (EJB1.1), set the datasource to java:/rubis and the datasource-mapping to mySQL.

Add a mysql-ds.xml file to ${JBOSS_DIST}/server/default/deploy directory.

Add the mysql driver to ${JBOSS_DIST}/server/default/lib directory.

Configuring JOnAS EJB server

Set the ${JONAS_ROOT}/conf/jndi.properties file to rmi or jeremie.

Configure the ${JONAS_ROOT}/conf/jonas.properties file.

Set the path to the mysql driver in ${JONAS_ROOT}/bin/unix/confih_env.

Add a mysql.properties file to ${JONAS_ROOT}/conf.

Setting Up rubis.properties

This files contains information about the http server : name, port, paths for html pages and scripts for each version of RUBiS. The version of RUBiS and the transition table (workload pattern) currently used and are also defined in this file. Various parameters to generate data for the database are provided in this file : number of users, paths to the files with the list of regions and categories, percentage of items with various criteria, maximum number of bids per items, maximum number of comments per user, comments length, etc ... (example)

Copyright © 1999-2009, OW2 Consortium | contact | webmaster | Last modified at 2009-10-07 08:43 PM