Solved

integrate JBoss and Tomcat

Posted on 2004-04-28
3
5,366 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
  • 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now