JacORB - Tomcat Integration mini HOW-TO

The intention of this HOW-TO is to briefly describe how you can integrate Jacorb classes into Jakarta TOMCAT.

If you want to use JacORB as the platform for your middle-tier and are interested in having access to them from Servlets deployed in Jakarta TOMCAT you have just to do these few steps:

  1. Install JacORB on the TOMCAT server machine.
  2. Load the TOMCAT Java Virtual Machine with the JacORB classes including them in the boot classpath by modifying the following line in the appropiate TOMCAT startup archives (Win32 BAT File or Unix Shell Script):

    On Unix:
            -Xbootclasspath:${JACORB_HOME}/lib/jacorb.jar:${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH} 
            -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
            -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
        
    On Windows:
            -Xbootclasspath:%JACORB_HOME%\lib\jacorb.jar;%JAVA_HOME%\jre\lib\rt.jar;%CLASSPATH%
            -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
            -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
        

    JACORB_HOME is the directory where JacORB is installed, and JAVA_HOME is the directory where the JDK or JRE is installed.

    File: TOMCAT.SH (Linux/Unix)
     
    ...
    ...
    ...
    
    if [ "$1" = "start" ] ; then shift echo Using classpath: ${CLASSPATH} if [ "$1" = "-security" ] ; then echo Starting with a SecurityManager $JAVACMD $TOMCAT_OPTS -Xbootclasspath:${JACORB_HOME}/lib/jacorb.jar:${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH} -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" & else $JAVACMD $TOMCAT_OPTS -Xbootclasspath:${JACORB_HOME}/lib/jacorb.jar:${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH} -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" & fi ... ... ...


    File: TOMCAT.BAT (Win32)
    ...
    ...
    ...
    :startServer
       echo Starting Tomcat in new window
    
       if "%2" == "-security" goto startSecure
    
       %_STARTJAVA% %TOMCAT_OPTS% -Xbootclasspath:%JACORB_HOME%\lib\jacorb.jar;%JAVA_HOME\jre\lib\rt.jar;%CLASSPATH% 
       -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
       -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton 
       -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
    
       goto cleanup
    ...
    ...
    ...
    
  3. When you execute STARTUP.BAT or STARTUP.SH to launch TOMCAT, the appropiate boot classpath will be loaded and you are ready to use JacORB classes for embedding client CORBA code in your servlets.

Please report bugs or make questions on this HOW-TO to:

Taller de Desarrollo de Software - Proyecto Aula Virtual

Universidad Simón Bolívar - Caracas - Venezuela