Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

integrate JBoss and Tomcat

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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

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…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2

886 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