Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

integrate JBoss and Tomcat

Posted on 2004-04-28
3
Medium Priority
?
5,414 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 1000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

705 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