Solved

integrate JBoss and Tomcat

Posted on 2004-04-28
3
5,399 Views
Last Modified: 2008-02-01
Hi there

I have just starting to learn JBoss server.

I downloaded jboss version 2.4.9 and installed in my C:/ drive I have also downloaded tomcat 4.0.3 and installed in C: drive saperately. I set the tomcat path and it is running ok.

I want to develope online application using jsp, server as web client and jboss as romote server
so is there any one help me how would i configure jboss to integrate with tomcat.

many thanks for your quick respond.
0
Comment
Question by:myare2004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 500 total points
ID: 10946189
here it goes..

First of all, JBoss has been tested with tomcat 3.2.1, newer version shall be configured in similar way I think.

Tomcat libs must be in classpath; then edit JBOSS_HOME/conf/default/jboss.conf and un-comment ClassPathExtension mbean for the tomcat lib directory to:



<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" CODEBASE="../../lib/ext/">
  <ARG TYPE="java.lang.String" VALUE="TOMCAT_HOME/lib/">
  <ARG TYPE="java.lang.String" VALUE="Tomcat">
</MLET>

edit JBOSS_HOME/conf/default/jboss.jcml and uncomment the EmbeddedTomcatService mbean. Locate:


  <mbean code="org.jboss.tomcat.EmbeddedTomcatService" name="DefaultDomain:service=EmbeddedTomcat" />

Always in jboss.jcml, check that J2eeDeployer is:


  <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>

Add the following lines to TOMCAT_HOME/conf/server.xml

<!-- JBoss, Setup the class loader heirarchy to enable in VM call optimization.
      Add after the org.apache.tomcat.context.WorkDirInterceptor ContextInterceptor
-->
        <ContextInterceptor className="org.jboss.tomcat.ContextClassLoaderInterceptor" />
<!-- JBoss, Add the jboss-web.xml parser. Add after the org.jboss.tomcat.ContextClassLoaderInterceptor
            ContextInterceptor
-->
        <ContextInterceptor className="org.jboss.tomcat.naming.JbossWebXmlReader" />
<!-- JBoss, Set the request thread classloader. Add before the org.apache.tomcat.request.SessionInterceptor
            RequestInterceptor
-->
        <RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor" />
<!-- JBoss, Map the current web user to the SecurityAssociation principal. Add
            after the org.apache.tomcat.request.SimpleRealm RequestInterceptor
-->
        <RequestInterceptor className="org.jboss.tomcat.security.JbossRealm" />

To compile JSP files, add the JDK lib/tools.jar file to the classpath in run.sh/run.bat, or copy tools.jar to the TOMCAT_HOME/lib directory.

Starting JBoss with run.sh/run.bat you should now see the following Tomcat related output in your log messages:

Using configuration "default"
[Info] Java version: 1.3.0_01,Sun Microsystems Inc.
[Info] Java VM: Java HotSpot(TM) Server VM 1.3.0_01,Sun Microsystems Inc.
[Info] System: Linux 2.2.16-22,i386
   ...
[EmbeddedTomcat] Starting
[EmbeddedTomcat] Starting EmbeddedTomcat....
2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /examples )
2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /admin )
[EmbeddedTomcat] Starting tomcat. Check logs/tomcat.log for error messages
2001-02-20 05:01:23 - ContextManager: Adding context Ctx(  )
2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /test )
2001-02-20 05:01:25 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2001-02-20 05:01:25 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
[EmbeddedTomcat] OK
[EmbeddedTomcat] Started
   ...
[Default] JBoss PRE-2.1 Started in 0m:14s

hope this will help you..

R.K



0
 

Author Comment

by:myare2004
ID: 10953572

dear rama

here are all my classpath:

CLASSPATH=  .;%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\common\lib\servlet.jar

CATALINA_HOME=  C:\tomcat

JAVA_HOME=  C:\j2sdk1.4.1_03

PATH=  %CATALINA_HOME%\bin

in order to use JBoss application server and tomcat server, which I installed in different directories in C drive as follow
C:\JBoss-2.4.9
C:\tomcat4.1.3
would you please helpme how would i set all correct paths to compile ejb files

I am newly starting learning this area, so would you explain it step by step.
I dont understand what u meant these following codes:
where u r saying edit classpath:

Tomcat libs must be in classpath; then edit JBOSS_HOME/conf/default/jboss.conf and un-comment ClassPathExtension mbean for the tomcat lib directory to:



<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" CODEBASE="../../lib/ext/">
  <ARG TYPE="java.lang.String" VALUE="TOMCAT_HOME/lib/">
  <ARG TYPE="java.lang.String" VALUE="Tomcat">
</MLET>

edit JBOSS_HOME/conf/default/jboss.jcml and uncomment the EmbeddedTomcatService mbean. Locate:


  <mbean code="org.jboss.tomcat.EmbeddedTomcatService" name="DefaultDomain:service=EmbeddedTomcat" />

Always in jboss.jcml, check that J2eeDeployer is:


  <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>




many thanks again
m Yare










0
 

Author Comment

by:myare2004
ID: 10964639
hi there

is there any one, who can help me this question
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question