Install Tomcat 6
Unpack Tomcat installation
Make scripts executable
$ chmod u+x apache-tomcat-6.0.14/bin/*.sh
Start Tomcat
$ apache-tomcat-6.0.14/bin/startup.sh Using CATALINA_BASE: /Users/dain/work/ejb-plugin/apache-tomcat-6.0.14 Using CATALINA_HOME: /Users/dain/work/ejb-plugin/apache-tomcat-6.0.14 Using CATALINA_TMPDIR: /Users/dain/work/ejb-plugin/apache-tomcat-6.0.14/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
Verify Tomcat is Running
Visit http://localhost:8080/ and you should see the Tomcat welcome page.
Stop Tomcat
$ apache-tomcat-6.0.14/bin/shutdown.sh Using CATALINA_BASE: /Users/dain/work/ejb-plugin/apache-tomcat-6.0.14 Using CATALINA_HOME: /Users/dain/work/ejb-plugin/apache-tomcat-6.0.14 Using CATALINA_TMPDIR: /Users/dain/work/ejb-plugin/apache-tomcat-6.0.14/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
Install OpenEJB
Unzip OpenEJB Tomcat plugin in Tomcat webapps directory
$ cd apache-tomcat-6.0.14/webapps/ apache-tomcat-6.0.14/webapps$ jar -xf ../../openejb-tomcat-3.0.0-SNAPSHOT-bin.zip apache-tomcat-6.0.14/webapps$ cd ../..
Copy openejb-loader jar to Tomcat lib directory
$ cp apache-tomcat-6.0.14/webapps/openejb/lib/openejb-loader-3.0.0-SNAPSHOT.jar apache-tomcat-6.0.14/lib/
Add OpenEJB listener to Tomcat server.xml file
Add the following
highlighted lines
to your apache-tomcat-6.0.14/conf/server.xml file:
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<!-- OpenEJB plugin for tomcat -->
<Listener className="org.apache.openejb.loader.OpenEJBListener" />
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
....