User: dewayne
Date: 01/02/15 18:30:58
Modified: developers jboss-tomcat.html
Log:
Added more details on how to build JBoss+EmbeddedTomcat
Revision Changes Path
1.9 +289 -235 newsite/developers/jboss-tomcat.html
Index: jboss-tomcat.html
===================================================================
RCS file: /products/cvs/ejboss/newsite/developers/jboss-tomcat.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- jboss-tomcat.html 2001/02/11 02:23:07 1.8
+++ jboss-tomcat.html 2001/02/16 02:30:57 1.9
@@ -1,235 +1,289 @@
-<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="Adobe GoLive 4">
- <link rel="stylesheet" type="text/css" href="main.css" >
- </head>
-
- <body marginwidth="0" marginheight="0" onload="">
- <table border="0" cellpadding="0" cellspacing="3">
- <tr>
- <td width="600" valign="top">
- <table border="0" cellpadding="2" cellspacing="0">
- <tr>
-
- <td class="pageheader"><b>JBoss/Tomcat/Apache</b></td>
- </tr>
- <tr>
- <td class="newsheader"><b>A Full J2EE Stack</b></td>
- </tr>
- <tr>
- <td class="newsbody"><img height="71" width="100"
src="../pictures/tomcat_3.gif" align="left">The JBoss organization wants to deliver a
complete J2EE based product to the market. The JBoss organization decided to integrate
the Tomcat engine stack with a running version of JBoss in a single VM. Now you can
serve all your servlet and JSP needs with 2 simple downloads and a couple of
configuration files. Check out the Tomcat <a href="http://jakarta.apache.org"
target="_top">homepage</a> for information related to Tomcat.
- <p>The goal of this page is to explain how to make
JBoss automatically start Tomcat, so that it runs in the same VM.</p>
- <p>We now run<b> optimized stacks </b>the
JSP/Servlet engine talks natively with the EJB engine resulting in dramatic speed
increases. Without the optimization the invocation is through the network layer.
With the optimized layers the invocation<b> is native, inVM</b>, within the same
stack of APIs</td>
- </tr>
- <tr>
- <td class="newsheader"><b>Features</b></td>
- </tr>
- <tr>
- <td class="newsbody">
- <ul>
- <li><font face="Myriad Web,Arial">Parsing of
server.xml for full Tomcat configuration support</font>
- <li><font face="Myriad Web,Arial">Support for
Tomcat 3.2 and up</font>
- <li><font face="Myriad Web,Arial">Coming
support for Catalina</font>
- <li><font face="Myriad Web,Arial">Full j2ee
integration in JMX</font>
- <li><font face="Myriad Web,Arial">single
startup/shutdown script</font>
- <li><font face="Myriad Web,Arial">Separated
stacks inVM</font>
- <li><font face="Myriad Web,Arial">Integrated
stacks inVM</font>
- <li><font face="Myriad
Web,Arial">J2EE deployer for JBoss/Tomcat</font>
- <li><font face="Myriad Web,Arial">Full
EAR support</font>
- <li><font face="Myriad Web,Arial">JBoss
Auto-Deploy for EAR</font>
- <li><font face="Myriad
Web,Arial">JNDI shared visibility</font>
- <li><font face="Myriad Web,Arial">Integrated
Security Model</font>
- </ul>
- </td>
- </tr>
- <tr>
- <td class="newsheader"><b>Mailing lists</b></td>
- </tr>
- <tr>
- <td class="newsbody"><font face="Myriad
Web,Arial">Refer to Tomcat's </font><a href="http://jakarta.apache.org"
target="_top">homepage</a> for questions specific to Tomcat deployment.
- <p>Questions about the J2EE deployer and the
integration should be posted to <a href="lists.html">our lists</a> (jboss)</td>
- </tr>
- <tr>
- <td class="newsheader"><b>Distribution and CVS</b></td>
- </tr>
- <tr>
- <td class="newsbody"><font face="Myriad
Web,Arial">JBoss Tomcat is shipped as part of the <a href="binary.html">standard
JBoss/Server package</a></font>
- <p><font face="Myriad Web,Arial">CVS module is <a
href="cvs.html">contrib</a></font></td>
- </tr>
- <tr>
- <td class="newsheader"><b>How-to install</b></td>
- </tr>
- <tr>
- <td class="newsbody"><font face="Myriad Web,Arial">You
will need</font>
- <ul>
- <li><font face="Myriad Web,Arial">JBoss
Pre-2.1</font>
- <li><font face="Myriad Web,Arial">Tomcat
Version 3.2. </font>
- </ul>
- <p>You can get the latest release of tomcat from
the jakarta website. NOTE: This has been tested with tomcat 3.2. However it won't run
on tomcat 3.1, and tomcat 3.3 is not suppported yet.</p>
- <ol>
- <li><strong>Setup start script.</strong>
- <br>
- In JBOSS_HOME/bin/run.sh (or run.bat), add the
following:
- <br>
-<pre>
-TOMCAT_HOME= ... change this to be where Tomcat lives ...
-
-# Add all login modules for JAAS-based security
-# and all libraries that are used by them here
-
-if [ "${TOMCAT_HOME}X" != "X" ] ; then
- if [ -x $TOMCAT_HOME ] ; then
- echo "Adding jar files in ${TOMCAT_HOME}/lib to CLASSPATH"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/servlet.jar"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/webserver.jar"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/xml.jar"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/jaxp.jar"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/parser.jar"
- CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/jasper.jar"
-
- # Add the tools.jar file so that Tomcat can find the Java compiler.
- CLASSPATH="$CLASSPATH:$JAVA_HOME/lib/tools.jar"
- else
- echo "TOMCAT_HOME is set, but is an invalid directory"
- fi
-fi
-</pre>
-
-and change
-<pre>
-java -server -classpath $CLASSPATH org.jboss.Main $@
-to
-java -server -classpath $CLASSPATH -Dtomcat.home=$TOMCAT_HOME org.jboss.Main $@
-</pre>
- <li><strong>Edit jboss.jcml.</strong><br>
- It is located in the conf/default directory
under the base of your JBoss binary distribution,
- or the dist/conf/default directory if you
built from the JBoss source.
- There are some commented-out lines that deal
with Tomcat:
-<pre>
- <!--
- Uncomment to add embedded tomcat service
- <mbean code="org.jboss.tomcat.EmbeddedTomcatService"
name="DefaultDomain:service=EmbeddedTomcat" />
- -->
-</pre>
- <p>You need to uncomment the mbean line so it
reads as follows :</p>
-<pre>
- <!--
- Uncomment to add embedded tomcat service
- -->
- <mbean code="org.jboss.tomcat.EmbeddedTomcatService"
name="DefaultDomain:service=EmbeddedTomcat" />
-</pre>
-
-<p>
-Further down in the jboss.jcml file, make sure your J2eeDeployer is set as:
-</p>
-
-<pre>
- <mbean code="org.jboss.deployment.J2eeDeployer"
name="J2EE:service=J2eeDeployer">
- <attribute name="DeployerName">Default</attribute>
- <attribute name="JarDeployerName">:service=ContainerFactory</attribute>
- <attribute name="WarDeployerName">:service=EmbeddedTomcat</attribute>
- <mbean>
-</pre>
-
- <li><strong>Start JBoss.</strong> <br>
- If you start JBoss now by typing
<code>run.sh</code> (or <code>run.bat</code> for Windows) you should see the following
Tomcat related output in your log messages:
-<pre>
- ...
-[EmbeddedTomcat] Starting
-[EmbeddedTomcat] Starting EmbeddedTomcat....
-[EmbeddedTomcat] Starting tomcat. Check logs/tomcat.log for error messages
-[EmbeddedTomcat] No apps in webapps/
-2001-02-09 11:16:46 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
-2001-02-09 11:16:46 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
-[EmbeddedTomcat] OK
-2001-02-09 11:16:47 - PoolTcpConnector: Starting Ajp13ConnectionHandler on 8009
-[EmbeddedTomcat] Started
- ...
-</pre>
-
- <p>That's it !! Note that the connection handlers
- are configured from Tomcat's server.xml file.
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="newsheader" width="600"><b>How-to package and deploy an
EAR file on JBoss/Tomcat</b></td>
- </tr>
- <tr>
- <td class="newsbody" width="600">In order to benefit from the
classloader integration, you have to deploy your application in an EAR file as
recommended by the <a href="http://java.sun.com/j2ee/download.html#platformspec">J2EE
specification</a>.
-
- <p>In case you don't want to read all the J2EE spec, here is a
brief summary of what you have to do:</p>
- <ol>
- <li><b>Write your beans and package them in an ejb-jar
file.</b></br>
- You don't have to do anything special here. See the <a
href="../../projects/jbossweb/manual/developing.html">manual</a> for details on how to
package beans for JBoss.<br>
-
- <li><b>Write your servlets/JSPs and package them in a war
file.</b><br>
- Add a Class-Path attribute to your war files MANIFEST.MF
file
- to reference your beans package. for detailed information
on that see: <a href="../documentation/J2eeDeployment_howto.html">J2eeDeployment
Howto</a>.<br>
- Assuming you have a bean deployed under the jndi name
"myBean", the calls to this bean from your servlets will look like that:
- <pre>MyBeanHome home = (MyBeanHome)new
InitialContext().lookup("myBean");
-MyBean bean = home.create();</pre>
- <p><b>Notes</b>:</p>
- <ul>
- <li>We don't support lookups in the "java:"
namespace from the servlets yet, but work is in progress (MF FIXME: I think
this is done).
- <li>Since JBoss takes care of the classloader stuff,
you don't have to include much in the WEB-INF/lib directory: you don't need any of
your beans interfaces, and you don't need the old jboss-client.jar, jnp-client.jar...
- </ul>
- <br>
- <li><b>Package your application in an ear file</b>.<br>
- An ear file is a jar archive which contains:
- <ul>
- <li>Your jar files
- <li>Your war files
- <li>A deployment descriptor for your application. This
file must be named "application.xml", and must be located in the META-INF
directory in the ear archive. This file tells JBoss which modules are EJBs, which ones
are web modules, and the context paths for the web-modules. Here is a sample
application.xml file:
- <pre><?xml version="1.0"
encoding="ISO-8859-1"?>
-
-<application>
- <display-name>My application</display-name>
-
- <module>
- <web>
- <web-uri>webmodule.war</web-uri>
- <context-root>/servlets</context-root>
- </web>
- </module>
-
- <module>
- <ejb>beans.jar</ejb>
- </module>
-
-</application></pre>
- <p>See also the <a
href="http://java.sun.com/j2ee/dtds/application_1_2.dtd">DTD</a> for application.xml
on Javasoft's website.</p>
- </ul>
- <li><b>Deploy your ear file</b>.<br>
- Option 1: Copy your ear file to JBOSS_HOME/deploy (wow!)
- <p></p>
- Option 2: Surf to http://yourhost:8082, and find the
- J2eeDeployer service. Give it the URL of your ear file
(don't forget the protocol, be it http: or file:), and click on the deploy button.<br>
-
- <li><b>That's it!</b><br>
- The server console should show your application being
deployed
- on Tomcat and JBoss, and your web module should be
available
- on http://yourhost:8080/servlets (assuming the
context-root was "/servlets").
- <p>
- <b>Note</b>: Even though JBoss and Tomcat are
- cooperating to dynamically deploy your application,
Apache must
- be configured manually. This means that for your
application
- to be visible through Apache, you must setup the
appropriate
- JkMount statements in mod_jk.conf.
- </p>
- </ol>
- <p>For a full example including a servlet and an EJB, see the
<a href="/zip_archives/contrib-cvs.zip">contrib</a> module</td>
- </tr>
- <tr>
- <td width="600"></td>
- </tr>
- </table>
- </body>
-
-</html>
-
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <link rel="stylesheet" type="text/css" href="main.css" >
+ </head>
+
+ <body marginwidth="0" marginheight="0">
+ <table border="0" cellpadding="0" cellspacing="3">
+ <tr>
+ <td width="600" valign="top">
+ <table border="0" cellpadding="2" cellspacing="0">
+ <tr>
+ <td
class="pageheader"><b>JBoss/Tomcat/Apache</b></td>
+ </tr>
+ <tr>
+ <td class="newsheader"><b>A Full J2EE Stack</b></td>
+ </tr>
+ <tr>
+ <td class="newsbody"><img height="71" width="100"
src="../pictures/tomcat_3.gif" align="left">The
+ JBoss organization wants to
deliver a complete J2EE based product to the market.
+ The JBoss organization
decided to integrate the Tomcat engine stack with a running
+ version of JBoss in a single
VM. Now you can serve all your servlet and JSP needs
+ with 2 simple downloads and a
couple of configuration files. Check out the
+ Tomcat <a
href="http://jakarta.apache.org" target="_top">homepage</a> for
+ information related to Tomcat.
+ <p>The goal of this page is to explain how to make
JBoss automatically start Tomcat,
+ so that it runs in the same
VM.</p>
+ <p>We now run<b> optimized stacks </b>the JSP/Servlet
engine talks natively with
+ the EJB engine resulting in
dramatic speed increases. Without the optimization
+ the invocation is through the
network layer. With the optimized layers the
+ invocation<b> is native,
inVM</b>, within the same stack of APIs</td>
+ </tr>
+ <tr>
+ <td class="newsheader"><b>Features</b></td>
+ </tr>
+ <tr>
+ <td class="newsbody">
+ <ul>
+ <li><font face="Myriad Web,Arial">Parsing of
server.xml for full Tomcat configuration support</font>
+ <li><font face="Myriad Web,Arial">Support for
Tomcat 3.2 and up</font>
+ <li><font face="Myriad Web,Arial">Coming
support for Catalina</font>
+ <li><font face="Myriad Web,Arial">Full j2ee
integration in JMX</font>
+ <li><font face="Myriad Web,Arial">single
startup/shutdown script</font>
+ <li><font face="Myriad Web,Arial">Separated
stacks inVM</font>
+ <li><font face="Myriad Web,Arial">Integrated
stacks inVM</font>
+ <li><font face="Myriad
Web,Arial">J2EE deployer for JBoss/Tomcat</font>
+ <li><font face="Myriad Web,Arial">Full
EAR support</font>
+ <li><font face="Myriad Web,Arial">JBoss
Auto-Deploy for EAR</font>
+ <li><font face="Myriad
Web,Arial">JNDI shared visibility</font>
+ <li><font face="Myriad Web,Arial">Integrated
Security Model</font>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td class="newsheader"><b>Mailing lists</b></td>
+ </tr>
+ <tr>
+ <td class="newsbody"><font face="Myriad
Web,Arial">Refer to Tomcat's </font><a href="http://jakarta.apache.org"
target="_top">homepage</a> for questions specific to Tomcat deployment.
+ <p>Questions about the J2EE deployer and the
integration should be posted to <a href="lists.html">our lists</a> (jboss)</td>
+ </tr>
+ <tr>
+ <td class="newsheader"><b>Distribution and CVS</b></td>
+ </tr>
+ <tr>
+ <td class="newsbody"><font face="Myriad Web,Arial">
+ <p>
+ JBoss Tomcat is shipped as
part of the <a href="binary.html">standard JBoss/Server package</a>.
+ However, the current
distribution is based on an earlier version of EmbeddedTomcat that
+ does <b>not</b> parse Tomcat's
server.xml. If you don't need server.xml parsed (ie, you're
+ not trying to integrate with
Apache), then the current version may be the easiest route for
+ you.
+ </p>
+ <p>
+ The Pre-2.1 CVS source
contains a new version of EmbeddedTomcat
+ (plus other enhancements) that
<b>does</b> parse Tomcat's server.xml.
+ It is recommended that you use
the information provided below. This
+ new version of EmbeddedTomcat
will be rolled in to the official 2.1
+ release.
+ <br>
+ </p>
+ </font>
+ </tr>
+ <tr>
+ <td class="newsheader"><b>How-to build and install
EmbeddedTomcat</b></td>
+ </tr>
+ <tr>
+ <td class="newsbody"><font face="Myriad Web,Arial">You
will need</font>
+ <ul>
+ <li><font face="Myriad Web,Arial">JBoss
Pre-2.1</font>
+ <li><font face="Myriad Web,Arial">Tomcat
Version 3.2. </font>
+ </ul>
+ <p>You can get the
latest CVS version of JBoss Pre-2.1 from
+ <a
href="/zip_archives/">here</a>. Grab both jboss-cvs.zip and
+ contrib-cvs.zip.
+ </p>
+ <p>You can get the latest release of tomcat from
the jakarta website. NOTE: This has been tested with tomcat 3.2. However it won't run
on tomcat 3.1, and tomcat 3.3 is not suppported yet.</p>
+
+ <ol>
+ <li><strong>Build JBoss</strong> <br>
+ Build JBoss from the CVS
sources. This is generally accomplished
+ by changing to the src/build
directory and executing build.sh (or
+ build.bat on NT).
+ <br>
+ <br>
+ <li><strong>Build
EmbeddedTomcat</strong> <br>
+ Build the EmbeddedTomcat
service from the contrib CVS sources.
+ This is generally accomplished
by changing to the
+ contrib/tomcat/src/build
directory and executing build.sh
+ (or build.bat on NT). NOTE:
You need to edit build.sh first
+ and change the values of
JBOSS_HOME and TOMCAT_HOME to fit your
+ environment.
+ <br>
+ <br>
+ Once the original build
completes, execute <i>build.sh client</i>.
+ This will create a new
tomcat-test.ear.
+ <br>
+ <br>
+ Once you've built
EmbeddedTomcat,
+ copy
contrib/tomcat/tomcat-service.jar to $JBOSS_HOME/lib/ext. Finally,
+ copy
contrib/tomcat/tomcat-test.ear to $JBOSS_HOME/deploy.
+ <br>
+ <br>
+ <li><strong>Setup start script</strong> <br>
+ In JBOSS_HOME/bin/run.sh (or run.bat), add the
+ following: <br>
+ <pre>
+TOMCAT_HOME= ... change this to be where Tomcat lives ...
+
+# Add all login modules for JAAS-based security
+# and all libraries that are used by them here
+
+if [ "${TOMCAT_HOME}X" != "X" ] ; then
+ if [ -x $TOMCAT_HOME ] ; then
+ echo "Adding jar files in ${TOMCAT_HOME}/lib to CLASSPATH"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/servlet.jar"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/webserver.jar"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/xml.jar"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/jaxp.jar"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/parser.jar"
+ CLASSPATH="$CLASSPATH:${TOMCAT_HOME}/lib/jasper.jar"
+
+ # Add the tools.jar file so that Tomcat can find the Java compiler.
+ CLASSPATH="$CLASSPATH:$JAVA_HOME/lib/tools.jar"
+ else
+ echo "TOMCAT_HOME is set, but is an invalid directory"
+ fi
+fi
+</pre>
+ and change
+ <pre>
+java -server -classpath $CLASSPATH org.jboss.Main $@
+to
+java -server -classpath $CLASSPATH -Dtomcat.home=$TOMCAT_HOME org.jboss.Main $@
+</pre>
+ <li><strong>Edit jboss.jcml</strong><br>
+ It is located in the conf/default directory under
+ the base of your JBoss binary distribution, or
+ the dist/conf/default directory if you built from
+ the JBoss source. There are some commented-out
+ lines that deal with Tomcat:
+ <pre>
+ <!--
+ Uncomment to add embedded tomcat service
+ <mbean code="org.jboss.tomcat.EmbeddedTomcatService"
name="DefaultDomain:service=EmbeddedTomcat" />
+ -->
+</pre>
+ <p>You need to uncomment the mbean line so it
+ reads as follows :</p>
+ <pre>
+ <!--
+ Uncomment to add embedded tomcat service
+ -->
+ <mbean code="org.jboss.tomcat.EmbeddedTomcatService"
name="DefaultDomain:service=EmbeddedTomcat" />
+</pre>
+ <p> Further down in the jboss.jcml file, make
+ sure your J2eeDeployer is set as: </p>
+ <pre>
+ <mbean code="org.jboss.deployment.J2eeDeployer"
name="J2EE:service=J2eeDeployer">
+ <attribute name="DeployerName">Default</attribute>
+ <attribute name="JarDeployerName">:service=ContainerFactory</attribute>
+ <attribute name="WarDeployerName">:service=EmbeddedTomcat</attribute>
+ <mbean>
+</pre>
+ <li><strong>Edit Tomcat's server.xml</strong> <br>
+ Add the following line to server.xml in
$TOMCAT_HOME/conf/
+ <pre><RequestInterceptor
className="org.apache.tomcat.request.Jdk12Interceptor" />
+</pre>
+ <li><strong>Start JBoss</strong> <br>
+ If you start JBoss now by typing
<code>run.sh</code>
+ (or <code>run.bat</code> for Windows) you should
+ see the following Tomcat related output in your
+ log messages:
+ <pre>
+ ...
+[EmbeddedTomcat] Starting
+[EmbeddedTomcat] Starting EmbeddedTomcat....
+[EmbeddedTomcat] Starting tomcat. Check logs/tomcat.log for error messages
+[EmbeddedTomcat] No apps in webapps/
+2001-02-09 11:16:46 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
+2001-02-09 11:16:46 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
+[EmbeddedTomcat] OK
+2001-02-09 11:16:47 - PoolTcpConnector: Starting Ajp13ConnectionHandler on 8009
+[EmbeddedTomcat] Started
+ ...
+</pre>
+ <p>That's it !! Note that the connection handlers
+ are configured from Tomcat's server.xml file.
+ </ol>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="newsheader" width="600"><b>How-to package and deploy an
EAR file on JBoss/Tomcat</b></td>
+ </tr>
+ <tr>
+ <td class="newsbody" width="600">In order to benefit from the
classloader integration, you have to deploy your application in an EAR file as
recommended by the <a href="http://java.sun.com/j2ee/download.html#platformspec">J2EE
specification</a>.
+
+ <p>In case you don't want to read all the J2EE spec, here is a
brief summary of what you have to do:</p>
+ <ol>
+ <li><b>Write your beans and package them in an ejb-jar
file.</b>
+ You don't have to do anything special here. See the <a
href="../../projects/jbossweb/manual/developing.html">manual</a> for details on how to
package beans for JBoss.<br>
+
+ <li><b>Write your servlets/JSPs and package them in a war
file.</b><br>
+ Add a Class-Path attribute to your war files MANIFEST.MF
file
+ to reference your beans package. for detailed information
on that see: <a href="../documentation/J2eeDeployment_howto.html">J2eeDeployment
Howto</a>.<br>
+ Assuming you have a bean deployed under the jndi name
"myBean", the calls to this bean from your servlets will look like that:
+ <pre>MyBeanHome home = (MyBeanHome)new
InitialContext().lookup("myBean");
+MyBean bean = home.create();</pre>
+ <p><b>Notes</b>:</p>
+ <ul>
+ <li>We don't support lookups in the "java:"
namespace from the servlets yet, but work is in progress (MF FIXME: I think
this is done).
+ <li>Since JBoss takes care of the classloader stuff,
you don't have to include much in the WEB-INF/lib directory: you don't need any of
your beans interfaces, and you don't need the old jboss-client.jar, jnp-client.jar...
+ </ul>
+ <br>
+ <li><b>Package your application in an ear file</b>.<br>
+ An ear file is a jar archive which contains:
+ <ul>
+ <li>Your jar files
+ <li>Your war files
+ <li>A deployment descriptor for your application. This
file must be named "application.xml", and must be located in the META-INF
directory in the ear archive. This file tells JBoss which modules are EJBs, which ones
are web modules, and the context paths for the web-modules. Here is a sample
application.xml file:
+ <pre><?xml version="1.0"
encoding="ISO-8859-1"?>
+
+<application>
+ <display-name>My application</display-name>
+
+ <module>
+ <web>
+ <web-uri>webmodule.war</web-uri>
+ <context-root>/servlets</context-root>
+ </web>
+ </module>
+
+ <module>
+ <ejb>beans.jar</ejb>
+ </module>
+
+</application></pre>
+ <p>See also the <a
href="http://java.sun.com/j2ee/dtds/application_1_2.dtd">DTD</a> for application.xml
on Javasoft's website.</p>
+ </ul>
+ <li><b>Deploy your ear file</b>.<br>
+ Option 1: Copy your ear file to JBOSS_HOME/deploy (wow!)
+ <p></p>
+ Option 2: Surf to http://yourhost:8082, and find the
+ J2eeDeployer service. Give it the URL of your ear file
(don't forget the protocol, be it http: or file:), and click on the deploy button.<br>
+
+ <li><b>That's it!</b><br>
+ The server console should show your application being
deployed
+ on Tomcat and JBoss, and your web module should be
available
+ on http://yourhost:8080/servlets (assuming the
context-root was "/servlets").
+ <p>
+ <b>Note</b>: Even though JBoss and Tomcat are
+ cooperating to dynamically deploy your application,
Apache must
+ be configured manually. This means that for your
application
+ to be visible through Apache, you must setup the
appropriate
+ JkMount statements in mod_jk.conf.
+ </p>
+ </ol>
+ <p>For a full example including a servlet and an EJB, see the
<a href="/zip_archives/contrib-cvs.zip">contrib</a> module</td>
+ </tr>
+ <tr>
+ <td width="600"></td>
+ </tr>
+ </table>
+ </body>
+
+</html>