Embedded JBoss and tomcat6 Integration

Source: Internet
Author: User

Original article:

Http://docs.jboss.com/seam/latest/reference/en-US/html/configuration.html#config.install.embedded

First download the embedded JBoss,

Http://sourceforge.net/projects/jboss/files/Embedded%20JBoss/Embedded%20JBoss%20Beta%203/

It is easy to embed JBoss in Tomcat 6.

First, you need to copy the jar package and related configuration files embedded in JBoss to Tomcat:

1. Copy all the files and folders in the bootstrap and Lib directories in the embedded JBoss directory to Tomcat Lib, except for JNDI. propertis.

2. Delete the annotations-api.jar file under Tomcat lib

Next, two configuration files need to be modified to add the embedded JBoss feature.

3. Modify CONF/server. xml of Tomcat and add a listener embeddedjbossbootstraplistener,Must be added after all other listeners.

<Server port="8005" shutdown="SHUTDOWN"><!-- Comment these entries out to disable JMX MBeans support used for the administration web application --><Listener className="org.apache.catalina.core.AprLifecycleListener" /><Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /><Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /><Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener" /><!-- Add this listener --><Listener className="org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener" />

4. Modify the conf/context. xml of Tomcat and add the webinfenders listener for the war package scan function.

<Context><!-- Default set of monitored resources --><WatchedResource>WEB-INF/web.xml</WatchedResource><!-- Uncomment this to disable session persistence across Tomcat restarts --><!--<Manager pathname="" />-->  <!-- Add this listener -->  <Listener className="org.jboss.embedded.tomcat.WebinfScanner" /></Context>

5. If JDK 6 is used, you also need to modify the java_opts environment variable and set. lang. classloader. change allowarraysyntax to true. Modify the file Catalina. BAT (Windows) or Catalina. sh (Unix/Linux)

Open the script file and add a line below the comment at the top of the file to set the java_opts environment variable:

Windows:

set JAVA_OPTS=%JAVA_OPTS% -Dsun.lang.ClassLoader.allowArraySyntax=true

Linux/Unix:

JAVA_OPTS="$JAVA_OPTS -Dsun.lang.ClassLoader.allowArraySyntax=true"

For more configuration options, see:

Embedded JBoss Tomcat integrated http://wiki.jboss.org/wiki/Wiki.jsp? Page = embeddedandtomcat

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.