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

Installing RUBiS with JOnAS (by Jacques Cayuela, JOnAS team)

We use the following machines :

  • wake JOnAS server (small JOnAS)
  • fidji mySQL database and Apache+Tomcat
  • hawai client emulator

Create a login rubis password rubis on the machines : wake, fidji, hawai (All the machines involved in your test)

Note that RUBIS_HOME refers to the directory where rubis is installed

Check the configuration

  • rsh

Verify that rsh is ok. On each host create a file ~/.rhosts with the allowed machines names.
To test :
rsh machineName -n uname -a
If you get permission denied the configuration is not ok.

  • Scripts that draw the graphics

Check the scripts are executable
cd $RUBIS_HOME/bench
chmod u+x *.sh *.awk

  • Check MySQL configuration

With remote shell connect to the remote machine.
Create a user jonas/jonas in the mySQL data base, not with all but the exact name of the host.
fidji.dc.frec.bull.fr for example

  • War file

Check the ejb jar is present in WEB-INF/lib in the war package. Else no error is displayed in Tomcat logs

  • Create a symbolic link for apache

/usr/local/apache2/htdocs lrwxrwxrwx 1 root root 42 jan 9 13:34 EJB_HTML -> /server/jonas/src/objectweb/rubis/EJB_HTML

JOnAS environment

By default j2sdk1.4.2, apache-ant-1.5.4, httpunit-1.5.3, jakarta-tomcat-4.1.27
It is possible to work with different binary versions of JOnAS.

We use the following rules : for each version versions JONAS_ROOT=$HOME/pkg/jonas-3-3-xx and JONAS_BASE=$HOME/jb3.3.x :

Customize the files in $JONAS_BASE/conf :
MysqlFidji.properties --> jdbc:mysql://fidji:3306/db_rubis
jonasbase.properties --> webcontainer.http.port=19610
registry port = 2004

In jonas.properties:
jonas.service.dbm.datasources MysqlFidji

In MysqlFidji.properties:
datasource.name mysql
datasource.url jdbc:mysql://fidji:3306/rubis
datasource.classname org.gjt.mm.mysql.Driver
datasource.username jonas
datasource.password jonas
datasource.mapper rdb.mysql

Mysql, Apache, tomcat environment

Mysql is configured to accept requests from a jonas user from any host A database db_rubis is created.

Apache 2.0 is installed under /usr/local/apache2. APACHE_HOME is set to this directory. Under $APACHE_HOME/conf tomcat_jk.conf is modified so that it references the worker workerForRubis

Then, change the URL relative to Rubis under $APACHE_HOME/conf/jk/workers.properties is the worker definition associated to the Tomcat instance that will run on fidji.

Tomcat-4.1.27 is used in a first step in standalone mode.
The following modifications were made to $CATALINA_BASE/conf/server.xml :
<Server port="16050" shutdown="SHUTDOWN" debug="0">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="20040" minProcessors="5" maxProcessors="75" >
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8019" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0">
<Engine name="workerForRubis" defaultHost="localhost" debug="0" jmvRoute="jvm1">


Rubis is installed in : /server/jonas/src/objectweb/rubis (each hosts see this directory with nfs mount)

Under $APACHE_HOME/htdocs link ejb_rubis_web -> /server/jonas/src/objectweb/rubis/ejb_rubis_web

In non distributed mode (everything is on fidji). This can be a first step to check that the configuration is ok:

  • Launch apache as root

$APACHE_HOME/bin/apachectl start ($APACHE_HOME/bin/apachectl stop)

  • Deploy the EJB application

cp $RUBIS_HOME/EJB_EntityBean_id/rubis.jar $JONAS_BASE/ejbjars/autoload

  • Deploy the Web application (using JOnAS_tomcat bundle):

cp $RUBIS_HOME/EJB_EntityBean_id/ejb_rubis_web.war $JONAS_BASE/webapps/autoload jonas start

  • Deploy the Web application (using Tomcat standalone):

cp $RUBIS_HOME/EJB_EntityBean_id/ejb_rubis_web.war $CATALINA_BASE/webapps
cd $RUBIS_HOME/EJB_EntityBean_id
jonas start

Access to RUBiS: http://fidji/ejb_rubis_web/


In case of ClassCast exception problem during UserTransaction look up, try to :
cp $JONAS_BASE/lib/jonas.jar $CATALINA_BASE/webapps/ejb_rubis_web/WEB-INF/lib

RUBiS requires the DB datasource name to be 'mysql' (all in lowercase)

If you are using an EJB implementation that does not make use of the Auth.java servlet the parts for 'Auth' servlet should be commented out in ejb_rubis_web/WEB-INF/web.xml before compiling the bench. Otherwise JOnAS will not be able to load the war file.

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