jboss-user  

Re: [JBoss-user] JBoss-Tomcat-Apache (try again)

K.V. Vinay Menon
Thu, 07 Jun 2001 16:42:21 -0700

For what its worth some stuff i'd typed about setting up apache/tomcat/jboss

Setting up jBoss-Tomcat 2.2


1. Unzip the zip file to your applications directory
2. To setup a datasource,

   a) Take a back up of jboss.jcml under JBOSS_HOME/conf/tomcat [assuming
that you are running the Tomcat-jBoss combo together and the profile you are
using is 'tomcat' in your run.bat file under JBOSS_HOME/bin]
   b) Copy the oracle driver zip file to the JBOSS_HOME/lib/ext directory.
   c) Edit the <!--JDBC--> entry to include the Oracle Driver in the list of
JDBC drivers. For eg:

  <mbean code="org.jboss.jdbc.JdbcProvider"
name="DefaultDomain:service=JdbcProvider">
     <attribute name="Drivers">
         org.hsql.jdbcDriver, org.enhydra.instantdb.jdbc.idbDriver,
oracle.jdbc.driver.OracleDriver
    </attribute>
  </mbean>

   d) To setup an Oracle datasource, for eg: a datasource using the thin
driver to schema 'test1' on server 'isev01' the mbean code would be

  <mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=PartModelDS">
    <attribute name="PoolName">PartModelDS</attribute>
    <attribute
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l</attribute>
    <attribute name="Properties"></attribute>
    <attribute name="URL">jdbc:oracle:thin:@isev01:1521:test1</attribute>
    <attribute name="GCMinIdleTime">1200000</attribute>
    <attribute name="JDBCUser">pmod</attribute>
    <attribute name="MaxSize">10</attribute>
    <attribute name="Password">pmod</attribute>
    <attribute name="GCEnabled">false</attribute>
    <attribute name="InvalidateOnError">false</attribute>
    <attribute name="TimestampUsed">false</attribute>
    <attribute name="Blocking">true</attribute>
    <attribute name="GCInterval">120000</attribute>
    <attribute name="IdleTimeout">1800000</attribute>
    <attribute name="IdleTimeoutEnabled">false</attribute>
    <attribute name="LoggingEnabled">false</attribute>
    <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
    <attribute name="MinSize">0</attribute>
  </mbean>


Setting up Apache to use Tomcat as its servlet/JSP engine.

1. Copy mod_jk.dll/mod_jk.so to the 'modules' directory under Apache.

The mod files can be got from

For NT:
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/win32/i38
6/

For Linux:
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/linux/i38
6/


2. Add the following block to your TOMCAT_HOME/conf/server.xml file.
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
  <Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
  <Parameter name="port" value="8009"/>
</Connector>
NOTE: Do not remove the Connector setting for Ajp12 as it is required to
shut down Tomcat
   [otherwise it would throw a truck load exception!]

3. Edit the TOMCAT_HOME\conf\workers.properties file to set the following up
correctly,
 workers.tomcat_home=TOMCAT_HOME
 workers.java_home=JAVA_HOME
 ps=\

 eg: for NT

workers.tomcat_home=D:\Applications\jboss-tomcat-2.1-beta\jakarta-tomcat-3.2
.1\
 workers.java_home=D:\Applications\jdk1.3.0_02
 ps=\

 or,

 workers.tomcat_home=%TOMCAT_HOME%
 workers.java_home=%JAVA_HOME%
 ps=\

 eg: for Linux
 workers.tomcat_home=$TOMCAT_HOME
 workers.java_home=$JAVA_HOME
 ps=/

4. At the end of the APACHE_HOME\conf\httpd.conf file add

 NOTE:The actual values for your system can be obtained from the
TOMCAT_HOME\conf\mod_jk.conf-auto file.

 LoadModule jk_module modules/mod_jk.dll
 JkWorkersFile
"D:/Applications/jboss-tomcat-2.1-beta/jakarta-tomcat-3.2.1/conf/workers.pro
perties"
 JkLogFile
"D:/Applications/jboss-tomcat-2.1-beta/jakarta-tomcat-3.2.1/logs/mod_jk.log"
 JkLogLevel error

 JkMount /*.jsp ajp13
 JkMount /servlet/* ajp13

 NOTE: This would change from system to system depending on the applications
that you have configured
 JkMount /<webappname>/servlet/* ajp13
 JkMount /<webappname>/*.jsp ajp13

 eg: for partmodel
 JkMount /partmodel/servlet/* ajp13
 JkMount /partmodel/*.jsp ajp13

5. Restart Tomcat/jBoss-Tomcat and Apache. You should be able to access your
servlets and jsps at default Apache Web Server port]

The complete configuration information is available at
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html

or at TOMCAT_HOME\doc\mod_jk-howto.html



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user